Updated dunst and added automatic monitor switching
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
This commit is contained in:
23
config/.scripts/brightness.sh
Executable file
23
config/.scripts/brightness.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
type xbacklight >/dev/null 2>&1 || {
|
||||
echo >&2 "I require xbacklight but it's not installed. Aborting."
|
||||
exit 1
|
||||
}
|
||||
type dunstify >/dev/null 2>&1 || {
|
||||
echo >&2 "I require dunstify but it's not installed. Aborting."
|
||||
exit 1
|
||||
}
|
||||
|
||||
case $1 in
|
||||
"up"*)
|
||||
xbacklight -inc 10 &
|
||||
currentBrightness=$(xbacklight -get)
|
||||
dunstify -r 1 'brightness up'\ \($currentBrightness%\)
|
||||
;;
|
||||
"down"*)
|
||||
xbacklight -dec 10 &
|
||||
currentBrightness=$(xbacklight -get)
|
||||
dunstify -r 1 'brightness down'\ \($currentBrightness%\)
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user