From 5477bf4a366dd2038b144aa542ce3785f205f368 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Fri, 24 Apr 2026 07:36:47 -0500 Subject: fix(hyprland): Escape special workspace on navigate When focus is inside a special workspace (e.g. special:stash), layoutmsg cyclenext/cycleprev only operates within that workspace, trapping $mod+J inside the scratchpad overlay. Detect workspace name starting with "special:" on focus navigation (not move), toggle the overlay off first, re-read active window state, then fall through to the normal layout/floating branches. Add unit tests with a fake hyprctl harness in tests/layout-navigate/. ``` --- todo.org | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'todo.org') diff --git a/todo.org b/todo.org index 4cfc5e0..b2b9f29 100644 --- a/todo.org +++ b/todo.org @@ -375,6 +375,24 @@ Detect NVIDIA GPU and warn user about potential Wayland issues: - Document required env vars (LIBVA_DRIVER_NAME, GBM_BACKEND, etc.) - Prompt to continue or abort if NVIDIA detected +** DONE [#B] Extend layout-navigate to escape special workspaces +CLOSED: [2026-04-19 Sun] +With the =special:stash= overlay visible and focus on a window inside it, +=$mod+J= was trapped because =layoutmsg cyclenext= only operates within the +current workspace. The 2026-04-09 fix handled floating→tiled but not +special-workspace→regular. + +Fix in =dotfiles/hyprland/.local/bin/layout-navigate=: when the active +window's =workspace.name= begins with =special:= and the user is navigating +focus (not moving), dispatch =togglespecialworkspace = first, re-read +activewindow state, then fall through to the existing floating/layout +branches. Move variant (=$mod SHIFT J=) is intentionally left untouched so +moving a window out of a scratchpad remains a deliberate separate action. + +Unit tests live in =tests/layout-navigate/= (stdlib =unittest=, fakes +=hyprctl= via PATH). Run with: +=python3 -m unittest tests.layout-navigate.test_layout_navigate= + ** TODO [#B] Add org-capture popup frame on keyboard shortcut Set up a quick-capture popup using emacsclient that opens a small floating org-capture frame, with Hyprland window rules to float, size, and center it. -- cgit v1.2.3