Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- val_in=$1
- val=$(cat /sys/class/backlight/nv_backlight/brightness)
- case $val_in in
- "dec") let val=${val}-10;;
- "inc") let val=${val}+10;;
- *) echo "ERROR" 1>&2 && exit 1
- esac
- if [ $val -lt 10 ]
- then
- let val=10
- elif [ $val -gt 90 ]
- then
- let val=90
- fi
- echo $val | sudo tee /sys/class/backlight/nv_backlight/brightness
Advertisement
Comments
-
- Controls gnome-4 backlight. Place script in /usr/local/bin/ and run with `gnome-terminal -e "pkexec /usr/local/bin/backlight <dec | inc>"`
Add Comment
Please, Sign In to add comment
Advertisement