aboutsummaryrefslogtreecommitdiff
path: root/bin/touchpad-enable-tap
diff options
context:
space:
mode:
authorRaul Benencia <rul@kalgan.cc>2020-05-24 13:44:14 -0700
committerRaul Benencia <rul@kalgan.cc>2020-05-24 13:47:59 -0700
commit546a3a211a0d59f14edbd97c1990476e84a46247 (patch)
treec5709cc4a8f7b0f39e1cb023f0f6b03bf749272e /bin/touchpad-enable-tap
parent3589f3e66769e87831e9f31fb3493064dd3ce73e (diff)
Add bin/ repo from home-bin/ repo
Diffstat (limited to 'bin/touchpad-enable-tap')
-rwxr-xr-xbin/touchpad-enable-tap7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/touchpad-enable-tap b/bin/touchpad-enable-tap
new file mode 100755
index 0000000..dcd530f
--- /dev/null
+++ b/bin/touchpad-enable-tap
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if xinput list | grep -iq "touchpad"; then
+ device_id=$(xinput list | grep -i touchpad | awk '{print $6}' | sed 's/id=//')
+ option_id=$(xinput list-props $device_id | grep -i 'Tapping Enabled' | head -n1 | awk '{print $4}' | tr -d '():')
+ xinput set-prop $device_id $option_id 1
+fi
nihil fit ex nihilo