I have a laptop that I take to work. At home, I have an external keyboard so I usually key num-lock on. At work, I want num lock to be off.
Is there a way to 'schedule' num lock on/of behavior? 9am onwards, num lock should be off by default whenever I switch it on. 7pm onwards, it should be on by default.
:edit: Another approach that was suggested in comments was to set the numlock based on existence of an external keyboard. If you have an external keyboard connected, set numlock on. Otherwise set it off.
Any hints how I can accomplish this on linux (ubuntu 12.04)?