Created
January 22, 2017 03:51
-
-
Save chris-olszewski/029bb35f8ecea7ab0b89ad05db5735db to your computer and use it in GitHub Desktop.
Brightness Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File=/sys/class/backlight/intel_backlight/brightness | |
Brightness=$1 | |
MaxBrightness=$(cat /sys/class/backlight/intel_backlight/max_brightness) | |
PercentBrightness=$(($MaxBrightness / 100)) | |
NewBrightness=$(($Brightness * $PercentBrightness)) | |
sudo chown $USER $File | |
echo $NewBrightness > $File |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment