Switch is a simple tool to control hardware devices.
Install the package using the following command:
$ sudo add-apt-repository ppa:sugarcoat/ppa
$ sudo apt update
$ sudo apt install switch
To get the names of hardware devices, run:
$ xinput
Create a config
file and include the names of the devices you want to enable or disable.
[ENABLE]
devices = ["SynPS/2 Synaptics TouchPad", "Virtual core XTEST pointer"]
[DISABLE]
devices = ["ELAN Touchscreen"]
Execute the command for the changes to take effect:
$ switch /path/to/config