Last active
December 27, 2016 10:53
-
-
Save jcubic/d38862247fcc2aa57bddf826df1db13e to your computer and use it in GitHub Desktop.
Toggle Display and keyboard highlight on asus laptop on GNU/Linux
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/bash | |
file=/tmp/display | |
KBBL="/sys/class/leds/asus::kbd_backlight" | |
if [ -e $file ]; then | |
rm $file | |
sudo vbetool dpms on | |
[ -d $KBBL -o -f $KBBL ] && echo 3 | sudo tee $KBBL/brightness > /dev/null | |
else | |
touch $file | |
sudo vbetool dpms off | |
[ -d $KBBL -o -f $KBBL ] && echo 0 | sudo tee $KBBL/brightness > /dev/null | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment