summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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")