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 :