kf5ccd

G75brightness

Jan 31st, 2013
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. #!/bin/bash
  2. # Written by Dalton Miller and Philip Robb
  3. # You must install nvidiabl prior to running this
  4.  
  5. echo "Welcome to the Asus G75 Linux Backlight Script"
  6. if [ "$(id -u)" != "0" ]; then
  7. echo Please rerun the script using superuser permissions
  8. exit
  9. fi
  10.  
  11. function readNum {
  12. echo "Lets adjust that brightness on your Nvidia backlight"
  13. echo "What value would you like to have your backlight set on?"
  14. read bklght
  15. }
  16.  
  17. readNum
  18.  
  19. until [[ $bklght -gt 0 && $bklght -lt 101 ]]; do
  20. echo ""
  21. echo "Hmmm that doesn't see to be valid value"
  22. echo "You inputed $bklght"
  23. echo "Lets try this again between 1-100 idiot"
  24. echo ""
  25. readNum
  26. done
  27.  
  28. modprobe nvidiabl
  29. echo $bklght | tee -a /sys/class/backlight/nvidia_backlight/brightness
  30. echo "Your backlight is set to $bklght"
  31.  
  32. exit
Advertisement
Add Comment
Please, Sign In to add comment