Created
September 18, 2016 03:04
-
-
Save emmaly/072552a4e3410d1b6d5c70d733856f00 to your computer and use it in GitHub Desktop.
Toggle TouchPad device in Linux
This file contains hidden or 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 | |
TOUCHPADDEVICE=$(($(xinput list | grep -i touchpad | cut -d= -f2 | cut -d[ -f1)+0)) | |
TOUCHPADON=$(($(xinput list-props $TOUCHPADDEVICE | grep -i enable | cut -d: -f2)+0)) | |
if [ $TOUCHPADON -eq 1 ]; then | |
xinput disable $TOUCHPADDEVICE | |
else | |
xinput enable $TOUCHPADDEVICE | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment