Created
November 26, 2015 00:27
-
-
Save jorgejch/4b661a6489e691ebe18f to your computer and use it in GitHub Desktop.
A backlight control command for bashrc.
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
# Usage: $ bl <integer><- or +> | |
function bl { | |
INC_PARAM=10 | |
DEC_PARAM=-${INC_PARAM} | |
case $1 in | |
+([0-9])- ) xbacklight -inc $(expr -1 + $DEC_PARAM \* ${1%-}); return 0;; | |
+([0-9])+ ) xbacklight -inc $(expr 1 + $INC_PARAM \* ${1%+}); return 0;; | |
* ) return 1;; | |
esac | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment