Files
colorshell/eww/widgets/volume-control/source-slider.yuck
T

21 lines
658 B
Plaintext

(defwidget source-slider []
(box :class "slider source-slider"
:space-evenly true
(overlay
(scale :min 0
:max 101 ; dirty fix 99% max volume
:value "${json_volume.source}"
:orientation "horizontal"
:draw-value false
:flipped false
:onchange "wpctl set-volume @DEFAULT_AUDIO_SOURCE@ $(awk -v n={} 'BEGIN { print (n / 100) }')"
:class "output-volume-slider"
:tooltip "${json_volume.source}")
(label :text "󰍬"
:xalign 0)
)
)
)