Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save alloy-d/1096541 to your computer and use it in GitHub Desktop.
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.
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"
#!/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