Environment flags
A handful of TD_ variables change how Terminal Delight starts. The ones you might actually set: TD_SCRATCH=1 for a throwaway window that doesn't touch your session, TD_SPINE=0 to hide the attention rail, TD_NO_SESSIOND=1 to run without the session host, and TD_THEME or TD_SKIN to load a theme or skin from somewhere else.
Three more are set for you, inside every pane: TD_SESSION, TD_PANE_ID and TD_TAG. They are how a script or an agent in a pane knows where it is. Everything else is for debugging, or for staging screenshots with made-up data.
Technical lists every variable and its default.
Variables
At launch#
| Variable | Does | Default |
|---|---|---|
TD_SCRATCH | A throwaway window that never claims a session. | off; set means on |
TD_SEED_CWD | Start the first pane in this directory. Implies TD_SCRATCH. | |
TD_SEED_RESUME | Type this line into the first pane, usually a claude --resume …. Implies TD_SCRATCH. | |
TD_NO_SESSIOND | Run without the session host: the window owns its terminals, and they close with it. | host on; 1, on, true or yes turns it off |
TD_SESSION | Open this session, ahead of any other rule. | chosen from the workspace |
TD_SPINE | The attention rail. 0, false or off hides it. | on |
TD_ANCHOR_TOP | Keep the prompt at the top of the pane instead of the bottom. | off; 1 or true turns it on |
TD_THEME | The theme file. | ~/.config/terminal-delight/theme.toml |
TD_SKIN | The skin file. | ~/.config/terminal-delight/skin.toml |
TD_PALETTE | An extra colour file laid over the theme. | none |
TD_OMARCHY_THEMES | Where to find Omarchy themes, :-separated. | Omarchy's own folders |
TD_HOST_SHELL | The shell the session host starts in each pane. | your shell |
TD_PAGE_IDLE_SECS | Seconds before the headless browser that draws HTML documents shuts down when idle. | 300 |
TD_NOGLASS | No barrel warp. | off; set means on |
TD_NOCANVAS | No CRT canvas effects. | off; set means on |
TD_MCP | Also serve MCP on the window's own stdin and stdout. This starts the transport; whether panes are visible is still the MCP switch. | off; set means on |
TD_MCP_WRITE | Writes on for that transport. Read only when TD_MCP is set. | off |
Set inside every pane#
| Variable | Holds |
|---|---|
TD_SESSION | The session this pane belongs to. terminal-delight mcp and terminal-delight surface use it to find their window. |
TD_PANE_ID | This pane's number. It outlives the shell, and it's the pane <n> in list_panes. |
TD_TAG | Eight random characters. Lines the workbench types into this pane arrive as [workbench:<tag>]. |
These come from the session host, so a window started with TD_NO_SESSIOND doesn't set them.
Debugging#
Each prints a trace to stderr: TD_KEYDEBUG (keys), TD_HITDEBUG (clicks), TD_SELDEBUG (selection), TD_BENCHDEBUG (the composer's length, never its text), TD_DOCDEBUG (documents), TD_ANCHORDEBUG, TD_RAIL_DEBUG, TD_LATENCY (keypress to echo), TD_PICTUREDEBUG (each time a hidden pane lets its pictures go). TD_VERB_PREVIEW=1 shows the typed-verb preview under bench cards.
Staging and capture#
These fill a window with made-up agents, usage and notes, so a screenshot shows no real work: TD_DEMO, TD_DEMO_STATE (restore a saved state file; implies scratch), TD_DEMO_SEED, TD_DEMO_LOGOS, TD_DEMO_LOGO_DIR, TD_WALL_DEMO, TD_WALL_THEME, TD_FOCUS_DEMO, TD_CONFIRM_DEMO, TD_TRAY_DEMO, TD_OSD_DEMO, TD_SAVINGS_DEMO, TD_USAGE_DEMO, TD_GRAVEYARD_DEMO, TD_GAMBA_DEMO, TD_SPINE_DEMO, TD_WORKBENCH_DEMO, TD_BAY_DEMO (how far the bay door is open, 0 to 1), TD_IGNITION_FREEZE (hold the power-on effect at a point), TD_RAIL_TABLE. TD_USAGE_LIVE opens the usage face on your real records, and is never for capture.
Read by scripts, not the binary#
| Variable | Read by | Default |
|---|---|---|
TD_ASK_WAIT_S | the agent hooks: how long a question waits for your answer | 540 seconds |
TD_INBOUND_CAP | the agent hooks: when the inbound journal rotates | 2 MiB |
TD_SAVINGS_USD_PER_M | the lean-ctx plugin: dollars per million tokens saved | 5.0 |
Terminal Delight also reads XDG_CONFIG_HOME, XDG_STATE_HOME, XDG_CACHE_HOME, XDG_RUNTIME_DIR, HOME, PATH, WAYLAND_DISPLAY, HYPRLAND_INSTANCE_SIGNATURE and OMARCHY_PATH. There is no TD_SOUNDS: the finish bell's sound is built in.
Sources
- Launch reads: main.rs; pane identity: hostproto.rs; theme and skin paths: theme.rs, skin.rs; the hooks: scripts/td-agent-hooks.