Advertisement
Guest User

Untitled

a guest
Apr 27th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #!/bin/bash
  2. bldb='/sys/class/backlight/intel_backlight/brightness'
  3. step=113
  4. current=`cat $bldb`
  5. new=$current
  6. if [ "$1" == "up" ];then
  7. new=$(($current + $step))
  8. elif [ "$1" == "down" ];then
  9. new=$(($current - $step))
  10. fi
  11. if [ $new -le 0 ];then
  12. new=0
  13. fi
  14. echo $new > $bldb
  15. current=`cat $bldb`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement