Since my Asus VivoBook keyboard shortcut to change de keyboard lightning level is not working, I made a bash script and configured it to be activated when I press a combination of keys. This is my script:
level=$(cat /sys/class/leds/asus\:\:kbd_backlight/brightness)
[[ $level = 3 ]] && echo 0 | sudo tee /sys/class/leds/asus\:\:kbd_backlight/brightness || echo $(($level+1)) | sudo tee /sys/class/leds/asus\:\:kbd_backlight/brightness
The script is working when I run it on terminal, but when I press the keys, it doesn't, I think because of the sudo permission that requires a password. Is there any way I can change the script permissions so that when I run it in the background it doesn't request for the password?