Created
June 30, 2016 07:28
-
-
Save ChatchaiJ/3736bd87bc54f6de83c5c03d776e1fc2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/sh | |
B="/sys/class/backlight/intel_backlight/brightness" | |
[ ! -f "$B" ] && { echo "Brightness can't be changed"; exit 0; } | |
[ -z "$1" ] && { echo "Usage: 0 value"; echo "where 1 < value < 937 "; exit 0; } | |
[ "$1" = 0 ] && { echo "Hmmm, you shouldn't do that, please use 1 instead"; exit 0; } | |
echo $1 | sudo tee $B |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment