atagen

monolith

public
Star0
Watch0
6b46a697b9bc2c24457647e0f82f743c477b68f4
1
ssh://brewery@pls.lobotomise.me:33/atagen/monolith.git

Blame: design/decisions.md

57f44a63d99fatagen2026-10-16 05:34 UTC1
# monolith design decisions
57f44a63d99fatagen2026-10-16 05:34 UTC2
57f44a63d99fatagen2026-10-16 05:34 UTC3
Running log of settled decisions and open questions. Research backing lives in `research/`.
57f44a63d99fatagen2026-10-16 05:34 UTC4
57f44a63d99fatagen2026-10-16 05:34 UTC5
## Settled
57f44a63d99fatagen2026-10-16 05:34 UTC6
57f44a63d99fatagen2026-10-16 05:34 UTC7
### Project
57f44a63d99fatagen2026-10-16 05:34 UTC8
- smithay based, Vulkan renderer, EUPL. jay/wry are reference only, nothing is copied.
57f44a63d99fatagen2026-10-16 05:34 UTC9
- calloop event loop. jay's async runtime is not ported. Its phase ordering (event handling, layout, post-layout, present) is reproduced as fixed stages in the post-dispatch pipeline.
57f44a63d99fatagen2026-10-16 05:34 UTC10
- No programmable layouts. TOML config, no scripting.
57f44a63d99fatagen2026-10-16 05:34 UTC11
- Tree nodes and windows live in generational slotmaps referenced by typed keys, not `Rc` graphs.
57f44a63d99fatagen2026-10-16 05:34 UTC12
57f44a63d99fatagen2026-10-16 05:34 UTC13
### Tags
57f44a63d99fatagen2026-10-16 05:34 UTC14
- Each window carries exactly one tag. Several tags can be viewed at once.
57f44a63d99fatagen2026-10-16 05:34 UTC15
- Tag names are global, view state is per output (model B). "View on all outputs" is a command built on top.
57f44a63d99fatagen2026-10-16 05:34 UTC16
- A "homeless" tag is immutable and always viewed. New windows land there unless a rule or launch context says otherwise. Hiding a window means moving it to an unviewed tag.
57f44a63d99fatagen2026-10-16 05:34 UTC17
- Windows are bound to an output. New homeless windows go to the output that was active when the spawn was requested.
57f44a63d99fatagen2026-10-16 05:34 UTC18
- Launch context. Windows are placed on the tag and output that were active when they were launched, not where focus is when they map. Child windows and windows of child processes inherit the parent's tag and output. A compositor `spawn` command is acceptable as the launch path.
944fc4782ac3atagen2026-10-16 08:09 UTC19
- Layout state is one tree per output, filtered by viewed tags (see Planner section).
57f44a63d99fatagen2026-10-16 05:34 UTC20
- Unplug moves windows to an output viewing their tag, otherwise the tag is disabled there. Replug restores windows that left because of the unplug.
57f44a63d99fatagen2026-10-16 05:34 UTC21
- Tag order is invocation order, remembered, with a reordering command.
57f44a63d99fatagen2026-10-16 05:34 UTC22
- Sticky flag exists. Scratchpads are floating sticky sets of windows. Addressing a scratchpad cycles on, next window, ..., off, with dimensions kept. A sticky scratchpad stays on the output it was last summoned to. A dismiss-scratchpad command takes an optional target, defaulting to the last active.
57f44a63d99fatagen2026-10-16 05:34 UTC23
- Tags are exposed through ext-workspace-v1, one group per output, one workspace per tag per output.
57f44a63d99fatagen2026-10-16 05:34 UTC24
57f44a63d99fatagen2026-10-16 05:34 UTC25
### Layout
944fc4782ac3atagen2026-10-16 08:09 UTC26
- One tree per output, edited by the user, not derived from window count. Each tag starts as its own row.
57f44a63d99fatagen2026-10-16 05:34 UTC27
- Child splits run on the axis opposite their parent. Flipping orientation transposes the whole tree. Orientation is presentation only.
944fc4782ac3atagen2026-10-16 08:09 UTC28
- Viewing several tags shows the projection of the shared tree. Windows can be interspersed freely. No positional L/C/R merging.
57f44a63d99fatagen2026-10-16 05:34 UTC29
- An "expand" command at any tree level lets one window or subtree fill its slot. Autotiling on merge is a possible experiment.
57f44a63d99fatagen2026-10-16 05:34 UTC30
- Floating windows allowed. No pure floating mode.
57f44a63d99fatagen2026-10-16 05:34 UTC31
- A "deck" monocle (stacked windows with visible edges, selected window popped out) is a later container mode.
57f44a63d99fatagen2026-10-16 05:34 UTC32
57f44a63d99fatagen2026-10-16 05:34 UTC33
### Animation
57f44a63d99fatagen2026-10-16 05:34 UTC34
- Animate by default. No animation under tearing or for fullscreen scanout, or the texture freezes until done.
57f44a63d99fatagen2026-10-16 05:34 UTC35
- Bezier curves with velocity-matched retargeting on interrupt. Springs may be supported too.
57f44a63d99fatagen2026-10-16 05:34 UTC36
- Every animation, and every phase of a multiphase plan, takes exactly its configured `t`. Plan length is `phases * t`.
57f44a63d99fatagen2026-10-16 05:34 UTC37
- Interruption restarts from the current visual position and must stay continuous under repeated interruption.
57f44a63d99fatagen2026-10-16 05:34 UTC38
- wry `master` (8b7ad7e6) is a worked example of multiphase rules, not law. monolith needs a new planner that handles diagonal moves, cross-output moves and large tag-merge motion groups.
57f44a63d99fatagen2026-10-16 05:34 UTC39
- Old textures are held during resize, oversize areas fill clamp-to-edge. Alpha blending and transition shaders (wipe, crossfade) are allowed for content swaps.
57f44a63d99fatagen2026-10-16 05:34 UTC40
- Animation starts without waiting for clients. A short timeout is acceptable.
57f44a63d99fatagen2026-10-16 05:34 UTC41
- Sample animations at predicted presentation time.
57f44a63d99fatagen2026-10-16 05:34 UTC42
- Geometry is subpixel (floats), rounded to physical pixels only at render.
57f44a63d99fatagen2026-10-16 05:34 UTC43
57f44a63d99fatagen2026-10-16 05:34 UTC44
### Rendering
57f44a63d99fatagen2026-10-16 05:34 UTC45
- Individually rounded corners, borders, custom transition shaders (niri style). No user-facing transparency, blur or shadows. Normal alpha blending of client content is supported.
57f44a63d99fatagen2026-10-16 05:34 UTC46
- Fullscreen drops rounding.
57f44a63d99fatagen2026-10-16 05:34 UTC47
57f44a63d99fatagen2026-10-16 05:34 UTC48
### Decorations
57f44a63d99fatagen2026-10-16 05:34 UTC49
- Server-side only, no titlebars in v1. Minimal i3-style titles possibly later.
57f44a63d99fatagen2026-10-16 05:34 UTC50
- Advertise xdg-decoration and org_kde_kwin_server_decoration_manager defaulting to SERVER. Claim server-side and draw only borders.
57f44a63d99fatagen2026-10-16 05:34 UTC51
- Send all four tiled states plus xdg-shell v7 constrained states (niri's "no CSD" signal).
57f44a63d99fatagen2026-10-16 05:34 UTC52
57f44a63d99fatagen2026-10-16 05:34 UTC53
### IPC
57f44a63d99fatagen2026-10-16 05:34 UTC54
- Wayland protocols for things bars consume (ext-workspace, foreign-toplevel).
57f44a63d99fatagen2026-10-16 05:34 UTC55
- Control and scripting over a unix socket speaking versioned JSONL.
57f44a63d99fatagen2026-10-16 05:34 UTC56
57f44a63d99fatagen2026-10-16 05:34 UTC57
### Hardware and performance
57f44a63d99fatagen2026-10-16 05:34 UTC58
- NVIDIA first, must also work on Intel and AMD. An old Intel laptop is available for testing.
57f44a63d99fatagen2026-10-16 05:34 UTC59
- Hybrid laptops out of v1, but per-output render GPU stays in the data model.
57f44a63d99fatagen2026-10-16 05:34 UTC60
- VRR soon. HDR later, with room left in the color path.
57f44a63d99fatagen2026-10-16 05:34 UTC61
- Targets. Compositor CPU per frame p99 under 0.5 ms. Render to scanout at most 1 vblank with deadline scheduling. Fullscreen direct scanout plus tearing adds zero compositor frames. No dropped animation frames at 360 Hz.
57f44a63d99fatagen2026-10-16 05:34 UTC62
- lavapipe golden tests render to plain Vulkan images, not dmabuf.
57f44a63d99fatagen2026-10-16 05:34 UTC63
57f44a63d99fatagen2026-10-16 05:34 UTC64
### Taken from jay/wry (as designs)
57f44a63d99fatagen2026-10-16 05:34 UTC65
1. Deadline frame scheduler, running from flip timestamps on NVIDIA.
57f44a63d99fatagen2026-10-16 05:34 UTC66
2. Off-thread shm upload with commit blocked until done.
57f44a63d99fatagen2026-10-16 05:34 UTC67
3. Vulkan renderer internals, with syncobj handled via DRM ioctls plus binary sync_file semaphores.
57f44a63d99fatagen2026-10-16 05:34 UTC68
4. Commit blocker taxonomy.
57f44a63d99fatagen2026-10-16 05:34 UTC69
5. Two-timeline tree, transactions.
57f44a63d99fatagen2026-10-16 05:34 UTC70
6. In-process integration test harness.
57f44a63d99fatagen2026-10-16 05:34 UTC71
7. Small items (SCHED_RR with reset-on-fork, Tracy, KMS hygiene, VRR cursor throttling, lazy Xwayland).
57f44a63d99fatagen2026-10-16 05:34 UTC72
57f44a63d99fatagen2026-10-16 05:34 UTC73
## Open
57f44a63d99fatagen2026-10-16 05:34 UTC74
57f44a63d99fatagen2026-10-16 05:34 UTC75
- None. Crates and milestones are in `plan.md`.
57f44a63d99fatagen2026-10-16 05:34 UTC76
57f44a63d99fatagen2026-10-16 05:34 UTC77
## Settled late
57f44a63d99fatagen2026-10-16 05:34 UTC78
57f44a63d99fatagen2026-10-16 05:34 UTC79
- Interrupts replan, they never stack. No plan-length cap.
57f44a63d99fatagen2026-10-16 05:34 UTC80
- Velocity matching is best-effort, applied only where the replan continues the current axis.
57f44a63d99fatagen2026-10-16 05:34 UTC81
- Launch context resolves through a graceful ranking. Window rule, xdg-activation token, parent toplevel, tracked systemd scope or cgroup, PID ancestry, focus at map time. The target is where the user was when the launch command began. Windows placed on an unviewed tag mark it urgent.
57f44a63d99fatagen2026-10-16 05:34 UTC82
- Nested sessions are a first-class, permanently supported backend.
3a1eef6bf10batagen2026-10-16 10:21 UTC83
- A launch belongs to the focused window's tag, unless that is homeless, then to the first viewed tag. Homeless is always on screen, so focusing its windows does not mean the user left their tag.
304131a5a1b5atagen2026-10-16 22:41 UTC84
- VRR defaults to `fullscreen`, on only while a fullscreen window shows on a capable output. Under VRR frames go out as soon as there is something new, and cursor-only frames are capped at 60 Hz.
304131a5a1b5atagen2026-10-16 22:41 UTC85
- Layer-shell exclusive zones are insets on the layout output, so fullscreen still covers the whole output. The top layer hides under fullscreen, the overlay layer does not.
304131a5a1b5atagen2026-10-16 22:41 UTC86
- An activation token takes focus only if monolith made it or its requester held the keyboard, and only within 10 s. Otherwise the window is marked urgent. A token arriving before a window's first buffer may still move it to its launch context unless a rule placed it.
304131a5a1b5atagen2026-10-16 22:41 UTC87
- Screen capture renders the scene again into the client's buffer. A session's first frame comes at once, later frames wait for the output to draw something new.
304131a5a1b5atagen2026-10-16 22:41 UTC88
- Xwayland is native, not xwayland-satellite, so X11 games keep a direct path for M8 tearing work. monolith owns the X socket and spawns Xwayland on the first connection.
cd7085e54c88atagen2026-10-16 06:58 UTC89
cd7085e54c88atagen2026-10-16 06:58 UTC90
### Planner (see `planner.html`)
cd7085e54c88atagen2026-10-16 06:58 UTC91
- Orthogonal style (one axis per window per phase) is the default and flagship look. Direct is a toggle.
cd7085e54c88atagen2026-10-16 06:58 UTC92
- Shared-separator rule, plans of 1 to 4 phases, the 4-phase grid guarantees a plan for any input. Pinch and lerp are safety nets only.
4444c779eb48atagen2026-10-16 12:07 UTC93
- Window moves and container moves both exist as commands. A window move either swaps with its neighbour or merges into its lane, chosen by `general.move`, and `invert-move` does the other one for the next move only. The default lives in config rather than in a runtime toggle. Moving a tag directionally was rejected because interspersed tags have no single shape to move. Tag reordering only changes tag order.
4444c779eb48atagen2026-10-16 12:07 UTC94
- `expand all` became `maximize`, which also sets the xdg maximized state.
cd7085e54c88atagen2026-10-16 06:58 UTC95
- One curve per motion group.
aa790e7e33a0atagen2026-10-16 08:03 UTC96
- Floating windows travel above the tiled layer, exempt from the overlap rule.
aa790e7e33a0atagen2026-10-16 08:03 UTC97
- Seeds start as a line on the old boundary between neighbours.
944fc4782ac3atagen2026-10-16 08:09 UTC98
- Floating to tiled and fullscreen use a direct glide above the tiled layer. Expand is a tiled operation planned normally, siblings squeezed to zero-size lines.
944fc4782ac3atagen2026-10-16 08:09 UTC99
- One layout tree per output, tags filter it. Hidden windows keep their slots, visible moves swap visible slots only, containers collapse by the normal one-child rule counting hidden children, and a hidden only child is demoted into the grandparent. This replaces per-tag layouts and the row-stacking merge rule, row stacking is just the default arrangement.
061b977757d2atagen2026-10-16 08:22 UTC100
- Lanes span only the band of the involved windows, never the whole output.
60f00dd4f2beatagen2026-10-16 11:50 UTC101
- Hidden-slot rules confirmed. A window moving toward a lane that holds only hidden windows joins that lane rather than opening a new one beside it.
57f44a63d99fatagen2026-10-16 05:34 UTC102
- Input hit-tests against final layout geometry, never animated geometry.
57f44a63d99fatagen2026-10-16 05:34 UTC103
- smithay is pinned by git rev. The repo uses jj.
57f44a63d99fatagen2026-10-16 05:34 UTC104
57f44a63d99fatagen2026-10-16 05:34 UTC105
## Deferred
57f44a63d99fatagen2026-10-16 05:34 UTC106
57f44a63d99fatagen2026-10-16 05:34 UTC107
- Tearing. At the scanout milestone, carry rebased smithay #1948, #1949 and #1325 as patches and push them upstream.