This repository has been archived on 2021-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
2020-05-27 02:31:42 +00:00
|
|
|
#!/bin/sh
|
2019-04-22 16:17:15 +00:00
|
|
|
|
2020-05-27 02:31:42 +00:00
|
|
|
send_notification() {
|
2021-02-09 16:45:49 +00:00
|
|
|
icon="$XDG_DATA_HOME/icons/Haiku/scalable/status/dialog-information.svg"
|
|
|
|
dunstify -i "$icon" -r 5555 -u low " $(printf %.0f%% "$(xbacklight -get)")"
|
2019-04-22 16:17:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
case $1 in
|
2021-02-09 16:45:49 +00:00
|
|
|
up)
|
|
|
|
# increase the backlight by 5%
|
|
|
|
xbacklight -inc 5
|
|
|
|
send_notification
|
|
|
|
;;
|
|
|
|
down)
|
|
|
|
# decrease the backlight by 5%
|
|
|
|
xbacklight -dec 5
|
|
|
|
send_notification
|
|
|
|
;;
|
2019-04-22 16:17:15 +00:00
|
|
|
esac
|