blob: fb21f26b4bf8ded8787efd1c1e3f884d0f6a9732 (
plain)
1
2
3
4
5
6
7
8
9
10
11
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 :
|