Disabling the touchpad on Ubuntu on a Dell XPS12

One of my most loved features of some Touchpad drivers are “Disable when another pointing device is connected”. I have been trying for a while to get the same thing running on my XPS, as the touchpad is so big and the keyboard so small, it is almost always an annoyance when you accidentally touch it. Well, today I found a quick solution, albeit a manual one. I have tried GPointing Device Settings, Touchpad Indicator and more, with no success. The configuration tool in Ubuntu only lets me do some tweaks to speeds etc, but not disable the device. Recently it has annoyed me so much that I went the terminal route and wanted to disable it manually with X11. Hit read more if you want the commands.
Read more of this post