Environment flags

Brief

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.

Technical

Variables

At launch#

VariableDoesDefault
TD_SCRATCHA throwaway window that never claims a session.off; set means on
TD_SEED_CWDStart the first pane in this directory. Implies TD_SCRATCH.
TD_SEED_RESUMEType this line into the first pane, usually a claude --resume …. Implies TD_SCRATCH.
TD_NO_SESSIONDRun 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_SESSIONOpen this session, ahead of any other rule.chosen from the workspace
TD_SPINEThe attention rail. 0, false or off hides it.on
TD_ANCHOR_TOPKeep the prompt at the top of the pane instead of the bottom.off; 1 or true turns it on
TD_THEMEThe theme file.~/.config/terminal-delight/theme.toml
TD_SKINThe skin file.~/.config/terminal-delight/skin.toml
TD_PALETTEAn extra colour file laid over the theme.none
TD_OMARCHY_THEMESWhere to find Omarchy themes, :-separated.Omarchy's own folders
TD_HOST_SHELLThe shell the session host starts in each pane.your shell
TD_PAGE_IDLE_SECSSeconds before the headless browser that draws HTML documents shuts down when idle.300
TD_NOGLASSNo barrel warp.off; set means on
TD_NOCANVASNo CRT canvas effects.off; set means on
TD_MCPAlso 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_WRITEWrites on for that transport. Read only when TD_MCP is set.off

Set inside every pane#

VariableHolds
TD_SESSIONThe session this pane belongs to. terminal-delight mcp and terminal-delight surface use it to find their window.
TD_PANE_IDThis pane's number. It outlives the shell, and it's the pane <n> in list_panes.
TD_TAGEight 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#

VariableRead byDefault
TD_ASK_WAIT_Sthe agent hooks: how long a question waits for your answer540 seconds
TD_INBOUND_CAPthe agent hooks: when the inbound journal rotates2 MiB
TD_SAVINGS_USD_PER_Mthe lean-ctx plugin: dollars per million tokens saved5.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

  1. Launch reads: main.rs; pane identity: hostproto.rs; theme and skin paths: theme.rs, skin.rs; the hooks: scripts/td-agent-hooks.