diff options
Diffstat (limited to '.config/eww/eww.yuck')
-rw-r--r-- | .config/eww/eww.yuck | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/.config/eww/eww.yuck b/.config/eww/eww.yuck new file mode 100644 index 0000000..fb02c29 --- /dev/null +++ b/.config/eww/eww.yuck @@ -0,0 +1,61 @@ +(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)) |