summaryrefslogtreecommitdiff
path: root/.scripts/toggle-touchpad-hypr
diff options
context:
space:
mode:
authorSaumit <justsaumit@protonmail.com>2025-03-01 03:03:33 +0530
committerSaumit <justsaumit@protonmail.com>2025-03-01 03:03:33 +0530
commit8bb24f0ed102d9470827c9c9145011d8e7165674 (patch)
tree22d9e173f401c10c2a34bbf02dbe3bbf675c1c14 /.scripts/toggle-touchpad-hypr
parent71f9a6547a4aa9e759c371e6bac496445c659ef9 (diff)
hypr+waybar+script: toggle keyboard
Diffstat (limited to '.scripts/toggle-touchpad-hypr')
-rwxr-xr-x.scripts/toggle-touchpad-hypr11
1 files changed, 11 insertions, 0 deletions
diff --git a/.scripts/toggle-touchpad-hypr b/.scripts/toggle-touchpad-hypr
new file mode 100755
index 0000000..8f65419
--- /dev/null
+++ b/.scripts/toggle-touchpad-hypr
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+
+CACHE_FILE="$XDG_CACHE_HOME/laptop-touchpad-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