From 94d96a4e7072fda9548863f45638bba00c66c8ab Mon Sep 17 00:00:00 2001 From: pants Date: Fri, 20 Feb 2026 18:07:17 -0800 Subject: [PATCH] innovate. --- bin/brightness | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 bin/brightness diff --git a/bin/brightness b/bin/brightness new file mode 100755 index 0000000..fb21f26 --- /dev/null +++ b/bin/brightness @@ -0,0 +1,12 @@ +#!/bin/sh +dunstctl close-all +case "$1" in + "up") + brightnessctl set "$2"%+;; + "down") + brightnessctl set "$2"%-;; +esac +CURRENT=$(brightnessctl get) +MAX=$(brightnessctl max) +BRIGHTNESS=$(echo "scale=2; ("$CURRENT"/"$MAX")*100" | bc | sed s/\.00$//g) +notify-send "Brightness set to "$BRIGHTNESS%"" -i :