nixdots/home/programs/graphical/bars/eww/config/modules/volume.yuck
ItsDrike ac23da55c5
Add eww bar
This configuration was simply copied from my old Arch Linux system.
There are some issues that still need to be solved, namely with fonts
and missing bitcoin price script, but it's mostly minor.
2024-06-20 14:05:43 +02:00

41 lines
1 KiB
Plaintext

(defvar mic_rev false)
(defwidget volume_module []
(box
:class "module volume"
:space-evenly false
(eventbox
:onscroll "scripts/volume setvol SOURCE 0.5 {}"
:onclick "scripts/volume togglemute SOURCE"
:onrightclick "${terminal} pulsemixer &"
:onhover "${EWW_CMD} update mic_rev=true"
:onhoverlost "${EWW_CMD} update mic_rev=false"
:class "microphone"
(box
(label
:class "icon"
:text {volume.microphone_icon})
(label
:visible {mic_rev && !volume.microphone_mute}
:class "value"
:text "${volume.microphone_vol}%")
))
(eventbox
:onscroll "scripts/volume setvol SINK 0.5 {}"
:onclick "scripts/volume togglemute SINK"
:onrightclick "${terminal} pulsemixer &"
:class "speaker"
(box
(label
:class "icon"
:text {volume.speaker_icon})
(label
:visible {!volume.speaker_mute}
:class "value"
:text "${volume.speaker_vol}%")
))
))