Advertisement
Guest User

Untitled

a guest
Aug 29th, 2016
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. brightness="/sys/class/backlight/intel_backlight/brightness"
  4. presbright=`cat /sys/class/backlight/intel_backlight/brightness`
  5. perc=`expr $presbright "*" 100 "/" 24`
  6.  
  7. case "$1" in
  8. up)
  9. xbacklight -time 100 -inc 15
  10. lvl=`xbacklight`
  11. pkill xfce4-notifyd; notify-send -c test -i ~/brightness-up-64x64.png -h int:value:$lvl test
  12. ;;
  13. down)
  14. xbacklight -time 100 -dec 15
  15. lvl=`xbacklight`
  16. pkill xfce4-notifyd; notify-send -c test -i ~/brightness-up-64x64.png -h int:value:$lvl test
  17. ;;
  18. status)
  19. echo $presbright
  20. ;;
  21. *)
  22. echo "Accepted arguments are: up, down, status."
  23. ;;
  24. esac
  25.  
  26. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement