I am developing an applet for Cinnamon which lets me enable/disable the touchscreen of my laptop. This also shows the current status of the touchscreen.
Currently I am using synchronous calls to the
xinput command to query or set the current state of the touchscreen device.
This however has at least two problems:
- Calling shell commands earns my applet a warning upon installation
- The applet is not notified if other actors change the status of the touchscreen device
Therefore I am looking for a way to automatically (e.g. pubsub subscription or DBus) receive notification about status changes of my touchscreen X device.
Extra nice would be a way to enable/disable the device through this other channel as well, so my applet is no longer marked as dangerous.