From 0e60d4acac40be90c803fd3a452af0a418e4ae87 Mon Sep 17 00:00:00 2001 From: stitchy Date: Thu, 28 Nov 2024 10:29:01 +0000 Subject: [PATCH] eww: brightness scroll --- config/eww/eww.yuck | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/config/eww/eww.yuck b/config/eww/eww.yuck index d9db5e7..b603679 100644 --- a/config/eww/eww.yuck +++ b/config/eww/eww.yuck @@ -69,10 +69,12 @@ :char "󰍬")) (defwidget brightness [] - (circle :prog {(backlight / 960) * 7/10} - :sty "font-size: 12; margin-right: 3px;" - :val {round( backlight / 960, 0) - 1} - :char "󰃠")) + (eventbox + :onscroll "if [ {} == 'up' ]; then brightnessctl -d intel_backlight set 1%+; else brightnessctl -d intel_backlight set 1%-; fi" + (circle :prog {(backlight / 960) * 7/10} + :sty "font-size: 12; margin-right: 3px;" + :val {round( backlight / 960, 0) - 1} + :char "󰃠"))) (defwidget power [] (box :class "power" :valign "end" "⏻"))