Inspect and change the running session
Open the REPLPermalink to Open the REPL#
Run tessera repl in a terminal inside Tessera. It evaluates in (tessera user), with the public session API, configuration, themes, layouts, keys, and common Sigil libraries already available. bar, layout-section and the other bar constructors are available from startup, even without a config file. Definitions persist between requests. Use (help) or ,h for the inventory, (help 'config) for configuration, and (help 'all) for everything. ,q or Control+D exits; Control+C discards the input you're typing.
tessera eval '(focused-workspace)'
tessera eval '(map output-connector (output-ids))'
tessera eval '(window-title (focused-window))'
tessera eval '(problems)'Use eval for one expression. It prints explicit output before the result and exits nonzero on error. The client finds the owner-only Unix socket from XDG_RUNTIME_DIR and WAYLAND_DISPLAY; TESSERA_REPL selects another socket. Ordinary sessions don't expose a TCP REPL. This gives the session owner's full authority, so don't share or forward it.
Find objects before actingPermalink to Find objects before acting#
Output queries take output IDs from output-ids. Inspect output-connector, output-box, output-scale, output-workspace, output-usable-box, output-powered?, and output-active?. Workspace queries take names from workspace-names: workspace-output, workspace-layout, workspace-priority, workspace-tiled-windows, and workspace-floating-windows describe them.
Window queries take explicit window IDs: window-title, window-app-id, window-instance, window-parent, window-output, window-workspace, window-floating?, and window-fullscreen?. output-selected-window returns a tiled selection or false; focused-window and focused-output describe focus. output-layout-arrangement describes tiling, while output-arrangement includes the complete submitted arrangement. Some queries return false when an object isn't available. bindings lists active bindings and current-config returns the active configuration.
Queue a changePermalink to Queue a change#
tessera eval '(focus-workspace! "2")'
tessera eval '(run-command! (quote (layout stacked)))'
tessera eval '(reload!)'focus-window!, move-window!, and close-window! take explicit window IDs. move-window! also takes a workspace name and leaves focus on the current workspace. apply-theme!, set-wallpaper!, and next-wallpaper! change appearance. run-command! accepts existing binding action lists. Use (help 'focus-window!) and other action names for their arguments.
Queued desktop actions return true when admitted and false when stopped or the 64 pending slots are full. That isn't completion. Read state in a later eval request, and inspect problems for action errors. Explicit IDs prevent a later focus change from redirecting a queued operation. Theme and wallpaper bursts combine their latest requested selection.
apply-config! applies a configuration record, and reload! rereads the file. Bar visibility calls return the resulting mode directly. See configuration, bar visibility, window annotations, and device helpers for their task-oriented interfaces.
Schedule a recurring actionPermalink to Schedule a recurring action#
The config's schedule field holds records built with (schedule CRON PROCEDURE NAME). Cron has five fields: minute, hour, day of month, month, weekday, in local time including TZ. wallpaper-rotation builds a rotation record; day-night-themes builds day and night palette records. Use these records in a file rather than registering every during config load.
From the REPL, (every "0 * * * *" next-wallpaper! "hourly wallpaper") returns a handle. Inspect it in a subsequent request with schedule-active? or scheduled-tasks, and queue cancellation with cancel-schedule!. Callbacks run on the policy consumer, so keep them short. Errors go to problems.
After suspend or a forward clock jump, each task catches up at most once for its latest matching minute within the past 24 hours. New registrations don't recover times before registration. Explicit reload or apply replaces all handles; failed configuration keeps the previous set. Internal theme refreshes preserve programmatic handles. Scheduling doesn't persist across session restarts.
Keep live experiments boundedPermalink to Keep live experiments bounded#
Evaluation runs inside the compositor and isn't transactional. Changes made before an error stay made. Control+C and client timeouts don't stop a running expression. A runaway loop or excessive allocation can freeze or end session policy. Keep experiments small and save reusable settings to your file. If the compositor is stuck, switch to another VT, verify the affected session's exact PID, and terminate it only if you intend to close its apps.