diff options
| author | Craig Jennings <c@cjennings.net> | 2026-04-09 01:17:15 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-04-09 01:17:15 -0500 |
| commit | 67856b7037532aafe434f3b2341bcde3c2cc6357 (patch) | |
| tree | d100a88b75b38517da169d49b4cbd36ef9b3d7a4 /dotfiles | |
| parent | b6afb33999861080ddfa9b7193d45ef09253aee7 (diff) | |
| download | archsetup-67856b7037532aafe434f3b2341bcde3c2cc6357.tar.gz archsetup-67856b7037532aafe434f3b2341bcde3c2cc6357.zip | |
fix(hyprland): escape floating window focus trap in layout-navigate
layoutmsg cyclenext only operates on tiled windows, so $mod+J was a
no-op when focus was on a floating/pinned scratchpad. Detect floating
state and use cyclenext dispatcher instead.
Diffstat (limited to 'dotfiles')
| -rwxr-xr-x | dotfiles/hyprland/.local/bin/layout-navigate | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/dotfiles/hyprland/.local/bin/layout-navigate b/dotfiles/hyprland/.local/bin/layout-navigate index 07f748a..352db79 100755 --- a/dotfiles/hyprland/.local/bin/layout-navigate +++ b/dotfiles/hyprland/.local/bin/layout-navigate @@ -6,8 +6,19 @@ DIR="$1" MOVE="$2" +FLOATING=$(hyprctl activewindow -j | jq -r '.floating') LAYOUT=$(hyprctl getoption general:layout -j | jq -r '.str') +# If current window is floating, use cyclenext to reach tiled windows +if [ "$FLOATING" = "true" ] && [ "$MOVE" != "move" ]; then + if [ "$DIR" = "next" ]; then + hyprctl dispatch cyclenext tiled + else + hyprctl dispatch cyclenext prev tiled + fi + exit 0 +fi + case "$LAYOUT" in scrolling) # J (next) goes left, K (prev) goes right |
