summaryrefslogtreecommitdiff
path: root/.scripts
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2010-12-02 14:51:40 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2010-12-02 14:51:40 +0100
commitcc6d77bac7e8ddce7c8d7bd31940729941a7cf02 (patch)
tree27b6ca50f0dab591edcbcfc30b39499278040b55 /.scripts
parent20cff57f2ec98be66edc88be035ba2a5d8f7f1c7 (diff)
downloaddotfiles-cc6d77bac7e8ddce7c8d7bd31940729941a7cf02.tar.gz
dotfiles-cc6d77bac7e8ddce7c8d7bd31940729941a7cf02.tar.bz2
dotfiles-cc6d77bac7e8ddce7c8d7bd31940729941a7cf02.zip
awesome: add toggle_touchpad keybinding
Diffstat (limited to '.scripts')
-rwxr-xr-x.scripts/toggle_touchpad.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/.scripts/toggle_touchpad.sh b/.scripts/toggle_touchpad.sh
new file mode 100755
index 0000000..aca2d56
--- /dev/null
+++ b/.scripts/toggle_touchpad.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+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")
+property=$(xinput list-props $device_id | sed -n "s/^.*Device Enabled (\([^)]*\)).*$/\\1/p")
+
+
+xinput set-prop $device_id $property $((1-enabled))