Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Written by Dalton Miller and Philip Robb
- echo "Welcome to the Asus G75 Linux Backlight Script"
- if [ 'whoami' = root ]; then
- echo Please rerun the script using superuser permissions
- exit
- fi
- function readNum {
- echo "Lets adjust that brightness on your Nvidia backlight"
- echo "What value would you like to have your backlight set on?"
- read bklght
- }
- until [[ $bklght -gt 1 && $bklght -lt 100 ]]; do
- echo ""
- echo "Hmmm that doesn't see to be valid value"
- echo "You inputed $bklght"
- echo "Lets try this again between 1-100 idiot"
- echo ""
- readNum
- done
- modprobe nvidiabl
- echo $bklght | tee -a /sys/class/backlight/nvidia_backlight/brightness
- echo "Your backlight is set to $bklght"
- exit
Advertisement
Add Comment
Please, Sign In to add comment