Skip to content

Add gaplessgrid layout: grid with stretched last row and aspect-driven columns - #1584

Draft
DocMAX wants to merge 1 commit into
mangowm:mainfrom
DocMAX:feat-gaplessgrid-layout
Draft

DocMAX wants to merge 1 commit into
mangowm:mainfrom
DocMAX:feat-gaplessgrid-layout

Conversation

@DocMAX

@DocMAX DocMAX commented Nov 3, 2026 •

Copy link
Copy Markdown

Adds a new gaplessgrid layout (GG, usable via setlayout, circle_layout and tag rules). It arranges windows like grid, except the last row always stretches to the full output width, so no space is wasted (3 clients: 2+1 fullscreen, 5: 3+2 halves, 7: 4+3).

The column count is picked by scoring candidates against 16:9 / 4:3 cell aspect ratios (weighted over full-row and last-row cells) instead of the fixed ceil(sqrt(n)) rule, keeping cells near standard media aspects on ultrawide and HiDPI screens. A single client and pairs always use the full area (no 0.9/0.65 centering like grid).

Rationale: plain grid centers a short last row at column width (overcols branch), and fair/tile do not fill the area either. gaplessgrid keeps every pixel covered.

Tested nested (wayland backend) with 1-8 clients per tag; mango -p clean; full ninja build with no new warnings.

@DreamMaoMao
DreamMaoMao force-pushed the main branch 2 times, most recently from 87812a1 to 15e7d36 Compare November 8, 2026 00:35
@DreamMaoMao
DreamMaoMao force-pushed the main branch 10 times, most recently from a785f26 to bd20e53 Compare November 23, 2026 03:37
@DreamMaoMao
DreamMaoMao force-pushed the main branch 3 times, most recently from 2c08cb8 to 39c9894 Compare November 25, 2026 05:14
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