Good work.
Device ID # can vary with hotplugging so it is better to use the <device name>.
For a touch toggle script you could use the following. Call it evdev_touch-toggle.sh or some such:
- Code: Select all
#!/bin/bash
## evdev touch toggle script
##
## For touch state notification use:
## sudo apt-get install libnotify-bin
## Otherwise comment (#) out the two notify-send lines.
## If installed see 'man notify-send'.
if [ -f /tmp/touch_off ]; then
xinput set-prop "Quanta OpticalTouchScreen" "Device Enabled" 1
notify-send -t 1500 "Quanta OpticalTouchScreen touch ON"
rm -f /tmp/touch_off && exit 0
else
xinput set-prop "Quanta OpticalTouchScreen" "Device Enabled" 0
notify-send -t 1500 "Quanta OpticalTouchScreen touch OFF"
echo 1 > /tmp/touch_off && exit 0
fi
Remember to make the script executable. You could place it in a launcher if wanted. Wonder if you can still drag a launcher into a panel for single click?