Created
March 14, 2018 15:28
-
-
Save apreiml/cdb3b903a37cfd0ff2462d35809eca75 to your computer and use it in GitHub Desktop.
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/sh | |
# Device id: xinput list | grep TouchPad | |
# Thinkpad Touchpad on T560: 11 | |
DEVICE_ID=11 | |
DEVICE_STATE=`xinput --list-props $DEVICE_ID | awk -F'\t' '/Device Enabled/ { print $3 }'` | |
if [ $DEVICE_STATE = 0 ]; then | |
xinput --enable $DEVICE_ID | |
else | |
xinput --disable $DEVICE_ID | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment