Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- brightness="/sys/class/backlight/intel_backlight/brightness"
- presbright=`cat /sys/class/backlight/intel_backlight/brightness`
- perc=`expr $presbright "*" 100 "/" 24`
- case "$1" in
- up)
- xbacklight -time 100 -inc 15
- lvl=`xbacklight`
- pkill xfce4-notifyd; notify-send -c test -i ~/brightness-up-64x64.png -h int:value:$lvl test
- ;;
- down)
- xbacklight -time 100 -dec 15
- lvl=`xbacklight`
- pkill xfce4-notifyd; notify-send -c test -i ~/brightness-up-64x64.png -h int:value:$lvl test
- ;;
- status)
- echo $presbright
- ;;
- *)
- echo "Accepted arguments are: up, down, status."
- ;;
- esac
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement