Introduces eww bar

This commit is contained in:
Michel Fedde 2025-11-11 17:44:06 +01:00
parent 75bc7eb6a7
commit e58899e4ae
30 changed files with 279 additions and 1147 deletions

View file

@ -0,0 +1,22 @@
(defpoll bar-audio-icon :interval "1s" :initial "" `~/.config/eww/widgets/bar/scripts/audio.sh`)
(defpoll bar-audio-volume :interval "1s" :initial "" `pactl --format="json" get-sink-volume $(pactl get-default-sink) | jq '.volume | map(.value) | length as $amount | add / $amount'`)
(defwidget bar-audio []
(eventbox
:onclick "hyprctl dispatch exec pavucontrol"
:onrightclick "hyprctl dispatch exec rofi -show pactl"
(box
:hexpand false
:halign "end"
:space-evenly false
:spacing 20
:class "widget default-padding"
{bar-audio-icon}
(progress
:valign "center"
:value {(bar-audio-volume / 65536) * 100}
)
)
)
)