Create a file ~/disabletouch.sh
Create a autostart file ~/.config/autostart/disabletouch.sh.desktop
Contents are of these files are present in this gist.
#!/usr/bin/env bash | |
# Python one-liners are ugly | |
# xinput --list | python -c 'import sys; import re;[print(m.group(1)) for m in [re.search(r"ELAN Touchscreen.*id=(\d+).*", l) for l in sys.stdin] if m]' | |
# xinput --list | python -c 'import sys; import re; list(map(lambda m: print(m.group(1)), filter(lambda x: x, map(lambda l: re.search(r"ELAN Touchscreen.*id=(\d+).*", l), sys.stdin))))' | |
# Using good old bash pipes | |
xinput disable $(xinput --list | grep 'ELAN Touchscreen' | cut -d= -f2 | cut -f1) | |
[Desktop Entry] | |
Type=Application | |
Exec=/home/user/disabletouch.sh | |
Hidden=false | |
NoDisplay=false | |
X-GNOME-Autostart-enabled=true | |
Name[en_US]=disable-touch | |
Name=disable-touch | |
Comment[en_US]=Disable ELAN Touch Screen | |
Comment=Disable ELAN Touch Screen |