dotfiles/.config/eww/modules/volume.yuck
2024-03-07 13:49:47 -07:00

30 lines
904 B
Common Lisp

;; -*-lisp-*-
(deflisten volume--data
`~/.config/eww/scripts/volume.py`)
(defwidget volume-h []
(box :orientation "h"
:halign "start"
:class "module ${volume--data['mute'] ? 'offline' : ''}"
:space-evenly false
:spacing 0
(label :visible {!volume--data["mute"]} :text "")
(label :visible { volume--data["mute"]} :text "")
(label :text " ${volume--data['volume']}")))
(defwidget audio []
(box :orientation "v"
:halign "center"
:class "module text"
:space-evenly false
:spacing 0
(box :orientation "h"
:halign "center"
:space-evenly false
:spacing 15
(label :class {volume--data.output.mute ? "offline" : "special"}
:text "${volume--data.output.volume}%")
(label :class {volume--data.input.mute ? "offline" : "special"}
:text "${volume--data.input.volume}%"))
"audio system"))