From f87ff7e6af543939791f630cb78c1f1b6b8c0f8e Mon Sep 17 00:00:00 2001
From: Shubham Saini <pryr@pryr.xyz>
Date: Sun, 4 Apr 2021 16:19:57 +0530
Subject: touhcpad hotkey

---
 bin/.bin/touchpad           | 9 +++++++++
 sxhkd/.config/sxhkd/sxhkdrc | 4 ++++
 2 files changed, 13 insertions(+)
 create mode 100755 bin/.bin/touchpad

diff --git a/bin/.bin/touchpad b/bin/.bin/touchpad
new file mode 100755
index 0000000..bd647e5
--- /dev/null
+++ b/bin/.bin/touchpad
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+enabled=$(xinput --list-props ETPS/2\ Elantech\ Touchpad | grep "Device Enabled" | awk '{print $4}')
+
+if [ $enabled == 1 ]; then
+    xinput --disable ETPS/2\ Elantech\ Touchpad
+else
+    xinput --enable ETPS/2\ Elantech\ Touchpad
+fi
diff --git a/sxhkd/.config/sxhkd/sxhkdrc b/sxhkd/.config/sxhkd/sxhkdrc
index 188cc18..2feb00b 100755
--- a/sxhkd/.config/sxhkd/sxhkdrc
+++ b/sxhkd/.config/sxhkd/sxhkdrc
@@ -37,6 +37,10 @@ XF86AudioMicMute
 XF86Favorites
     ~/.bin/disp
 
+# touchpad
+control + XF86Favorites
+    ~/.bin/touchpad
+
 # brightness
 XF86MonBrightnessDown
     sudo ~/.bin/light d
-- 
cgit v1.2.3