summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdot/local/bin/ttoggle18
1 files changed, 18 insertions, 0 deletions
diff --git a/dot/local/bin/ttoggle b/dot/local/bin/ttoggle
new file mode 100755
index 0000000..15110e6
--- /dev/null
+++ b/dot/local/bin/ttoggle
@@ -0,0 +1,18 @@
1#!/bin/sh
2
3touchdev=$(xinput list --name-only|grep touch) || exit
4
5touchdev_enabled()
6{
7 xinput list-props "$touchdev" | grep -q '(148):.1$'
8}
9
10if touchdev_enabled
11then
12 cmd=disable
13else
14 cmd=enable
15fi
16
17set -x
18xinput "$cmd" "$touchdev"