Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Glossary

The terms these pages use, each defined once. Engine-internal vocabulary (retained scene, dirty scope, capability roster) lives in CONTEXT.md.

Processes

TermMeaning
SupervisorThe long-lived mantle process. Owns capabilities, idle-notify, PAM, polkit, session processes, the file watcher and the control socket; spawns the Renderer and respawns it after a crash. See CLI.
RendererThe mantle-renderer process: the Lua VM, the scene, the Wayland client and painting. One per generation. See runtime.
GenerationOne Renderer process and its Lua VM. Only a Renderer replacement (after a crash) starts a new one; a reload does not.
Instance directory$XDG_RUNTIME_DIR/mantle/<pid>-<start ms>/, one per running mantle: control socket, log, lock file, icon spools. mantle list, log, set, toggle and call pick one. See which shell.
Check modemantle check: evaluates and lays out the config with no Wayland, no subprocesses and no state writes; it lays out once with every capability nil and once with a sample push each. See what check covers.
Session processA session_process program the Supervisor owns. Survives reloads and Renderer replacement; stopped at shutdown with its declared signal, then SIGKILL after 5 s. A process.run child, by contrast, dies at the next reload.

Reloads

TermMeaning
EvaluationOne run of shell.lua and the modules it requires, producing the surface list.
In-place reloadA re-evaluation in the same generation and VM after a saved .lua or .frag file or an output change, then one apply: the scene is reconciled, and surfaces whose fingerprint changed are destroyed or created. See runtime.
Surface fingerprintA declaration’s creation-time fields (panel: id, layer, anchor, monitor, namespace; other roles: id). A change rebuilds that surface; other edits update it live.
Evaluation-scoped registrationaction, on_change and idle-threshold callbacks, cleared before each evaluation because they close over its locals. The timers an evaluation arms go live only when its result applies. See what survives a reload.
RollbackA failed evaluation or apply keeps the previous scene and surfaces. A failed evaluation drops the timers, actions and change handlers it registered; a failed apply drops only its timers.
Rescuemantle.rescue, { is_rescue, error_log }: set by a failed evaluation, apply or live update, or a refused or lost session lock; cleared by the next reload that applies. A failed startup apply or live update also clears when a later pass applies.

Surfaces

TermMeaning
SurfaceA top-level declaration returned by shell.lua, with one role and one or more instances. See surfaces.
Surface rolepanel (layer-shell), window (xdg_toplevel), popup (xdg_popup) or lock (session lock).
Surface instanceOne mapped copy of a surface. Per-output panels and locks are keyed {id}@{output}; windows, popups and monitor = "Active" panels use the bare id.
Structural propertyA property read once per evaluation to make a structural decision, so it refuses a signal: any node’s id; a panel’s layer, anchor, monitor, namespace; a popup’s parent.
Lock surfaceThe lock declaration’s instance on one output, alive only while the session is locked.

Nodes and paint

TermMeaning
NodeAn element in a surface’s tree: row, text, button, list and the other kinds.
Node identityHow a node is matched across evaluations, scoped to its parent: sibling id or list key (which wins), else position among id-less siblings. An unmatched node is new and starts fresh.
Paint-only propertyA property whose change repaints without relayout (opacity, colours, radius, shadows, blurs, transforms, progress). Its tweens tick without a layout pass.
Shader nodeshader: a config .frag drawn as a node. Editing the file reloads.
Capture nodecapture: a live preview of an output.

Signals and state

TermMeaning
SignalA reactive value. Pass it to a property to keep that property live; :get() is a snapshot. See signals.
Derived signalA signal computed from others: :map, computed, delay, pulse. See derived signals.
Named stateA state(name, initial) signal, keyed by name. Survives reloads until a scalar initial changes; lost with the generation. mantle set and toggle write it.
Input signalAn engine-written, name-keyed signal: hover, hover_rect, scroll, geometry. Survives reloads like named state.
Change handlerAn on_change(fn) callback, run with the current and previous payload on each capability, rescue or screens push.
Persistent tablepersistent_table: a JSON file read as signals and written one key at a time.
Idle thresholdAn inactivity duration with idle and resume callbacks, registered on mantle.idle and cancellable by its handle.
Idle inhibitA hold that stops idle actions, shared by the config and org.freedesktop.ScreenSaver clients.

Animation

TermMeaning
TweenA property moving from its displayed value to a newly resolved one, advanced per frame without Lua. See animation.
SpringA tween driven by stiffness and damping instead of duration and easing; it keeps its velocity when the target moves.
KeyframesA property walked through a list of values, once or looped, driven by elapsed time rather than a resolved target.
Leaving nodeA removed child, painted at its last rect with no layout or input while its animate.exit runs.
Cross-dissolveAn image blending from the picture it holds to a newly decoded one over its transition.
Transition shadertransition.shader: a config fragment shader that draws an image’s cross-dissolve.

Capabilities

TermMeaning
CapabilityA backend owning one slice of platform state and its actions, read in Lua as mantle.<name>. See capabilities.
Capability startThe first mantle.<name> read (or secure_submit naming it) starts the backend for the Supervisor’s lifetime. mantle.idle starts on its first method call; lock and the polkit controller exist from boot.
SnapshotA capability’s full state, pushed on change. An equal payload is not pushed again, except for tray and notifications, whose icon files change in place.
PushA capability sending a new snapshot. Every property reading that capability re-resolves.
HydrationThe Supervisor replaying its last snapshots to a new generation. Before its first snapshot a capability reads nil.
ActionA capability method such as mantle.audio:set_volume(0.5), fire and forget; or action(name, fn), which exposes Lua to mantle call.
Mantle namespaceThe mantle table: capabilities, plus the Renderer’s screens, rescue, version and config_dir.
Secure submitA secret text field sending its buffer straight to a capability action, never through Lua. See secure fields.
Toplevel windowAnother application’s window, listed by the windows capability. Not the window surface role.
Do-not-disturbA notifications toggle that silences non-critical sounds. It does not filter the feed.