Advertisement
Guest User

What i did

a guest
Dec 31st, 2013
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. This one is up and saved as brightness-up.sh : #!/bin/sh
  2.  
  3. max=`cat /sys/class/backlight/intel_backlight/max_brightness`
  4. cur=`cat /sys/class/backlight/intel_backlight/actual_brightness`
  5.  
  6. cur=$((cur + max / 4))
  7.  
  8. if [ $cur -gt $max ]; then
  9. cur=$max
  10. fi
  11.  
  12. echo $cur > /sys/class/backlight/intel_backlight/brightness
  13.  
  14. And this one is down and saved as brightness-down/sh : #!/bin/sh
  15.  
  16. max=`cat /sys/class/backlight/intel_backlight/max_brightness`
  17. cur=`cat /sys/class/backlight/intel_backlight/actual_brightness`
  18.  
  19. cur=$((cur - max / 4))
  20.  
  21. if [ $cur -lt 0 ]; then
  22. cur=0
  23. fi
  24.  
  25. echo $cur > /sys/class/backlight/intel_backlight/brightness
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement