On Windows 10, my laptop's keyboard backlit automatically turned off after a minute or so of inactivity. As soon as any activity occurred, they turned back on.
On ubuntu, if I run the following
echo <0-3> | sudo tee /sys/class/leds/asus::kbd_backlight/brightness
That works for dimming / increasing the brightness (0 being turned off, 3 being brightest).
Is there a way to have the above automatically get executed whenever the system's been idle for 1 minute, as well as re-run it when it comes back from being idle?
Thanks.
let "idle = $(xprintidle)"
? – Jacob Vlijm Apr 26 '16 at 11:12sudo dim_keyboard.sh
.) After adding to sudoers, it works fantastically :) Thanks! – Click Upvote Apr 26 '16 at 11:34username ALL= NOPASSWD: /usr/local/bin/dim_keyboard.sh
as the last line of sudoers viasudo visudo
. – Click Upvote Apr 26 '16 at 11:46sudo
. will edit. – Jacob Vlijm Apr 26 '16 at 11:51username ALL
should beclickupvote ALL
, i.e username should be replaced by the actual username, right? – Click Upvote Apr 26 '16 at 11:55