That can be easily done with these two commands (inspired by a different answer):
My initial answer was to use
xinput set-prop 15 "Device Enabled" 0
xinput set-prop 15 "Device Enabled" 1
where the id number may be other than 15: it can be be found by running
I found about these commands in this answer under a question on how to disable the touchpad.
The commands can be added into launchers.
I prefer creating
.desktop files (in
usr/share/applications or in
.local/share/applications) for the two commands to be run easily with a launcher like Whisker Menu, Synapse, etc
(namely 'show last used item' and 'inside button'),
- and adding two specific icons,
the launcher will always display the current status of the touchpad.
Also it is never a bad idea to assign shortcuts (Settings Manager - Keyboard - Application Shortcuts) to the two commands.