Workspace builders¶
Added in version 1.72.0.
Most workspaces never need these keys. By default tmuxp builds your session with its built-in classic builder and waits for a pane’s shell prompt only when that shell is zsh — existing workspace files keep working unchanged. Set the keys below to swap in a different builder or to tune the prompt wait. Omit a key (or remove it) to restore the default.
Key |
Type |
Default |
Purpose |
|---|---|---|---|
|
string |
|
Which builder turns the workspace into a session. |
|
string or list of strings |
(none) |
Trusted directories to import a builder from. |
|
mapping |
(all defaults) |
Builder-behavior knobs, such as |
For the narrative — writing a builder, packaging one, the trust boundary, and testing — see Custom workspace builders.
workspace_builder¶
Selects the builder. The default, classic, is tmuxp’s built-in builder. A value
is resolved in this order:
absent or empty → the built-in classic builder (nothing is imported);
contains
:→ amodule:attrobject reference;no
.and no:→ a builder registered under thetmuxp.workspace_buildersentry-point group, selected by name;dotted with no
:→ an entry-point name if one is registered, otherwise amodule.attrimport path.
session_name: my-session
workspace_builder: classic
windows:
- panes:
- vim
See Custom workspace builders for selecting and packaging builders, and
resolve_builder_class() for the resolver.
workspace_builder_paths¶
Directories to import a builder from when it lives outside tmuxp’s environment —
for example, a script in your config directory. Accepts a single string or a list
of strings. tmuxp expands ~ and environment variables, resolves relative entries
against the workspace file’s directory, and requires each entry to be an existing
directory; the paths are added to sys.path only for the import and build.
workspace_builder: my_local_builder:CustomBuilder
workspace_builder_paths:
- ~/.config/tmuxp/builders
Warning
A workspace file that names a builder runs that builder’s Python code. Only load workspace files you trust. See the security note in Custom workspace builders.
workspace_builder_options¶
A catalog of builder-behavior settings, independent of which builder you use.
Today it holds a single key, pane_readiness, which controls whether tmuxp waits
for a pane’s shell prompt before sending its layout and commands — a guard against
a zsh prompt-redraw artifact:
workspace_builder_options:
pane_readiness: auto
Value |
Behavior |
|---|---|
|
Wait only when the session’s shell is zsh. |
|
Always wait for default-shell panes. |
|
Never wait; fastest, but accepts the prompt/layout race for shells that need it. |
pane_readiness also accepts truthy/falsy aliases — true/on/yes/1 map to
always, and false/off/no/0 map to never (full list in
Custom workspace builders). An unrecognized value fails the load with:
invalid pane_readiness value: 'sometimes'; expected one of: auto, always/true/on/yes/1, never/false/off/no/0
Panes that run a custom shell or window_shell never wait, regardless of policy.
See PaneReadiness and
WorkspaceBuilderOptions for the parsing rules.
Minimal complete example¶
session_name: my-session
workspace_builder: classic
workspace_builder_paths:
- ~/.config/tmuxp/builders
workspace_builder_options:
pane_readiness: auto
windows:
- window_name: editor
panes:
- vim
{
"session_name": "my-session",
"workspace_builder": "classic",
"workspace_builder_paths": ["~/.config/tmuxp/builders"],
"workspace_builder_options": {
"pane_readiness": "auto"
},
"windows": [
{
"window_name": "editor",
"panes": ["vim"]
}
]
}
See also
Custom workspace builders — narrative guide to selecting, packaging,
writing, and testing builders ·
ClassicWorkspaceBuilder ·
WorkspaceBuilderProtocol