Skip to content

Instantly share code, notes, and snippets.

@hadess
Created October 1, 2013 14:30
Show Gist options
  • Save hadess/6779414 to your computer and use it in GitHub Desktop.
Save hadess/6779414 to your computer and use it in GitHub Desktop.
This script disables the right-click area on Thinkpad touchpads, so as to require either the physical right-click button above it to be clicked, or to use a two-finger click. This matches the behaviour of touchpads on Macs (which I'm more used to).
#!/bin/sh
#
# This script disables the right-click area on Thinkpad touchpads, so as
# to require either the physical right-click button above it to be clicked,
# or to use a two-finger click. This matches the behaviour of touchpads
# on Macs (which I'm more used to).
#
# Set the script to be used with:
# gsettings set org.gnome.settings-daemon.peripherals.input-devices hotplug-command /path/to/script/input-devices.sh
#
args=`getopt "t:i:" $*`
set -- $args
while [ $# -gt 0 ]
do
case $1 in
-t)
shift;
type="$1"
;;
-i)
shift;
id="$1"
;;
--)
shift;
device="$@"
break;
;;
*)
echo "Unknown option $1";
exit 1
;;
esac
shift
done
if test $type = "added" -o $type = "present"; then
if test "$device" = "SynPS/2 Synaptics TouchPad"; then
synclient RightButtonAreaLeft=0 RightButtonAreaTop=0
fi
fi
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment