From cc6d77bac7e8ddce7c8d7bd31940729941a7cf02 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Thu, 2 Dec 2010 14:51:40 +0100 Subject: awesome: add toggle_touchpad keybinding --- .scripts/toggle_touchpad.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 .scripts/toggle_touchpad.sh (limited to '.scripts') 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)) -- cgit