Skip to content
  1. Docs
  2. enzimOS
  3. Developers

enzwall scene format

Reference for writing animated wallpaper scenes — scene keys, layer kinds, motion, live text, roles — and for the enzwall command line and control socket.

enzwall is the animated wallpaper engine used by the enzimOS desktop. It is an independent repository with no dependency on the shell; the shell pins a tested enzwall revision and drives it through its command line and socket. Scenes are declarative: a directory with one scene.toml and the PNG images it uses. A scene cannot contain shaders, scripts, executables or network content, so it is safe to share.

enzwall renders with EGL and OpenGL ES 3.0 on Wayland compositors that support wlr-layer-shell. Each layer is one draw; there are no offscreen passes or blur. X11 and video playback are out of scope.

A minimal scene

This is a trimmed version of the bundled Tide scene:

toml
format = 1
name = "Tide"
description = "Luminous bands of colour rolling past each other at dawn."
author = "enzUI"
fps = 30
background = "#0a2440"
sleep_dim = 0.65

[parallax]
shift = 0.06
duration = 1.2
easing = "in-out-sine"
range = 4

[[layer]]
kind = "gradient"
colors = ["#0c2a4a", "#2f5f8c", "#e98a78", "#ffd2a6"]
angle = 90
y = 0.4
h = 0.8

[[layer]]
role = "clock"
kind = "text"
text = "{time:%H:%M}"
font = "Outfit-ExtraLight"
size = 0.2
x = 0.5
y = 0.21
color = "#fffaf6"
depth = 0.05
[[layer.motion]]
property = "opacity"
on = "unlock"
from = 0
to = 1
duration = 1.2
delay = 0.5

[[layer]]
kind = "wave"
y = 0.44
amplitude = 0.06
frequency = 0.9
color = "#ff9f8a"
shade = "#e0607a"
depth = 0.2
[[layer.motion]]
property = "phase"
wave = "scroll"
period = 90
amplitude = 1

Validate and render it without a compositor:

sh
enzwall check scenes/tide
enzwall snapshot scenes/tide tide.png --size 1920x1080 --time 6

Conventions

  • Unknown keys are errors, so typos never pass silently.
  • Coordinates are fractions of the output. x/y place a layer's centre, with 0,0 at the top left; w/h size it. radius is relative to the output height.
  • Colours are #rrggbb or #rrggbbaa.
  • Images are PNG, at most 4096×4096.

Scene keys

KeyDefaultMeaning
formatrequired1
namerequiredShown in pickers (1–64 characters)
description, author""Shown in pickers
fps30Frame cap for looping motion (1–60)
transition_fps60Frame cap while an event or parallax transition runs (1–120)
background#000000Clear colour under all layers
render_scale1.0Render at a fraction of the output (0.25–1); the compositor scales up
idle_timeout300Seconds without input before sleep fires (10–86400)
sleep_dim0.6How dark the scene gets while asleep (0 disables)

Parallax

KeyDefaultMeaning
shift0Fraction of the width a depth-1 layer moves per desktop
duration0.7Seconds per desktop change
easingin-out-cubicSee easings below
range5Desktops the camera spans; later desktops keep the last view

Each layer moves by depth × shift per desktop. Keep depth × shift × (range − 1) under about 0.15 for anything that must stay readable.

Layers

Each [[layer]] draws on top of the previous one. Common keys: kind, id, x, y, w, h, radius, rotation (degrees), scale, opacity, phase, depth (the parallax factor; use 0 for layers that should stay put), blend (normal, add or multiply) and pivot = [x, y], the rotation and scale origin as fractions of the layer's own box.

KindKeysNotes
solidcolor, cornerRectangle; corner rounds it
gradientcolors (2–4), angle, radialDithered to avoid banding
orbcolor, softness, stretchCircle of radius, from hard (0) to glow (1); stretch widens it into an ellipse
ringcolor, thickness, softness, sweep, start, caps, bind, trackCircle outline or arc. bind (cpu, mem, battery) drives sweep from a live reading; track draws the full ring underneath
wavecolor, shade, amplitude, frequency, detail, softness, fillCurve across the full width. fill is down, up, band or rise; phase scrolls it
imagesource, fit, tile, repeatfit is cover, contain or stretch. tile = true repeats horizontally and phase scrolls it; repeat = [x, y] tiles a small pattern
texttext, font, size, color, align, tracking, case, outline, outline_width, shadow, shadow_offset, shadow_blurOne line of templated text. A shadow with zero offset and a blur makes a glow
particlescount, area, sizes, velocity, jitter, wobble, wobble_period, twinkle, colors, softness, stretch, seed, source, spinUp to 160 drifting glows or PNG sprites inside area = [left, top, right, bottom]. Layers with the same seed move together
gridcolor, density, columns, thickness, fadeA perspective floor from the box's top edge; phase moves it toward the viewer
graphbind (cpu, mem), count, color, shade, thickness, glowThe last count readings, one every 2 s, as a scrolling line

Fonts

Fonts are looked up by file stem, such as Outfit-ExtraLight, in this order: the scene directory, the shared scenes/_shared/fonts directory, then the user and system font directories. enzwall check fails if a named font is missing.

Clock and date roles

Every layer has a role: decoration (the default), clock, date or clock_date. The desktop's Hide wallpaper clock and Hide wallpaper date settings, and the login screen's duplicate-clock handling, remove layers by role. Tag every part of a clock or date with its role, including decorative backing shapes:

toml
[[layer]]
kind = "text"
role = "clock"
text = "{time:%H:%M}"

[[layer]]
kind = "text"
role = "date"
text = "{date:%A, %-d %B}"

A text layer without an explicit role infers it from its template: {time…} makes it clock, {date…} makes it date, and both make it clock_date. A clock_date layer is hidden when either is hidden.

Motion

[[layer.motion]] animates one property: x, y, scale, rotation, opacity or phase. For x, y, rotation and phase the motion adds to the base value; for opacity and scale it multiplies it. The on key selects a trigger.

Loops

on = "loop" is the default.

KeyDefaultMeaning
wavesinesine, triangle, saw or scroll (endless drift; phase only)
period20Seconds per cycle
amplitude0.02Peak change
phase0Offset in cycles (−1 to 1); x and y a quarter apart trace an ellipse
unitnaturalheight measures an x amplitude in output heights, so orbits stay circular

Use scroll rather than saw for anything that should move forever: waves and tiled images repeat every whole unit of phase, so a scroll never jumps.

Live readings

on = cpu, mem, battery or day maps a live value onto the property, from at 0 and to at 100 %. day runs from midnight (0) to the next midnight (1). Readings ease in over about a second.

Events

on = start, unlock, wake, sleep or workspace plays a transition when that event fires.

KeyDefaultMeaning
from, toneutralValues over the transition; neutral is 0, or 1 for opacity and scale
duration1Seconds
delay0Seconds before starting; from shows meanwhile
easingout-cubicSee below
holdfalseKeep to afterwards instead of returning to neutral

The most recently fired event wins per property. A common pattern is a sleep motion with hold = true, paired with a wake motion whose from equals the sleep motion's to.

Easings: linear, in-quad, out-quad, in-out-quad, in-cubic, out-cubic, in-out-cubic, in-out-sine, out-expo, out-back.

Live text variables

Text uses {name} or {name:argument} templates; {{ and }} are literal braces.

VariableValueRefresh
timestrftime format, default %H:%MPer minute, or per second with %S
datestrftime format, default %A, %-d %BPer minute
cpu, memPercent usedEvery 2 s
mem_usedFor example 5.2 GiBEvery 2 s
load1-minute load averageEvery 2 s
uptimeFor example 3h 12mPer minute
batteryPercent, or –Every 30 s
host, userHost and user nameOnce
var:nameSet with enzwall ctl set name valueWhen set

The renderer wakes only for the fastest refresh any visible template or bound ring needs. Named date fields are formatted for the locale the shell passes in ENZUI_LOCALE. On the login screen, host, user and the system readings are blank.

Command line

text
enzwall run <scene-dir> [--output NAME] [--name NAME | --socket PATH] [--namespace NS]
            [--hyprland auto|DIR] [--idle-timeout SECONDS] [--smooth balanced|smooth|auto] [--ready]
            [--hide-clock] [--hide-date]
enzwall ctl [--name NAME | --socket PATH] <request…>
enzwall list <scenes-dir>
enzwall check <scene-dir>
enzwall snapshot <scene-dir> <out.png> [--size WxH] [--time S] [--frames N --interval S]
                 [--event NAME@S]... [--workspace N@S]... [--clock UNIX]
enzwall stream <scene-dir> [--size WxH] [--fps 1..30] [--hide-clock] [--hide-date] [--static]
enzwall bench <scene-dir> [--size WxH] [--frames N]
  • run shows the scene as a layer-shell background on --output. --hyprland auto follows Hyprland workspaces for parallax. --idle-timeout overrides the scene's value (0 never sleeps). --ready prints ready on stdout once the first frame is presented, so a supervisor can swap backgrounds without a gap.
  • check parses the scene, decodes its images and resolves its fonts, then prints a one-line summary.
  • list prints a JSON array of the scenes in a directory with id, name, description, animated, parallax and preview.
  • snapshot renders offscreen to PNG at a given time. --event unlock@1 and --workspace 2@3 fire cues during the timeline; --frames and --interval capture a sequence; --clock fixes the wall-clock time.
  • stream writes raw frames to stdout for embedding, for example behind the login screen. Output starts with the ENZWALL1 header, then little-endian width, height and role flags (bit 0: the scene has a clock, bit 1: a date), then fixed-size RGBA frames. Size is limited to 1920×1080 and the default is 960×540 at 15 fps. Stream mode never exposes host, user or resource readings.
  • bench renders a number of frames offscreen and reports CPU time per frame and, when timer queries are available, GPU time.

Sizes are WxH, 16–8192 on each side.

Control socket

A running enzwall run listens on $XDG_RUNTIME_DIR/enzwall/<name>.sock (--name, default default), or on the path given with --socket. The socket and its directory are private to the user. Each request is one UTF-8 line; each reply is one JSON line with "ok": true or false. enzwall ctl sends one request and exits non-zero if the reply is not ok.

RequestEffect
statusScene, frames rendered and skipped, sizes, looping/transitioning/asleep/paused state, desktop, memory use and frame pacing figures
event unlock / wake / sleep / start / workspaceFire an event. sleep dims and then stops rendering; unlock and wake resume
workspace NMove the parallax camera to 0-based desktop N
set NAME VALUE / unset NAMECustom text for {var:NAME} (names [A-Za-z0-9_-], values up to 256 characters)
load /abs/scene/dirSwap scenes without restarting; the desktop position is kept
pause / resumeFreeze and unfreeze looping motion; clocks still update
fps N / fps sceneOverride the loop frame cap, or return to the scene's own
smooth balanced / smooth / autoLoop at the scene's cap, at the display refresh rate, or at the refresh rate only on mains power (default)

A client must complete each request within three seconds. Custom variables are limited to 64 entries and 32 KiB in total.

sh
enzwall ctl event unlock
enzwall ctl set weather "12°C, light rain"
enzwall ctl --name default status

Frame pacing and cost

  • Frames are timed to the output's refresh, so a frame cap becomes a whole number of refreshes per frame: 30 fps on 60 Hz is every second refresh.
  • A frame whose largest change is under 0.3 px, or one colour level, is skipped.
  • Only the areas of layers that moved are reported to the compositor as damage; a clock-only change damages just its rectangle.
  • A still scene renders once and sleeps. Idle is detected with ext-idle-notify-v1 when the compositor supports it.

Integrating with another shell

  1. Start enzwall run <scene> --output <name>.
  2. On Hyprland, pass --hyprland auto; otherwise send workspace N on every desktop change.
  3. Send event unlock after a successful unlock.
  4. Use load to change scenes; switching crossfades for 0.8 s.

Packaging scenes for enzimOS

Trusted scenes are installed under the platform's enzwall/scenes/<id> directory, where <id> is a simple name. When the login screen shows a live scene, it runs enzwall stream in a sandbox with no home directory, session bus or Wayland socket, and with limits on memory, scene text, fonts and decoded images. If the sandbox is unavailable it falls back to a still image. The login screen does not load scenes from users' home directories; importing user scenes is left to the OS.

For how the user chooses scenes, see Wallpapers.