summaryrefslogtreecommitdiff
path: root/.scripts
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2012-03-23 10:50:43 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-03-23 10:50:43 +0100
commit450e2704dd5053186a0d30a01ff995ceac17bc57 (patch)
treedb06409e39b0d9dd3c5d1e6760ad8f008b6923b9 /.scripts
parent7146c01e6f883351ff7aca7172d3ec334a76ac7a (diff)
downloaddotfiles-450e2704dd5053186a0d30a01ff995ceac17bc57.tar.gz
dotfiles-450e2704dd5053186a0d30a01ff995ceac17bc57.tar.bz2
dotfiles-450e2704dd5053186a0d30a01ff995ceac17bc57.zip
toggle_touchpad.sh: Exit if synclient is not installed
Diffstat (limited to '.scripts')
-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 64c018b..21e4e02 100755
--- a/.scripts/toggle_touchpad.sh
+++ b/.scripts/toggle_touchpad.sh
@@ -1,5 +1,7 @@
#!/bin/bash
+which synclient &> /dev/null || exit
+
exec synclient TouchpadOff=$((1-$(synclient | awk '/TouchpadOff/ { print $3 }')))
device_id=$(xinput list | sed -n "s/^.*Synaptics.*id=\([^\t]*\).*$/\\1/p")