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:
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 = 1Validate and render it without a compositor:
enzwall check scenes/tide
enzwall snapshot scenes/tide tide.png --size 1920x1080 --time 6Conventions
- Unknown keys are errors, so typos never pass silently.
- Coordinates are fractions of the output.
x/yplace a layer's centre, with0,0at the top left;w/hsize it.radiusis relative to the output height. - Colours are
#rrggbbor#rrggbbaa. - Images are PNG, at most 4096×4096.
Scene keys
| Key | Default | Meaning |
|---|---|---|
format | required | 1 |
name | required | Shown in pickers (1–64 characters) |
description, author | "" | Shown in pickers |
fps | 30 | Frame cap for looping motion (1–60) |
transition_fps | 60 | Frame cap while an event or parallax transition runs (1–120) |
background | #000000 | Clear colour under all layers |
render_scale | 1.0 | Render at a fraction of the output (0.25–1); the compositor scales up |
idle_timeout | 300 | Seconds without input before sleep fires (10–86400) |
sleep_dim | 0.6 | How dark the scene gets while asleep (0 disables) |
Parallax
| Key | Default | Meaning |
|---|---|---|
shift | 0 | Fraction of the width a depth-1 layer moves per desktop |
duration | 0.7 | Seconds per desktop change |
easing | in-out-cubic | See easings below |
range | 5 | Desktops 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.
| Kind | Keys | Notes |
|---|---|---|
solid | color, corner | Rectangle; corner rounds it |
gradient | colors (2–4), angle, radial | Dithered to avoid banding |
orb | color, softness, stretch | Circle of radius, from hard (0) to glow (1); stretch widens it into an ellipse |
ring | color, thickness, softness, sweep, start, caps, bind, track | Circle outline or arc. bind (cpu, mem, battery) drives sweep from a live reading; track draws the full ring underneath |
wave | color, shade, amplitude, frequency, detail, softness, fill | Curve across the full width. fill is down, up, band or rise; phase scrolls it |
image | source, fit, tile, repeat | fit is cover, contain or stretch. tile = true repeats horizontally and phase scrolls it; repeat = [x, y] tiles a small pattern |
text | text, font, size, color, align, tracking, case, outline, outline_width, shadow, shadow_offset, shadow_blur | One line of templated text. A shadow with zero offset and a blur makes a glow |
particles | count, area, sizes, velocity, jitter, wobble, wobble_period, twinkle, colors, softness, stretch, seed, source, spin | Up to 160 drifting glows or PNG sprites inside area = [left, top, right, bottom]. Layers with the same seed move together |
grid | color, density, columns, thickness, fade | A perspective floor from the box's top edge; phase moves it toward the viewer |
graph | bind (cpu, mem), count, color, shade, thickness, glow | The 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:
[[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.
| Key | Default | Meaning |
|---|---|---|
wave | sine | sine, triangle, saw or scroll (endless drift; phase only) |
period | 20 | Seconds per cycle |
amplitude | 0.02 | Peak change |
phase | 0 | Offset in cycles (−1 to 1); x and y a quarter apart trace an ellipse |
unit | natural | height 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.
| Key | Default | Meaning |
|---|---|---|
from, to | neutral | Values over the transition; neutral is 0, or 1 for opacity and scale |
duration | 1 | Seconds |
delay | 0 | Seconds before starting; from shows meanwhile |
easing | out-cubic | See below |
hold | false | Keep 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.
| Variable | Value | Refresh |
|---|---|---|
time | strftime format, default %H:%M | Per minute, or per second with %S |
date | strftime format, default %A, %-d %B | Per minute |
cpu, mem | Percent used | Every 2 s |
mem_used | For example 5.2 GiB | Every 2 s |
load | 1-minute load average | Every 2 s |
uptime | For example 3h 12m | Per minute |
battery | Percent, or – | Every 30 s |
host, user | Host and user name | Once |
var:name | Set with enzwall ctl set name value | When 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
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]runshows the scene as a layer-shell background on--output.--hyprland autofollows Hyprland workspaces for parallax.--idle-timeoutoverrides the scene's value (0 never sleeps).--readyprintsreadyon stdout once the first frame is presented, so a supervisor can swap backgrounds without a gap.checkparses the scene, decodes its images and resolves its fonts, then prints a one-line summary.listprints a JSON array of the scenes in a directory withid,name,description,animated,parallaxandpreview.snapshotrenders offscreen to PNG at a given time.--event unlock@1and--workspace 2@3fire cues during the timeline;--framesand--intervalcapture a sequence;--clockfixes the wall-clock time.streamwrites raw frames to stdout for embedding, for example behind the login screen. Output starts with theENZWALL1header, 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.benchrenders 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.
| Request | Effect |
|---|---|
status | Scene, frames rendered and skipped, sizes, looping/transitioning/asleep/paused state, desktop, memory use and frame pacing figures |
event unlock / wake / sleep / start / workspace | Fire an event. sleep dims and then stops rendering; unlock and wake resume |
workspace N | Move the parallax camera to 0-based desktop N |
set NAME VALUE / unset NAME | Custom text for {var:NAME} (names [A-Za-z0-9_-], values up to 256 characters) |
load /abs/scene/dir | Swap scenes without restarting; the desktop position is kept |
pause / resume | Freeze and unfreeze looping motion; clocks still update |
fps N / fps scene | Override the loop frame cap, or return to the scene's own |
smooth balanced / smooth / auto | Loop 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.
enzwall ctl event unlock
enzwall ctl set weather "12°C, light rain"
enzwall ctl --name default statusFrame 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-v1when the compositor supports it.
Integrating with another shell
- Start
enzwall run <scene> --output <name>. - On Hyprland, pass
--hyprland auto; otherwise sendworkspace Non every desktop change. - Send
event unlockafter a successful unlock. - Use
loadto 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.