Last active
May 19, 2022 13:15
-
-
Save dharmx/6f782ff6582f9f83fdd206b1c1c044b8 to your computer and use it in GitHub Desktop.
Sample eww volume slider demo [Pulse].
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* { | |
all: unset; | |
font-family: "Cooper Hewitt"; | |
} | |
box { | |
padding: 0.5em; | |
} | |
scale highlight { | |
background-color: darkorchid; | |
padding: 0.5em; | |
border-radius: 0.2em; | |
} | |
scale trough { | |
background-color: teal; | |
border-radius: 0.2em; | |
} | |
// vim:ft=scss |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defwindow test :geometry | |
(geometry :x "20px" | |
:y "100px" | |
:anchor "center" | |
:width "270px" | |
:height "60px") | |
(scale-test)) | |
(defwidget scale-test [] | |
(box :orientation "v" | |
(scale :onchange "pactl set-sink-volume 0 $(printf %.0f {})%" | |
:min 0 | |
:max 101 | |
:value "pacmd list-sinks | grep -A 7 '\* index' | grep volume | awk -F/ '{print $2}' | tr -d ' ' | sed 's/%$//'" | |
:active true))) | |
;; vim:ft=yuck |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Demo