This is a script I use on Thinkpad laptops to disable/enable the touchpad.
Thinkpads have the pointer in the middle of the keyboard and having an active touchpad just messes with the cursor.
This tries to be as generic as possible by looking up the device number and using that to toggle the touchpad on/off.