diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-02-09 21:20:37 +0100 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-02-09 21:20:37 +0100 |
commit | 869e6f316dedbfde6e49fa57a4482a5105f570bb (patch) | |
tree | 7b2f0f922041ef14c764cdedf7b98350691ca5df /.scripts | |
parent | 76f8d6c37ee450560908ecc78163224402b210f8 (diff) | |
download | dotfiles-869e6f316dedbfde6e49fa57a4482a5105f570bb.tar.gz dotfiles-869e6f316dedbfde6e49fa57a4482a5105f570bb.tar.bz2 dotfiles-869e6f316dedbfde6e49fa57a4482a5105f570bb.zip |
toggle_touchpad.sh: Use synclient
Thats easier and survives vt-switches.
Diffstat (limited to '.scripts')
-rwxr-xr-x | .scripts/toggle_touchpad.sh | 2 |
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") |