eww: Add interactibles for vol, mic, and brightness

This commit is contained in:
stitchy 2024-11-29 10:03:29 +00:00
parent d249ab216f
commit a90cb37e69
Signed by: stitchy
SSH key fingerprint: SHA256:yz2SoxdnY67tfY5Jzb0f2v8f5W3o/IF359kbcquWip8

View file

@ -57,16 +57,22 @@
:char "󱐋"))
(defwidget volume []
(circle :prog {vol * 7/10}
:sty "font-size: 12; margin-right: 2px;"
:val {vol + 1 - 1}
:char ""))
(eventbox
:onclick "hyprctl dispatch exec 'pavucontrol -t 3'"
:onscroll "if [ {} == 'up' ]; then /etc/nixos/config/dunst/scripts/volumeNotify.sh 1%+; else /etc/nixos/config/dunst/scripts/volumeNotify.sh 1%-; fi"
(circle :prog {vol * 7/10}
:sty "font-size: 12; margin-right: 2px;"
:val {vol + 1 - 1}
:char "")))
(defwidget mic []
(circle :prog {micvol * 70}
:sty "margin-left: 1px;"
:val {micvol *100}
:char "󰍬"))
(eventbox
:onclick "hyprctl dispatch exec 'pavucontrol -t 4'"
:onscroll "if [ {} == 'up' ]; then wpctl set-volume -l 1 @DEFAULT_SOURCE@ 1%+; else wpctl set-volume @DEFAULT_SOURCE@ 1%-; fi"
(circle :prog {micvol * 70}
:sty "margin-left: 1px;"
:val {micvol *100}
:char "󰍬")))
(defwidget brightness []
(eventbox
@ -101,9 +107,11 @@
(power))))
(defwidget cal []
(eventbox
:onhoverlost "eww close cal"
(calendar)))
(box
:class "cal"
(eventbox
:onhoverlost "eww close cal"
(calendar))))
;; Windows