Created
July 21, 2011 05:18
-
-
Save alloy-d/1096541 to your computer and use it in GitHub Desktop.
udev rules and script for disabling a Synaptics touchpad when an external mouse is plugged in.
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
KERNEL!="hiddev[0-9]", GOTO="disable_touchpad_with_external_mouse_end" | |
ACTION=="add", RUN+="/usr/local/bin/touchpad off" | |
ACTION=="remove", RUN+="/usr/local/bin/touchpad on" | |
LABEL="disable_touchpad_with_external_mouse_end" |
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 | |
export DISPLAY=${DISPLAY:-":0"} | |
case "$1" in | |
on) | |
synclient TouchpadOff=0 | |
;; | |
off) | |
synclient TouchpadOff=1 | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment