Created
May 6, 2019 17:50
-
-
Save gregtaole/370d4ecdf8dae54f2e2d07c1ad073627 to your computer and use it in GitHub Desktop.
Disable laptop touchpad when USB mouse is plugged
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
ACTION=="add", ATTRS{idVendor}=="093a", ATTRS{idProduct}=="2521", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="/home/dinervoid/.Xauthority", ENV{ID_CLASS}="mouse", RUN+="/home/dinervoid/Documents/udev_scripts/disable_touchpad.sh 1" | |
ACTION=="remove", ATTRS{idVendor}=="093a", ATTRS{idProduct}=="2521", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="/home/dinervoid/.Xauthority", ENV{ID_CLASS}="mouse", RUN+="/home/dinervoid/Documents/udev_scripts/disable_touchpad.sh 0" | |
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 | |
if [ $1 -eq 0 ]; then | |
/usr/bin/xinput enable "SynPS/2 Synaptics TouchPad" | |
else | |
/usr/bin/xinput disable "SynPS/2 Synaptics TouchPad" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment