Last active
November 20, 2017 23:41
-
-
Save fidelisrafael/56d954c2627eabfad3321e4a50e237e8 to your computer and use it in GitHub Desktop.
Disable touchscreen on OpenSuse Leap 42.2 and others linux distros (ATTENTION: You must install `xinput` package for your distro) Original: https://ubuntuforums.org/showthread.php?t=2100744
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# switch_touchscreen.sh | |
# https://ubuntuforums.org/showthread.php?t=2100744 | |
# Use `xinput --list` to list all devices and find your touchscreen | |
# sudo chmod a+x switch_touchscreen.sh | |
DEVICE="Atmel Atmel maXTouch Digitizer" | |
STATUS=`xinput list-props "$DEVICE" | grep 'Device Enabled' | sed 's/.*\([0-9]\)$/\1/'` | |
if [ "$STATUS" = "1" ] | |
then | |
xinput disable 'Atmel Atmel maXTouch Digitizer' | |
echo "Touch-screen disabled" | |
elif [ "$STATUS" = "0" ] | |
then | |
xinput enable 'Atmel Atmel maXTouch Digitizer' | |
echo "Touch-screen enabled" | |
else | |
echo "Error : bad argument" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment