aboutsummaryrefslogtreecommitdiffstats
path: root/docs/superpowers/specs/2026-09-12-window-switcher-design.md
AgeCommit message (Collapse)AuthorFilesLines
28 hoursdocs(window-switcher): an empty state, rather than opening on nothingDanilo M.1-0/+19
ALT + TAB with no windows would otherwise give a full-screen dim with nothing in it, which reads as a hang. It is reachable from a fresh session, and from closing the last window in the switcher itself, which stays open by design. It now says so instead. The empty state has no card to click, so the backdrop closes the overlay on click as well as on Escape. That applies generally, not only when there is nothing to show. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SYg4wYHq5XNbiVmMeKRb1S
28 hoursdocs(window-switcher): dispatch args are Lua, and focus raises in monocleDanilo M.1-6/+31
Two findings from testing against the running compositor, both of which would have cost time during implementation. Hyprland 0.56.2 evaluates dispatch arguments as Lua, so the form this design previously specified, dispatch focuswindow address:0x..., is a syntax error rather than a command. It fails silently unless stderr is read: the window does not focus and nothing is reported. hypr-windows.sh was written with hl.dsp.focus({ window = "..." }) for that reason, and this design had misread that as legacy oddity. The fullscreen batch sequence from that script is not carried over. Workspaces 1 and 8 are monocle and 4 and 5 are scrolling, so a stacked window is the normal case here rather than an edge case, and the worry was that focus would land without the window becoming visible. Tested with two stacked windows on workspace 1: focus alone raised the buried one, confirmed on screen in both directions, so no alterzorder and no batch sequence are needed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SYg4wYHq5XNbiVmMeKRb1S
28 hoursdocs(window-switcher): cards fit both orientations, and grow to a ceilingDanilo M.1-7/+32
The card cannot take its shape from its preview. DP-3 reports transform=1, so its windows are 1076x1916 portrait against 2556x1034 on DP-1, a 4.4x span of aspect ratio in one grid, and a fullscreen app on that monitor is portrait too. So the card is a fixed 16:10 box with the preview fitted inside it, which keeps rows aligned; sizing each card to its own preview would give ragged rows and break the alignment of the three text lines that makes the grid scannable. Cards now grow to fill their row up to 640px rather than sitting at a fixed size, so a lone window is shown large without a preview becoming a full-screen mirror of the window it stands for. Column count is the window count capped at six, centred, so one card sits dead centre and two straddle the middle. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SYg4wYHq5XNbiVmMeKRb1S
28 hoursdocs: design for the window-switcher componentDanilo M.1-0/+159
A full-screen grid of live window previews to replace the rofi list on ALT + TAB. The script it replaces is not broken, so this is an upgrade from a textual list to something that shows what is in each window. Settled during design: toggle-style rather than hold-and-release, since a missed ALT release would leave a stuck full-screen overlay; cards wrap into a grid rather than shrinking, so a high window count degrades by growing downwards; only special: workspaces are filtered, because jumping to another desktop is the point of a switcher. Feasibility was checked against quickshell 0.3.1 rather than assumed. ScreencopyView is compiled in and captured all four open windows, the scratchpad on special:special included, so hidden windows need no icon-only fallback. Hyprland.toplevels reads 0 until refreshToplevels() is called, and its address field omits the 0x that dispatches need. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SYg4wYHq5XNbiVmMeKRb1S