From 869e6f316dedbfde6e49fa57a4482a5105f570bb Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Thu, 9 Feb 2012 21:20:37 +0100 Subject: toggle_touchpad.sh: Use synclient Thats easier and survives vt-switches. --- .scripts/toggle_touchpad.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to '.scripts') diff --git a/.scripts/toggle_touchpad.sh b/.scripts/toggle_touchpad.sh index aca2d56..64c018b 100755 --- a/.scripts/toggle_touchpad.sh +++ b/.scripts/toggle_touchpad.sh @@ -1,5 +1,7 @@ #!/bin/bash +exec synclient TouchpadOff=$((1-$(synclient | awk '/TouchpadOff/ { print $3 }'))) + device_id=$(xinput list | sed -n "s/^.*Synaptics.*id=\([^\t]*\).*$/\\1/p") enabled=$(xinput list-props $device_id | sed -n "s/^.*Device Enabled.*\t\(.*\)$/\\1/p") -- cgit