Created
May 24, 2018 22:19
-
-
Save dardourimohamed/f8f3a755ba9d85286da9e18a213780e2 to your computer and use it in GitHub Desktop.
Backlight brightness incerement/decrement. usage : increment : "brightness intel_backlight 10" or decrement : "brightness intel_backlight -10"
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 | |
DEVICE=$1 | |
VALUE=$2 | |
FILE="/sys/class/backlight/$DEVICE/brightness" | |
CURR_VALUE=$( cat "$FILE" ) | |
VALUE="$(( $CURR_VALUE + $VALUE ))" | |
CMD="echo $VALUE > $FILE" | |
sudo su -c "$CMD" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment