diff options
| author | pants <niklasjo2004@gmail.com> | 2026-09-21 14:17:03 -0700 |
|---|---|---|
| committer | pants <niklasjo2004@gmail.com> | 2026-09-21 14:17:03 -0700 |
| commit | 7b21727285e50b0b050c4ddd70d07542229c5366 (patch) | |
| tree | 5d369153c5df5b41f3750d25479a68f20169c8ff /bin/brightness | |
init
Diffstat (limited to 'bin/brightness')
| -rwxr-xr-x | bin/brightness | 12 |
1 files changed, 12 insertions, 0 deletions
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 : |
