From 383f62ce905f98e50ba7846dd2edbe5940e1f3b9 Mon Sep 17 00:00:00 2001 From: The_miro Date: Tue, 28 Oct 2025 10:17:47 +0100 Subject: [PATCH] added touchpad toggle (default for TP T440P) --- desktopenvs/hyprland/hypr-usr/binds.conf | 3 ++- desktopenvs/hyprland/hypr-usr/input.conf | 6 +++++ .../scripts/hyprland-toggle-touchpad.sh | 25 +++++++++++++++++++ .../xfconf/xfce-perchannel-xml/thunar.xml | 2 +- 4 files changed, 34 insertions(+), 2 deletions(-) create mode 100755 desktopenvs/hyprland/scripts/hyprland-toggle-touchpad.sh diff --git a/desktopenvs/hyprland/hypr-usr/binds.conf b/desktopenvs/hyprland/hypr-usr/binds.conf index c7ffcec..f2e8b35 100644 --- a/desktopenvs/hyprland/hypr-usr/binds.conf +++ b/desktopenvs/hyprland/hypr-usr/binds.conf @@ -233,7 +233,7 @@ bind = $mainMod, W, exec, ~/Dotfiles/desktopenvs/hyprland/scripts/menu.sh #GROUPS bind = $mainMod ALT, C, togglegroup, -bind = $mainMod SHIFT, C, lockactivegroup, toggle +bind = $mainMod CTRL SHIFT, C, lockactivegroup, toggle bind = $mainMod SHIFT ALT, $navleft, movewindoworgroup, l bind = $mainMod SHIFT ALT, $navright, movewindoworgroup, r @@ -277,6 +277,7 @@ bind= $mainMod CTRL, I, exec, ~/Dotfiles/desktopenvs/hyprland/scripts/getispeed. bind= $mainMod CTRL, C, exec, dunstctl close-all bind= $mainMod CTRL, G, exec, ~/Dotfiles/desktopenvs/hyprland/scripts/onscreenkb.sh bind= $mainMod SHIFT, C, exec, ~/Dotfiles/desktopenvs/hyprland/scripts/caffeine.sh +bind= $mainMod SHIFT, X, exec, ~/Dotfiles/desktopenvs/hyprland/scripts/hyprland-toggle-touchpad.sh bind= $mainMod CTRL, W ,exec, hyprctl hyprsunset gamma +10 bind= $mainMod CTRL, S ,exec, hyprctl hyprsunset gamma -10 diff --git a/desktopenvs/hyprland/hypr-usr/input.conf b/desktopenvs/hyprland/hypr-usr/input.conf index 95c4eb9..0907043 100644 --- a/desktopenvs/hyprland/hypr-usr/input.conf +++ b/desktopenvs/hyprland/hypr-usr/input.conf @@ -14,3 +14,9 @@ input { natural_scroll = false } } + +#$LAPTOP_KB_ENABLED = true +#device { +# name = synaptics-tm3053-009 +# enabled = $LAPTOP_KB_ENABLED +#} diff --git a/desktopenvs/hyprland/scripts/hyprland-toggle-touchpad.sh b/desktopenvs/hyprland/scripts/hyprland-toggle-touchpad.sh new file mode 100755 index 0000000..cafa8e4 --- /dev/null +++ b/desktopenvs/hyprland/scripts/hyprland-toggle-touchpad.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +export STATUS_FILE="$XDG_RUNTIME_DIR/keyboard.status" + +enable_keyboard() { + printf "true" >"$STATUS_FILE" + notify-send -u normal "Enabling Touchpad" + hyprctl keyword '$LAPTOP_KB_ENABLED' "true" -r +} + +disable_keyboard() { + printf "false" >"$STATUS_FILE" + notify-send -u normal "Disabling Touchpad" + hyprctl keyword '$LAPTOP_KB_ENABLED' "false" -r +} + +if ! [ -f "$STATUS_FILE" ]; then + enable_keyboard +else + if [ $(cat "$STATUS_FILE") = "true" ]; then + disable_keyboard + elif [ $(cat "$STATUS_FILE") = "false" ]; then + enable_keyboard + fi +fi diff --git a/desktopenvs/hyprland/xfce4/xfconf/xfce-perchannel-xml/thunar.xml b/desktopenvs/hyprland/xfce4/xfconf/xfce-perchannel-xml/thunar.xml index a5056c1..96cdf4b 100644 --- a/desktopenvs/hyprland/xfce4/xfconf/xfce-perchannel-xml/thunar.xml +++ b/desktopenvs/hyprland/xfce4/xfconf/xfce-perchannel-xml/thunar.xml @@ -7,7 +7,7 @@ - +