summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2012-02-09 21:20:37 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-02-09 21:20:37 +0100
commit869e6f316dedbfde6e49fa57a4482a5105f570bb (patch)
tree7b2f0f922041ef14c764cdedf7b98350691ca5df
parent76f8d6c37ee450560908ecc78163224402b210f8 (diff)
downloaddotfiles-869e6f316dedbfde6e49fa57a4482a5105f570bb.tar.gz
dotfiles-869e6f316dedbfde6e49fa57a4482a5105f570bb.tar.bz2
dotfiles-869e6f316dedbfde6e49fa57a4482a5105f570bb.zip
toggle_touchpad.sh: Use synclient
Thats easier and survives vt-switches.
-rwxr-xr-x.scripts/toggle_touchpad.sh2
1 files changed, 2 insertions, 0 deletions
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")