(defwidget chad-widgets [] (box :orientation "h" (sliders))) (defwidget sliders [] (box :class "master_vol" :orientation "v" :space-evenly false :halign "end" (metric :label "" :value master_vol :onchange "amixer set Master {}%") (metric :label "" :value head_vol :onchange "amixer set Headphone {}%") (chad :label "" :value brightness :onchange "xbacklight -set {}%") ) ) (defwidget chad [label value onchange] (box :orientation "h" :class "chad" :space-evenly false (box :class "label" label) (scale :min 0 :max 101 :active {onchange != ""} :value value :onchange onchange))) (defwidget metric [label value onchange] (box :orientation "h" :class "metric" :space-evenly false (box :class "label" label) (scale :min 0 :max 101 :active {onchange != ""} :value value :onchange onchange))) (defpoll master_vol :interval "1s" "scripts/get_mastervol") (defpoll head_vol :interval "1s" "scripts/get_headvol") (defpoll brightness :interval "1s" "scripts/get_brightness") (defwindow alsa-gui :monitor 0 :windowtype "dock" :geometry (geometry :x "-01%" :y "8%" :width "5%" :height "0px" :anchor "top right") ; :reserve (struts :side "right" :distance "0%") (chad-widgets))