summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaumit <justsaumit@protonmail.com>2025-02-23 16:23:16 +0530
committerSaumit <justsaumit@protonmail.com>2025-02-23 16:23:16 +0530
commit71f9a6547a4aa9e759c371e6bac496445c659ef9 (patch)
tree7adf3bcd268cd7b508ef293f194a3cc690d00ee1
parenta9950e07cb2b662fa88b32a9e2e277676446a206 (diff)
hypr: Script to disable touchpad during keybrHEADmain
-rw-r--r--.config/hypr/hyprland.conf6
-rwxr-xr-x.scripts/touchpad-disable-hypr11
2 files changed, 17 insertions, 0 deletions
diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf
index 9b32c43..66b5163 100644
--- a/.config/hypr/hyprland.conf
+++ b/.config/hypr/hyprland.conf
@@ -206,6 +206,12 @@ binds {
# sensitivity = -0.5
#}
+$TOUCHPAD_ENABLED = true
+device {
+ name = pnp0c50:0d-06cb:cebd-touchpad
+ enabled = $TOUCHPAD_ENABLED
+}
+
###################
### KEYBINDINGS ###
diff --git a/.scripts/touchpad-disable-hypr b/.scripts/touchpad-disable-hypr
new file mode 100755
index 0000000..d6f634c
--- /dev/null
+++ b/.scripts/touchpad-disable-hypr
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+
+CACHE_FILE="$XDG_CACHE_HOME/laptop-keyboard-disabled"
+
+if [ -f "$CACHE_FILE" ] ;then
+ rm "$CACHE_FILE"
+ hyprctl keyword -r '$TOUCHPAD_ENABLED' "true"
+else
+ touch "$CACHE_FILE"
+ hyprctl keyword -r '$TOUCHPAD_ENABLED' "false"
+fi