From 8bb24f0ed102d9470827c9c9145011d8e7165674 Mon Sep 17 00:00:00 2001 From: Saumit Date: Sat, 1 Mar 2025 03:03:33 +0530 Subject: hypr+waybar+script: toggle keyboard --- .scripts/toggle-touchpad-hypr | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 .scripts/toggle-touchpad-hypr (limited to '.scripts/toggle-touchpad-hypr') 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 -- cgit v1.2.3