Compare commits

...

5 commits

Author SHA1 Message Date
34172f0ecb some eww bar cleanup 2023-10-29 19:20:10 -07:00
083308eb37 fixed battery and volume widgets 2023-10-29 18:27:21 -07:00
09ef4812e5 fixed script shebang 2023-10-29 16:52:44 -07:00
a87fe8b7b8 set offset shadows 2023-10-29 16:23:51 -07:00
be61817345 fixed workspace->monitor binding 2023-10-29 16:23:51 -07:00
7 changed files with 59 additions and 53 deletions

View file

@ -7,6 +7,7 @@ in
home.packages = with pkgs; [
playerctl
pw-volume
alsa-utils
socat
jq

View file

@ -4,11 +4,19 @@
//Global Styles
.bar-main {
color: #b0b4bc;
margin: 15px;
padding: 10px;
margin-bottom: 0px;
padding-bottom: 0px;
background-color: rgba(30, 30, 30, 0.9);
color: #FFFFFF;
border-radius: 10;
padding-left: 10px;
padding-right: 10px;
// font: 12px;
// color: #b0b4bc;
// margin: 15px;
// padding: 10px;
// margin-bottom: 0px;
// padding-bottom: 0px;
}
.bar-section {
@ -32,7 +40,7 @@
.regular {
color: #b0b4bc;
padding: 5px;
padding: 8px;
}
.active-workspace {
@ -41,3 +49,11 @@
padding-left: 10px;
padding-right: 10px;
}
.side-stuff {
background-color: rgba(20, 20, 20, 0.9);
color: #FFFFFF;
border-radius: 10;
padding-left: 10px;
padding-right: 10px;
}

View file

@ -1,45 +1,45 @@
(defwidget bar []
(centerbox :orientation "h"
(workspaces :names active-workspaces :current-idx current-workspace)
(workspaces :current-idx current-workspace)
(music)
(info)))
(deflisten active-workspaces :initial "[]" "bash ./scripts/get-workspaces")
(deflisten current-workspace :initial "1" "bash ./scripts/get-active-workspace")
(defwidget workspaces [names current-idx]
(defwidget workspaces [current-idx]
(box
:halign "start"
:hexpand false
:class "bar-main"
:space-evenly true
:spacing "12"
:css "* {margin-left: 20px; margin-right: 20px;}"
(box
:class {replace(captures(names, "\"[0-9]\"")[captures(current-idx, "[0-9]")[0][0]][0], "\"", "") == "1" ? "active-workspace" : "regular"}
(label :text {names =~ `"1"` ? "" : ""}))
:class {current-idx == "1" ? "active-workspace" : "regular"}
(label :text ""))
(box
:class {replace(captures(names, "\"[0-9]\"")[captures(current-idx, "[0-9]")[0][0]][0], "\"", "") == "2" ? "active-workspace" : "regular"}
(label :text {names =~ `"2"` ? "" : ""}))
:class {current-idx == "2" ? "active-workspace" : "regular"}
(label :text ""))
(box
:class {replace(captures(names, "\"[0-9]\"")[captures(current-idx, "[0-9]")[0][0]][0], "\"", "") == "3" ? "active-workspace" : "regular"}
(label :text {names =~ `"3"` ? "" : ""}))
:class {current-idx == "3" ? "active-workspace" : "regular"}
(label :text ""))
(box
:class {replace(captures(names, "\"[0-9]\"")[captures(current-idx, "[0-9]")[0][0]][0], "\"", "") == "4" ? "active-workspace" : "regular"}
(label :text {names =~ `"4"` ? "" : ""}))
:class {current-idx == "4" ? "active-workspace" : "regular"}
(label :text ""))
(box
:class {replace(captures(names, "\"[0-9]\"")[captures(current-idx, "[0-9]")[0][0]][0], "\"", "") == "5" ? "active-workspace" : "regular"}
(label :text {names =~ `"5"` ? "" : ""}))
:class {current-idx == "5" ? "active-workspace" : "regular"}
(label :text ""))
(box
:class {replace(captures(names, "\"[0-9]\"")[captures(current-idx, "[0-9]")[0][0]][0], "\"", "") == "6" ? "active-workspace" : "regular"}
(label :text {names =~ `"6"` ? "" : ""}))
:class {current-idx == "6" ? "active-workspace" : "regular"}
(label :text ""))
(box
:class {replace(captures(names, "\"[0-9]\"")[captures(current-idx, "[0-9]")[0][0]][0], "\"", "") == "7" ? "active-workspace" : "regular"}
(label :text {names =~ `"7"` ? "" : ""}))
:class {current-idx == "7" ? "active-workspace" : "regular"}
(label :text ""))
(box
:class {replace(captures(names, "\"[0-9]\"")[captures(current-idx, "[0-9]")[0][0]][0], "\"", "") == "8" ? "active-workspace" : "regular"}
(label :text {names =~ `"8"` ? "" : ""}))
:class {current-idx == "8" ? "active-workspace" : "regular"}
(label :text ""))
(box
:class {replace(captures(names, "\"[0-9]\"")[captures(current-idx, "[0-9]")[0][0]][0], "\"", "") == "9" ? "active-workspace" : "regular"}
(label :text {names =~ `"9"` ? "" : ""}))))
:class {current-idx == "9" ? "active-workspace" : "regular"}
(label :text ""))))
(defwidget info []
(box
@ -51,7 +51,7 @@
:space-evenly false
:spacing "10"
(_volume :volume volume)
(_battery :status {EWW_BATTERY.BAT0.status} :battery {EWW_BATTERY.BAT0.capacity}))
(_battery :status {EWW_BATTERY == "" ? "" : EWW_BATTERY.BAT0.status} :battery {EWW_BATTERY == "" ? "" : EWW_BATTERY.BAT0.capacity}))
(_network :strength net-strength :name net-name)
(sep)
(buttons)))
@ -90,11 +90,11 @@
(defwidget _battery [status battery]
(box
:hexpand false
:class {battery < 20 ? "alert" : "regular"}
:class {status == "" ? "regular" : battery < 20 ? "alert" : "regular"}
(revealer-on-hover
:toggle battery-visible
:togglename "battery-visible"
(label :text {status == 'Charging' ? "󰂄" :
(label :text {status == 'Charging' || status == "" ? "󰚥" :
battery < 20 ? "󰁻" :
battery < 40 ? "󰁽" :
battery < 60 ? "󰁿" :
@ -144,7 +144,7 @@
{music != "" ? "🎵${music}" : ""}))
(defpoll volume :interval "1s"
"scripts/getvol")
"pw-volume status | jq '.percentage'")
(defpoll time :interval "10s"
"date '+%H:%M %b %d, %Y'")

View file

@ -1,4 +1,5 @@
#! /bin/bash
#!/usr/bin/env bash
#
function clamp {
min=$1
max=$2

View file

@ -1,11 +0,0 @@
#!/bin/bash
spaces (){
WORKSPACE_WINDOWS=$(hyprctl workspaces -j | jq 'map({key: .id | tostring, value: .windows}) | from_entries')
seq 1 10 | jq --argjson windows "${WORKSPACE_WINDOWS}" --slurp -Mc 'map(tostring) | map({id: ., windows: ($windows[.]//0)})'
}
spaces
socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | while read -r line; do
spaces
done

View file

@ -56,8 +56,8 @@ in
general = {
gaps_in = 5;
gaps_out = 10;
border_size = 1.7;
gaps_out = 8;
border_size = 2.0;
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
};
@ -75,7 +75,7 @@ in
# https://wiki.hyprland.org/Configuring/Variables/#decoration
decoration = {
shadow_offset = "0 5";
shadow_offset = "5 5";
rounding = 5;
"col.shadow" = "rgba(00000099)";
};

View file

@ -8,17 +8,16 @@ in
{
wayland.windowManager.hyprland.settings = {
workspace = if (hostname == "NicksNixDesktop") then [
"1,monitor:DP-4"
"3,monitor:DP-4"
"5,monitor:DP-4"
"7,monitor:DP-4"
"9,monitor:DP-4"
"1,monitor:DP-3,default:true"
"3,monitor:DP-3"
"5,monitor:DP-3"
"7,monitor:DP-3"
"9,monitor:DP-3"
"2,monitor:DP-2"
"2,monitor:DP-2,default:true"
"4,monitor:DP-2"
"6,monitor:DP-2"
"8,monitor:DP-2"
"10,monitor:DP-2"
] else [
];