Skip to content

Instantly share code, notes, and snippets.

@dharmx
Last active May 19, 2022 13:15
Show Gist options
  • Select an option

  • Save dharmx/6f782ff6582f9f83fdd206b1c1c044b8 to your computer and use it in GitHub Desktop.

Select an option

Save dharmx/6f782ff6582f9f83fdd206b1c1c044b8 to your computer and use it in GitHub Desktop.
Sample eww volume slider demo [Pulse].
* {
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
(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
@dharmx
Copy link
Copy Markdown
Author

dharmx commented May 19, 2022

lol
Demo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment