aboutsummaryrefslogtreecommitdiff
path: root/scripts/toggle_syn_touchpad.sh
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2016-01-11 19:29:14 +0100
committerFlorian Fischer <florian.fl.fischer@fau.de>2016-01-11 19:35:22 +0100
commit6d2a88231a0257e8f21b29022f0b69c8a8f2231b (patch)
treec13d64b86f4b9a09ca5265818747e2c11f10bfcd /scripts/toggle_syn_touchpad.sh
parent667eb047290f24ddd3f90a3034fba917f40c5f12 (diff)
downloaddotfiles-6d2a88231a0257e8f21b29022f0b69c8a8f2231b.tar.gz
dotfiles-6d2a88231a0257e8f21b29022f0b69c8a8f2231b.zip
let scripts deciede on its own which shell they use
1) make all scripts executable 2) remove shells in exec calls 3) add toggle_touchpad script to repo
Diffstat (limited to 'scripts/toggle_syn_touchpad.sh')
-rwxr-xr-xscripts/toggle_syn_touchpad.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/toggle_syn_touchpad.sh b/scripts/toggle_syn_touchpad.sh
new file mode 100755
index 0000000..9cc88a9
--- /dev/null
+++ b/scripts/toggle_syn_touchpad.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+STATE=`synclient -l | grep TouchpadOff | awk '{ print $3 }'`;
+
+if [ "$STATE" == "0" ]; then
+synclient TouchpadOff=1; else
+synclient TouchpadOff=0
+fi
+
+
+# Forces break of touchpad functions while typing
+# 1 second follow interval.
+if [ "$STATE" == "1" ]; then
+syndaemon -i 1 -d; else
+killall syndaemon
+fi