Is there some way for me to configure udev so that, when I plug a USB mouse into my laptop, the laptop's touchpad gets disabled? And reenabled if I pull the mouse? The touchpadd can be a PITA when I am typing ... a slight brush of the thumb can cause a "mouse click" often moving my cursor location.
See the manpage of udev, quote:
After device node creation, removal, or network device renaming, udev
executes the programs located in the directory tree under /etc/dev.d/.
The name of a program must have the suffix .dev to be recognized.
In addition to the hotplug environment variables, UDEV_LOG is set if
udev is configured to use the syslog facility. Executed programs may
want to follow that setting. DEVNAME is exported to make the name of
the created node, or the name the network device is renamed to, avail-
able to the executed program. The programs in every directory are
sorted in lexical order, while the directories are searched in the fol-