atagen

monolith

public
Star0
Watch0
57f44a63d99fcb7fd41d1b2b40ec8f7e2149cea9
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.
57f44a63d99fatagen2026-10-16 05:34 UTC19
- Layout state is per tag-on-output.
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
57f44a63d99fatagen2026-10-16 05:34 UTC26
- Tree per tag-on-output, edited by the user, not derived from window count.
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.
57f44a63d99fatagen2026-10-16 05:34 UTC28
- Viewing several tags stacks each tag's tree as a row (or column when flipped), in invocation order. Each tag keeps its own split ratios. 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.
57f44a63d99fatagen2026-10-16 05:34 UTC83
- Input hit-tests against final layout geometry, never animated geometry.
57f44a63d99fatagen2026-10-16 05:34 UTC84
- smithay is pinned by git rev. The repo uses jj.
57f44a63d99fatagen2026-10-16 05:34 UTC85
57f44a63d99fatagen2026-10-16 05:34 UTC86
## Deferred
57f44a63d99fatagen2026-10-16 05:34 UTC87
57f44a63d99fatagen2026-10-16 05:34 UTC88
- Tearing. At the scanout milestone, carry rebased smithay #1948, #1949 and #1325 as patches and push them upstream.