20 lines
391 B
Bash
Executable File
20 lines
391 B
Bash
Executable File
#!/bin/sh
|
|
|
|
send_notification() {
|
|
icon="$HOME/.local/share/icons/Marwaita-Dark/24x24/actions/contrast.svg"
|
|
dunstify -i "$icon" -r 5555 -u low " $(printf %.0f%% "$(xbacklight -get)")"
|
|
}
|
|
|
|
case $1 in
|
|
up)
|
|
# increase the backlight by 5%
|
|
xbacklight -inc 5
|
|
send_notification
|
|
;;
|
|
down)
|
|
# decrease the backlight by 5%
|
|
xbacklight -dec 5
|
|
send_notification
|
|
;;
|
|
esac
|