Created
November 20, 2017 23:40
-
-
Save fidelisrafael/29e079d3b2c69fca4e8425b72f86d576 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)
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 | |
# 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