Created
October 13, 2016 06:32
-
-
Save jorgecasas/8aacf0ee56c86918af2bcc9127fdce0d to your computer and use it in GitHub Desktop.
Touchpad disable / enable detecting if USB mouse is present
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 | |
list=`xinput --list | grep -i 'mouse'` | |
if [ ${#list} -eq 0 ]; then | |
exec `synclient touchpadoff=0` | |
notify-send "Touchpad on" "Mouse not present" | |
else | |
exec `synclient touchpadoff=1` | |
notify-send "Touchpad off" "Mouse present" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment