Created
February 14, 2011 16:55
-
-
Save Soft/826152 to your computer and use it in GitHub Desktop.
Enables and Disables mouse
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 | |
| state=`xinput --list-props $1 | sed -nr "s/.*Enabled \([0-9]+\):\s+([0-1]).*/\1/p"` | |
| if [ "$state" = "1" ]; then | |
| xinput --set-prop $1 "Device Enabled" 0 | |
| else | |
| xinput --set-prop $1 "Device Enabled" 1 | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment