From 924990cda864864b2be696bff5756f080ce2f09f Mon Sep 17 00:00:00 2001 From: Simon Rieger Date: Tue, 30 May 2023 11:57:24 +0200 Subject: [PATCH] add brightness up/down --- dot_config/waybar/config | 2 ++ dot_config/waybar/executable_brightness-down.sh | 1 + dot_config/waybar/executable_brightness-up.sh | 1 + 3 files changed, 4 insertions(+) create mode 100644 dot_config/waybar/executable_brightness-down.sh create mode 100644 dot_config/waybar/executable_brightness-up.sh diff --git a/dot_config/waybar/config b/dot_config/waybar/config index 3ae57ee..bc13d73 100644 --- a/dot_config/waybar/config +++ b/dot_config/waybar/config @@ -128,6 +128,8 @@ "backlight": { // "device": "acpi_video1", "format": "{percent}% {icon}", + "on-scroll-up": "~/.config/waybar/brightness-up.sh", + "on-scroll-down": "~/.config/waybar/brightness-down.sh", "format-icons": [ "", "", diff --git a/dot_config/waybar/executable_brightness-down.sh b/dot_config/waybar/executable_brightness-down.sh new file mode 100644 index 0000000..03ee224 --- /dev/null +++ b/dot_config/waybar/executable_brightness-down.sh @@ -0,0 +1 @@ +brightnessctl set 5%- | sed -En 's/.*\(([0-9]+)%\).*/\1/p' > /tmp/wob diff --git a/dot_config/waybar/executable_brightness-up.sh b/dot_config/waybar/executable_brightness-up.sh new file mode 100644 index 0000000..0b02e53 --- /dev/null +++ b/dot_config/waybar/executable_brightness-up.sh @@ -0,0 +1 @@ +brightnessctl set +5% | sed -En 's/.*\(([0-9]+)%\).*/\1/p' > /tmp/wob