Last active
September 11, 2016 04:59
-
-
Save zgulde/786103de5c086dc7a4bedabba6b04e3b 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/bash | |
| # will disable or enable a touchpad device | |
| TOUCHPAD_ID="$(xinput list | grep -oi 'touchpad\s*id=[0-9]\{1,\}' | grep -o '[0-9]\{1,\}')" | |
| ENABLED="$(xinput list-props $TOUCHPAD_ID | grep -i 'device enabled' | grep -o '[0-9]$')" | |
| if [ $ENABLED -eq 1 ]; then | |
| xinput disable $TOUCHPAD_ID | |
| echo "Touchpad disabled." | |
| else | |
| xinput enable $TOUCHPAD_ID | |
| echo "Touchpad enabled." | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment