13 lines
309 B
Bash
Executable File
13 lines
309 B
Bash
Executable File
#!/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 :
|