2

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.

aef
  • 1,047
  • 2
    look at my answer and examples here. Your applet could listen itself to XInput events, which go through the common X11 connection. –  Jul 15 '19 at 09:48
  • Seems promising, I'll have a look at it later. – aef Jul 15 '19 at 09:52

0 Answers0