Cool. That is way simpler. Thanks!
I have a question though. Can we use cron to make the keyboard decide whether to turn on/off its backlit at startup? Any suggestions?
You may run it using @reboot in the same crontab or take advantage of your init system (sysvinit / systemd / etc). But you'll now have to calculate the desired led state (on/off) in your run command or script, which can be achieved by simply comparing the current 24-h formatted hour value with 6 and 18.
That's what cron is for. 2 lines, 2 commands:
0 6 * * * root /path/to/xset -led named 'Scroll Lock'
0 18 * * * root /path/to/xset led named 'Scroll Lock'
Cool. That is way simpler. Thanks!
I have a question though. Can we use cron to make the keyboard decide whether to turn on/off its backlit at startup? Any suggestions?
You may run it using @reboot in the same crontab or take advantage of your init system (sysvinit / systemd / etc). But you'll now have to calculate the desired led state (on/off) in your run command or script, which can be achieved by simply comparing the current 24-h formatted hour value with 6 and 18.
This can be compacted to an one (and ugly) one-liner and put everywhere. A bit more civilized way would be to leave it as a shell script.