aboutsummaryrefslogtreecommitdiff
path: root/dotfiles
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
commit0e534357edd3ea85dfd96cc18fba3a9d13c56db6 (patch)
tree212430fb76e97d993c927175b3270cf5e62b2049 /dotfiles
parentad9d66c31f44457ac447f9419c90e1cf1b7b3950 (diff)
downloadarchsetup-0e534357edd3ea85dfd96cc18fba3a9d13c56db6.tar.gz
archsetup-0e534357edd3ea85dfd96cc18fba3a9d13c56db6.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-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