Skip to content

Wrap windows within each workspace card - #8

Merged
nnthnn merged 1 commit into
mainfrom
feat/wrap-windows-within-desktops
Nov 11, 2026
Merged

nnthnn merged 1 commit into
mainfrom
feat/wrap-windows-within-desktops

Conversation

@nnthnn

@nnthnn nnthnn commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Summary

Workspace cards now reflow their windows into an aspect-preserving wrapping grid instead of reproducing the compositor's exact geometry. A workspace with several side-by-side tiles no longer renders as a thin strip, so the card's space is used much better.

Changes

  • Add appearance.wrap_windows (default true); setting it to false restores the previous geometry-preserving layout.
  • Move thumbnail placement into src/layout.rs; rendering and pointer hit-testing now consume the same rectangles.
  • Choose the grid's column count by maximizing how much card area the aspect-fitted thumbnails cover, reflow in reading order, and center a short final row.
  • Update the example config, configuration docs, README, development notes, and AGENTS.md invariants.
  • Add unit tests for wrap selection, aspect preservation, card bounds, reading order, geometry fallback, config parsing, and hit-testing.
  • Add scripts/try-wrap.sh / just try-wrap as a live Hyprland/Sway harness with an isolated config.

Testing

  • just check — formatting, clippy with -D warnings, and 92 unit tests pass.
  • cargo build --release --locked passes.
  • shellcheck scripts/try-wrap.sh passes.
  • Live overlay verification (requires Hyprland/Sway): just try-wrap, then just try-wrap geometry to compare with the old layout; clean up with just try-wrap clean.

Reproduce the compositor's geometry only when `appearance.wrap_windows` is
false. The default now reflows windows into an aspect-preserving grid that
picks the column count using the most card space, so a row of tall tiles no
longer renders as a thin strip.

Move placement into `src/layout.rs` so rendering and pointer hit-testing share
the same rectangles, and add `scripts/try-wrap.sh` / `just try-wrap` for a live
overlay check against an isolated config.
@nnthnn
nnthnn merged commit a5a668f into main Nov 11, 2026
3 checks passed
@nnthnn
nnthnn deleted the feat/wrap-windows-within-desktops branch November 11, 2026 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant