diff --git a/modules/ewwbar/default.nix b/modules/ewwbar/default.nix index 051b2f1..9220310 100644 --- a/modules/ewwbar/default.nix +++ b/modules/ewwbar/default.nix @@ -7,6 +7,7 @@ in home.packages = with pkgs; [ playerctl + pw-volume alsa-utils socat jq diff --git a/modules/ewwbar/eww-config/eww.yuck b/modules/ewwbar/eww-config/eww.yuck index a444504..4d282ff 100644 --- a/modules/ewwbar/eww-config/eww.yuck +++ b/modules/ewwbar/eww-config/eww.yuck @@ -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'") diff --git a/modules/ewwbar/eww-config/scripts/get-workspaces b/modules/ewwbar/eww-config/scripts/get-workspaces index cdde821..d6c4b2c 100755 --- a/modules/ewwbar/eww-config/scripts/get-workspaces +++ b/modules/ewwbar/eww-config/scripts/get-workspaces @@ -6,6 +6,6 @@ spaces (){ } spaces -socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | while read -r line; do - spaces -done +# socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | while read -r line; do + # spaces +# done