diff options
| author | Craig Jennings <c@cjennings.net> | 2026-01-25 21:57:07 -0600 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-01-25 21:57:07 -0600 |
| commit | 4f30bd0ee49b21893616eb0aa9e07ed852228525 (patch) | |
| tree | 3f1b4c5529833bfc6d71b651b12d21b6108ec7b9 | |
| parent | ff88fc3cd752c34f364526683222deb0a7e5bbbf (diff) | |
fix(hyprland): preserve j/k direction in master layout
Swap directions only in scrolling layout, not master.
- Master: J=next (down), K=prev (up) - original behavior
- Scrolling: J=left, K=right - swapped for intuitive scroll
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
| -rw-r--r-- | dotfiles/hyprland/.config/hypr/hyprland.conf | 8 | ||||
| -rwxr-xr-x | dotfiles/hyprland/.local/bin/layout-navigate | 9 |
2 files changed, 9 insertions, 8 deletions
diff --git a/dotfiles/hyprland/.config/hypr/hyprland.conf b/dotfiles/hyprland/.config/hypr/hyprland.conf index bb099d8..df44e23 100644 --- a/dotfiles/hyprland/.config/hypr/hyprland.conf +++ b/dotfiles/hyprland/.config/hypr/hyprland.conf @@ -142,10 +142,10 @@ bind = $mod SHIFT, P, exec, waypaper # Window management (from DWM) # Layout-aware navigation (works across master, scrolling, hy3) -bind = $mod, J, exec, layout-navigate prev -bind = $mod, K, exec, layout-navigate next -bind = $mod SHIFT, J, exec, layout-navigate prev move -bind = $mod SHIFT, K, exec, layout-navigate next move +bind = $mod, J, exec, layout-navigate next +bind = $mod, K, exec, layout-navigate prev +bind = $mod SHIFT, J, exec, layout-navigate next move +bind = $mod SHIFT, K, exec, layout-navigate prev move bind = $mod, H, splitratio, -0.05 bind = $mod, L, splitratio, +0.05 bind = $mod, RETURN, layoutmsg, swapwithmaster master diff --git a/dotfiles/hyprland/.local/bin/layout-navigate b/dotfiles/hyprland/.local/bin/layout-navigate index ec2f659..4fc02c2 100755 --- a/dotfiles/hyprland/.local/bin/layout-navigate +++ b/dotfiles/hyprland/.local/bin/layout-navigate @@ -10,17 +10,18 @@ LAYOUT=$(hyprctl getoption general:layout -j | jq -r '.str') case "$LAYOUT" in scrolling) + # Swap directions: J (next) goes left, K (prev) goes right if [ "$MOVE" = "move" ]; then if [ "$DIR" = "next" ]; then - hyprctl dispatch layoutmsg movewindowto r - else hyprctl dispatch layoutmsg movewindowto l + else + hyprctl dispatch layoutmsg movewindowto r fi else if [ "$DIR" = "next" ]; then - hyprctl dispatch layoutmsg focus r - else hyprctl dispatch layoutmsg focus l + else + hyprctl dispatch layoutmsg focus r fi fi ;; |
