I'd like to run custom scripts on docking or un-docking my ThinkPad X220.
Obvious place is some udev
rule, but what events or attributes should I use? Another option is acpi
. Is it better option? What else comes as viable alternative? I am running Debian, a mix between squeeze, backports, wheeze... and sid. Is there any native solution?
dmesg
or syslog messages to check what messages are generated when you dock/undock. If you do see a notification you should be able to tie the event that generates the message to your script.