Last active
January 11, 2016 02:03
-
-
Save shinshin86/41879799a2e5142377b3 to your computer and use it in GitHub Desktop.
"Change Brightness" shell 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
#!/bin/bash | |
function usage { | |
cat <<EOF | |
$(basename ${0}) is a tool for Change a Screen Brightness(Verification environment : Debian7) | |
Usage: | |
$(basename ${0}) [command or options] | |
Command(Selected Brightness): | |
--dark1,-d1 print Dark(Even when "No option") | |
--dark2,-d2 print Very Dark | |
--dark3,-d3 print Bedroom Dark | |
Options: | |
--version, -v print $(basename ${0}) version | |
--help, -h print this | |
EOF | |
} | |
function version { | |
echo "$(basename ${0}) version 0.0.1(Beta) " | |
} | |
case ${1} in | |
--dark1 | -d1) | |
echo 470000 > /sys/class/backlight/intel_backlight/brightness | |
;; | |
--dark2 | -d2) | |
echo 370000 > /sys/class/backlight/intel_backlight/brightness | |
;; | |
--dark3 | -d3) | |
echo 240000 > /sys/class/backlight/intel_backlight/brightness | |
;; | |
--help | -h) | |
usage | |
;; | |
--version | -v) | |
version | |
;; | |
*) | |
echo 470000 > /sys/class/backlight/intel_backlight/brightness | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Change Brightness
"chBrightness.sh" is a tool for Change a Screen Brightness.
Verification environment : Debian7