From 518349e4905e3d16a28a11cc8203c09738dfca5c Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 20 Feb 2026 17:53:02 +0100 Subject: [PATCH] Use new hyprland rules for changing the scrolltouchpad Closes #4670 --- migrations/1767138576.sh | 6 +++--- migrations/1771606249.sh | 9 +++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 migrations/1771606249.sh diff --git a/migrations/1767138576.sh b/migrations/1767138576.sh index 5df9ce2b..9771e316 100644 --- a/migrations/1767138576.sh +++ b/migrations/1767138576.sh @@ -1,9 +1,9 @@ echo "Update terminal scrolltouchpad setting to Hyprland 0.53 style" if grep -q "scrolltouchpad" ~/.config/hypr/input.conf; then - sed -Ei 's/^windowrule = scrolltouchpad ([^,]+), class:\(([^)]+)\)$/windowrule = match:class (\2), scroll_touchpad \1/' ~/.config/hypr/input.conf - sed -Ei 's/^windowrule = scrolltouchpad ([^,]+), class:([^ ]+)$/windowrule = match:class \2, scroll_touchpad \1/' ~/.config/hypr/input.conf - sed -Ei 's/^windowrule = scrolltouchpad ([^,]+), tag:terminal$/windowrule = match:class (Alacritty|kitty), scroll_touchpad 1.5\nwindowrule = match:class com.mitchellh.ghostty, scroll_touchpad 0.2/' ~/.config/hypr/input.conf + sed -Ei 's/^windowrule = scrolltouchpad ([^,]+), class:\(([^)]+)\)\s*$/windowrule = match:class (\2), scroll_touchpad \1/' ~/.config/hypr/input.conf + sed -Ei 's/^windowrule = scrolltouchpad ([^,]+), class:([^ ]+)\s*$/windowrule = match:class \2, scroll_touchpad \1/' ~/.config/hypr/input.conf + sed -Ei 's/^windowrule = scrolltouchpad ([^,]+), tag:terminal\s*$/windowrule = match:class (Alacritty|kitty), scroll_touchpad 1.5\nwindowrule = match:class com.mitchellh.ghostty, scroll_touchpad 0.2/' ~/.config/hypr/input.conf fi # Ensure we restart to pair new Hyprland settings with new version diff --git a/migrations/1771606249.sh b/migrations/1771606249.sh new file mode 100644 index 00000000..af341555 --- /dev/null +++ b/migrations/1771606249.sh @@ -0,0 +1,9 @@ +echo "Re-run scrolltouchpad migration for configs with trailing whitespace" + +if grep -q "scrolltouchpad" ~/.config/hypr/input.conf; then + sed -Ei 's/^windowrule = scrolltouchpad ([^,]+), class:\(([^)]+)\)\s*$/windowrule = match:class (\2), scroll_touchpad \1/' ~/.config/hypr/input.conf + sed -Ei 's/^windowrule = scrolltouchpad ([^,]+), class:([^ ]+)\s*$/windowrule = match:class \2, scroll_touchpad \1/' ~/.config/hypr/input.conf + sed -Ei 's/^windowrule = scrolltouchpad ([^,]+), tag:terminal\s*$/windowrule = match:class (Alacritty|kitty), scroll_touchpad 1.5\nwindowrule = match:class com.mitchellh.ghostty, scroll_touchpad 0.2/' ~/.config/hypr/input.conf + + omarchy-state set reboot-required +fi