0

On a tablet running 19.04, the keyboard backlight automatically turns off after a period of inactivity. I'd like to have that same function on my desktop.

The following script allows me to manually control the backlight:

xset led on
gsettings set org.gnome.desktop.a11y.keyboard mousekeys-enable true
sleep 1
gsettings set org.gnome.desktop.a11y.keyboard mousekeys-enable false

This turns the backlight on, then due to a bug with Ubuntu caused by running the xset command, I have to enable, then disable Mouse Keys to prevent the numpad from running as a mouse emulator. An identical script would need to be run to turn the backlight off, with the only difference being xset led off.

What I'd like to do is to take this script, and have it run after a certain period of inactivity. Is there an existing function running in the background that I could add such a script so? If not, what would be the simplest way to create something that achieves the desired results?

hiigaran
  • 6,473
  • 4
  • 28
  • 40
  • You could take this script which slowly dims two out of three monitors and gut most of it. I can do that later as well: https://askubuntu.com/questions/1155093/turn-off-all-monitors-while-watching-vlc-media-on-tv – WinEunuuchs2Unix Jul 31 '19 at 12:26
  • I've come across others suggesting using xprintidle as well. Out of curiosity, is there a way to do this without installing additional packages? – hiigaran Jul 31 '19 at 12:57
  • Don't think of xprintidle as a real extra package. It's just a tiny functional enhancement to Xorg IMO. – WinEunuuchs2Unix Jul 31 '19 at 12:59

0 Answers0