Compositor: niri or mango, judged on the best end state #37

Open
opened 2026-11-08 09:22:14 +01:00 by arne · 0 comments
Owner

The spaces map in #36 runs into the edge of what niri reports, so we checked whether mango (MangoWC) would be a better foundation. This issue judges both on the best desktop we could end up with, not on migration cost. It is written to be read without the earlier discussion.

What fjord needs from a compositor

  1. Dynamic spaces. They appear when used, vanish when empty, and there is always one empty space at the end. This is a hard requirement.
  2. Spaces with identity. A space can carry a name that survives it being emptied and renamed. Rex maps each session to a space by name (rexy-desk), and program status (#18) and the map's r rename rely on that.
  3. A custom overview (#36): a full-screen map, one row per space and one box per column. It shows an outline of what each screen shows and lets you move windows with Shift+H/J/K/L. Design canvas: https://claude.ai/artifact/KaPeJfZrCENeFE9QkN3fjV (board B, and "B · Map, crowded").
  4. Feel. The map moves the moment a key is pressed and animates on the same spring as the compositor. Held keys carry speed. That needs fast commands that stay in order.
  5. Nice to have: live window thumbnails in the map.

Findings

Tags: ran = seen running (niri 26.04 on the laptop and nested; mango 0.18.4 nested), src = read in source, unverified = inference.

Need niri 26.04 mango 0.18.4
Dynamic spaces Built in (ran) tag_gather=1: emptied spaces vanish and renumber, one past the last can be opened, and per-space layout moves along (ran)
Identity / names Runtime names, kept when empty; unset name → removed (ran) None. Tags are the fixed strings "1"…"31", there is no rename and no stable id, and an empty space can't persist (src)
Which columns a screen shows Not reported. tile_pos_in_workspace_view is null for every tiled window (ran) Exact for the space being viewed: real x/y/w/h, off-screen columns included (ran)
Spaces not being viewed Column/row and tile size for every window, kept current (ran) Positions go stale and can overlap. Stacks and the active window aren't reported (ran)
Act on any window by id Focus, move to another workspace and rename only. Column moves need focus (ran) Every dispatch takes client,<id>, but column moves silently do nothing on a hidden space (ran)
Events Typed deltas (WindowLayoutsChanged and others) (ran) Full snapshots only, about 3.5 per action (ran)
Commands niri msg is a process, ~24 ms each, and parallel calls arrive out of order (ran). A persistent socket should fix both (unverified) Socket, 0.5–0.9 ms, ordered when you wait for each reply (ran)
Animation Springs, which the shell already shares (Theme.spring*) Cubic bezier with a fixed duration. A retarget restarts the curve, so held keys lose speed (src)
Window thumbnails No per-window capture: no ext-image-copy-capture, only output screencopy (src: binary strings) ext-image-copy-capture with a toplevel source; captured windows on hidden spaces (ran). Quickshell 0.3.0 can't use it yet (ran)
Maturity Widely used, stable IPC One author wrote ~95% of the commits, roughly weekly releases

The full mango study, with source references for each claim, is still a local file: ask Arne for it.

The best end state on each

niri plus three changes, upstreamed if possible and carried as patches if not:

  1. Report the view: the scroll offset per workspace, or tile_pos_in_workspace_view for tiled windows. niri already computes this internally (compute_new_view_offset_*).
  2. Take --window-id on the column actions (move-column-left/right/to-index, consume, expel), as move-window-to-workspace already does.
  3. Per-window capture through ext-image-copy-capture with a toplevel source, for thumbnails.

All three expose things niri already has, without changing its model. With them, every need in the table is met, and the shell keeps sharing niri's springs.

mango plus the changes it would need:

  1. Named tags that persist while named (open PR #1092 is config-only).
  2. Layout kept current for spaces not being viewed, with stacks and the active window reported.
  3. Column moves on hidden spaces.
  4. Animations that carry speed across a retarget: a different animation model.
  5. Delta events (nice to have).

These go into mango's model, not just its reporting, and turn it into a fork of its core, against a project with one author that releases weekly.

Recommendation

Stay on niri, and get the three changes in. This is the better end state, not just the cheaper one:

  • niri's gaps are about what it reports. mango's are about how it models spaces and animation.
  • Identity, which Rex and the map depend on, is already right in niri and missing in mango.

Thumbnails are the only thing mango has that niri can't do today, and on niri it's change 3.

For discussion

  • Will niri upstream take changes 1 and 2? They're small. If not, are we willing to carry a niri fork?
  • Are thumbnails worth change 3, or is app and title per box enough for the map?
  • Anything in mango that would justify the model work above? Per-space layouts (14 layouts) and fullscreen covering the rail are the other differences found.

🤖 Generated with Claude Code

The spaces map in #36 runs into the edge of what niri reports, so we checked whether mango (MangoWC) would be a better foundation. This issue judges both on **the best desktop we could end up with, not on migration cost**. It is written to be read without the earlier discussion. ## What fjord needs from a compositor 1. **Dynamic spaces.** They appear when used, vanish when empty, and there is always one empty space at the end. This is a hard requirement. 2. **Spaces with identity.** A space can carry a name that survives it being emptied and renamed. Rex maps each session to a space by name (rexy-desk), and program status (#18) and the map's `r` rename rely on that. 3. **A custom overview (#36):** a full-screen map, one row per space and one box per column. It shows an outline of what each screen shows and lets you move windows with Shift+H/J/K/L. Design canvas: https://claude.ai/artifact/KaPeJfZrCENeFE9QkN3fjV (board B, and "B · Map, crowded"). 4. **Feel.** The map moves the moment a key is pressed and animates on the same spring as the compositor. Held keys carry speed. That needs fast commands that stay in order. 5. Nice to have: **live window thumbnails** in the map. ## Findings Tags: **ran** = seen running (niri 26.04 on the laptop and nested; mango 0.18.4 nested), **src** = read in source, **unverified** = inference. | Need | niri 26.04 | mango 0.18.4 | |---|---|---| | Dynamic spaces | Built in (ran) | `tag_gather=1`: emptied spaces vanish and renumber, one past the last can be opened, and per-space layout moves along (ran) | | Identity / names | Runtime names, kept when empty; unset name → removed (ran) | None. Tags are the fixed strings "1"…"31", there is no rename and no stable id, and an empty space can't persist (src) | | Which columns a screen shows | **Not reported.** `tile_pos_in_workspace_view` is null for every tiled window (ran) | Exact for the space being viewed: real x/y/w/h, off-screen columns included (ran) | | Spaces not being viewed | Column/row and tile size for every window, kept current (ran) | Positions go stale and can overlap. Stacks and the active window aren't reported (ran) | | Act on any window by id | Focus, move to another workspace and rename only. Column moves need focus (ran) | Every dispatch takes `client,<id>`, but column moves silently do nothing on a hidden space (ran) | | Events | Typed deltas (`WindowLayoutsChanged` and others) (ran) | Full snapshots only, about 3.5 per action (ran) | | Commands | `niri msg` is a process, ~24 ms each, and parallel calls arrive out of order (ran). A persistent socket should fix both (unverified) | Socket, 0.5–0.9 ms, ordered when you wait for each reply (ran) | | Animation | Springs, which the shell already shares (`Theme.spring*`) | Cubic bezier with a fixed duration. A retarget restarts the curve, so held keys lose speed (src) | | Window thumbnails | No per-window capture: no `ext-image-copy-capture`, only output screencopy (src: binary strings) | `ext-image-copy-capture` with a toplevel source; captured windows on hidden spaces (ran). Quickshell 0.3.0 can't use it yet (ran) | | Maturity | Widely used, stable IPC | One author wrote ~95% of the commits, roughly weekly releases | The full mango study, with source references for each claim, is still a local file: ask Arne for it. ## The best end state on each **niri plus three changes, upstreamed if possible and carried as patches if not:** 1. Report the view: the scroll offset per workspace, or `tile_pos_in_workspace_view` for tiled windows. niri already computes this internally (`compute_new_view_offset_*`). 2. Take `--window-id` on the column actions (`move-column-left/right/to-index`, consume, expel), as `move-window-to-workspace` already does. 3. Per-window capture through `ext-image-copy-capture` with a toplevel source, for thumbnails. All three expose things niri already has, without changing its model. With them, every need in the table is met, and the shell keeps sharing niri's springs. **mango plus the changes it would need:** 1. Named tags that persist while named (open PR #1092 is config-only). 2. Layout kept current for spaces not being viewed, with stacks and the active window reported. 3. Column moves on hidden spaces. 4. Animations that carry speed across a retarget: a different animation model. 5. Delta events (nice to have). These go into mango's model, not just its reporting, and turn it into a fork of its core, against a project with one author that releases weekly. ## Recommendation **Stay on niri, and get the three changes in.** This is the better end state, not just the cheaper one: - niri's gaps are about what it reports. mango's are about how it models spaces and animation. - Identity, which Rex and the map depend on, is already right in niri and missing in mango. Thumbnails are the only thing mango has that niri can't do today, and on niri it's change 3. ## For discussion - Will niri upstream take changes 1 and 2? They're small. If not, are we willing to carry a niri fork? - Are thumbnails worth change 3, or is app and title per box enough for the map? - Anything in mango that would justify the model work above? Per-space layouts (14 layouts) and fullscreen covering the rail are the other differences found. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
bases/fjord#37
No description provided.