💥 eww(bar/workspaces): fix workspace indicator with a literal script

This commit is contained in:
retrozinndev
2024-12-10 10:41:06 -03:00
parent 75ce9fa8f9
commit cacc59cb8e
41 changed files with 377 additions and 782 deletions
+2 -5
View File
@@ -1,15 +1,12 @@
(deflisten json_audio :initial `{ "output": 35, "source": 80 }`
`sh ./scripts/get-volume-watch.sh`)
(defwidget audio []
(eventbox :onclick "eww open --toggle audio-popup"
:class "audio-eventbox"
(box :class "audio"
(eventbox :onscroll `[ {} == "up" ] && wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ || wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-`
(label :text "${ json_audio.output != 0 ? '󰕾' : '󰝟' } ${json_audio.output}%"))
(label :text "${ json_volume.output != 0 ? '󰕾' : '󰝟' } ${json_volume.output}%"))
(eventbox :onscroll `[ {} == "up" ] && wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 5%+ || wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 5%-`
(label :text "${ json_audio.source != 0 ? '󰍬' : '󰍭' } ${json_audio.source}%"))
(label :text "${ json_volume.source != 0 ? '󰍬' : '󰍭' } ${json_volume.source}%"))
)
)
)