Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

Workspace environment

Edit this page on GitHub

github.com/libtmux/libtmux-go/workspace · Source

tmuxp compatibility reference. Examples using tmuxp run the Python reference. Local CLI status describes this port’s implemented coverage.

The environment of the process running tmuxp controls discovery, expansion, and presentation. A workspace’s "environment" mapping controls the tmux session or the environment passed when launching a pane. These are separate settings.

session_name: environment-example
environment:
WORKSPACE_ROLE: shared
windows:
- window_name: main
environment:
WINDOW_ROLE: tools
panes:
- echo window environment
- environment:
PANE_ROLE: isolated
shell_command: env

The first pane receives the window launch map. The second selects its own pane map instead of merging it with the window map. It still inherits applicable tmux session/process environment. A pane map does not mean a completely empty environment plus that map.

Expansion before launchLink to section

Tmuxp expands tilde and environment-variable expressions in session/window names, paths, before_script, command strings, environment values, and string option values. It uses the environment of the process invoking tmuxp. It does not first populate that process environment from the workspace’s environment mapping.

For example, a command using an already-set process variable can be substituted before pane creation. Inspect the expanded intent when a variable should instead be read dynamically by a pane shell. Unknown variables and shell-specific expressions follow the loader’s expansion and the eventual shell’s rules, not a general template language.

CLI and runtime variablesLink to section

VariablesEffect
TMUXP_CONFIGDIR, XDG_CONFIG_HOME, HOMEGlobal workspace directory selection and home expansion
TMUXINATOR_CONFIGTmuxinator import source directory
$EDITOREditor executable; reference default is vim
$TMUX, $TMUX_PANECurrent tmux connection and shell object context
TMUXP_PROGRESSValue 0 disables animated load progress
TMUXP_PROGRESS_FORMATDefault/minimal/window/pane/verbose preset or custom tokens
TMUXP_PROGRESS_LINESScript panel lines: default 3, 0 hides, -1 caps to terminal height
TMUXP_DETECT_TERMINAL_SIZEValue 1 enables size detection; default 1
TMUXP_DEFAULT_COLUMNS, TMUXP_DEFAULT_ROWSFallback session dimensions
COLUMNS, LINES, ROWSTerminal helper overrides and fallback sizing inputs
NO_COLOR, FORCE_COLORColor policy; nonempty values are significant
PYTHONSTARTUPStartup file used by supported shell startup behavior
IPYTHON_ARGUMENTSWhitespace-split arguments for the IPython backend
PYTHONBREAKPOINTCan affect debugger selection in tmuxp shell
SHELLShell diagnostics and readiness fallback
DISABLE_AUTO_TITLEOh My Zsh automatic-title warning
PATHExecutable lookup and diagnostics
LIBTMUX_TMUX_FORMAT_SEPARATORPython libtmux format collection override

Explicit progress flags take precedence over their corresponding defaults. Nonempty NO_COLOR disables color even with always; otherwise explicit never/always precede FORCE_COLOR and automatic TTY detection. Machine-output extensions must disable ANSI regardless of forced color.

CLICOLOR and CLICOLOR_FORCE are proposed cross-port presentation extensions, not variables read by this tmuxp reference. Native format codecs also need separate evidence before claiming the Python separator override works.

See directories for existing-directory precedence, layouts for size resolution, and shell for Python-specific environment effects.

Current Go builderLink to section

Go writes environment entries from every level to the session. The last assignment remains visible to later processes. This differs from the reference per-pane launch environment and can expose a pane value to later panes.

See the native builder behavior and configuration source before using these fields through application code.

Reference sourceLink to section

loader.py; finders.py; classic.py; load.py; shell.py; shell.py; colors.py; util.py.

Esc

Type to search.