updated mod_backlight to use brillo for better backlight control
This commit is contained in:
parent
126fdd878d
commit
fcbfec425a
@ -1,5 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
if command -v backlight_control &> /dev/null; then
|
||||
backlight_control $1
|
||||
if command -v brillo &> /dev/null; then
|
||||
function send_notification() {
|
||||
brightness=$(printf "%.0f\n" $(brillo -G))
|
||||
dunstify -a "changebrightness" -u low -r 9991 -h int:value:"$brightness" -i "brightness-$1" "Brightness: $brightness%" -t 2000
|
||||
}
|
||||
|
||||
case $1 in
|
||||
up)
|
||||
brillo -A 5 -q -u 150000
|
||||
send_notification $1
|
||||
;;
|
||||
down)
|
||||
brillo -U 5 -q -u 150000
|
||||
send_notification $1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
Reference in New Issue
Block a user