Skip to content

Instantly share code, notes, and snippets.

@shinshin86
Last active January 11, 2016 02:03
Show Gist options
  • Save shinshin86/41879799a2e5142377b3 to your computer and use it in GitHub Desktop.
Save shinshin86/41879799a2e5142377b3 to your computer and use it in GitHub Desktop.
"Change Brightness" shell script
#!/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
@shinshin86
Copy link
Author

Change Brightness

"chBrightness.sh" is a tool for Change a Screen Brightness.
Verification environment : Debian7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment