18 lines
509 B
Bash
Executable file
18 lines
509 B
Bash
Executable file
#!/bin/sh
|
|
|
|
down() {
|
|
brightnessctl set 5%-
|
|
brightnessctl=$(brightnessctl | grep -oP "(\d+(\.\d+)?(?=%))")
|
|
dunstify -a "Brightness" "Decreasing to $brightnessctl%" -h int:value:"$brightnessctl" -i ~/icons/brightness.png -r 2593 -u normal
|
|
}
|
|
|
|
up() {
|
|
brightnessctl set 5%+
|
|
brightnessctl=$(brightnessctl | grep -oP "(\d+(\.\d+)?(?=%))")
|
|
dunstify -a "BRightness" "Increasing to $brightnessctl%" -h int:value:"$brightnessctl" -i ~/icons/brightness.png -r 2593 -u normal
|
|
}
|
|
|
|
case "$1" in
|
|
up) up;;
|
|
down) down;;
|
|
esac
|