summaryrefslogtreecommitdiff
path: root/dotfiles/hyprland
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-04-09 01:17:15 -0500
committerCraig Jennings <c@cjennings.net>2026-04-09 01:17:15 -0500
commitac9277952bc8e949d3b92de05063d2ff3db9fde1 (patch)
tree212430fb76e97d993c927175b3270cf5e62b2049 /dotfiles/hyprland
parentcdf3a1b340cc8441ec9b917120d1e2ca5de0aea0 (diff)
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/hyprland')
-rwxr-xr-xdotfiles/hyprland/.local/bin/layout-navigate11
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