summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2020-01-19 13:54:45 -0500
committerAndrew Cady <d@jerkface.net>2020-01-19 13:54:45 -0500
commit871105cb4a210849c78a94a0a1023c2ed8ff5bc6 (patch)
tree07f7d3fceee1055790ea55f2c881b635a179cfea
parentefda41ee6705200aa2dfd76542a55de53f0f0a33 (diff)
add ttoggle
-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"