Last active
February 26, 2019 21:47
-
-
Save RafikFarhad/5aae0be5a431c469e7d68ee60f70465d to your computer and use it in GitHub Desktop.
# Asus Vivobook Keyboard Light
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 | |
brightness=$(cat "/sys/class/leds/asus::kbd_backlight/brightness") | |
# a=$((brightness-1)) | |
if [ "$brightness" -gt 2 ] | |
then | |
a=0 | |
echo $a >> /sys/class/leds/asus\:\:kbd_backlight/brightness | |
elif [ "$brightness" -gt 0 ] | |
then | |
a=$((brightness+1)) | |
echo $a >> /sys/class/leds/asus\:\:kbd_backlight/brightness | |
else | |
a=1 | |
echo $a >> /sys/class/leds/asus\:\:kbd_backlight/brightness | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Asus Vivobook Keyboard Light
Code
~/.scripts/
Todos
chmod +x ~/.scripts/kbd_leds.sh
chmod 666 /sys/class/leds/asus\:\:kbd_backlight/brightness
sudo apt-get install xbindkeys xbindkeys-config
xbindkeys -d > /home/$USER/.xbindkeysrc
xbindkeys-config
Instruction for saving Key Binding
/home/$USER/.scripts/kbd_leds.sh