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

Window configuration

Edit this page on GitHub

workspace consumer 0.1.0-alpha.10 · Source

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

Each item in "windows" describes one window and its ordered panes. Set "window_name" when the name matters; an omitted name lets tmux choose it. "window_index" selects a tmux numeric index independently of the item’s position in the list.

session_name: window-example
start_directory: ./
windows:
- window_name: tools
window_index: 1
start_directory: ./
layout: even-horizontal
focus: true
options:
automatic-rename: false
options_after:
synchronize-panes: true
panes:
- echo left
- echo right

This configuration sends each pane its own initial command before enabling synchronized input. Later typing in one synchronized pane can affect the other pane.

Window keysLink to section

KeyMeaning
"window_name"Label used by tmux; shell variables are expanded
"window_index"Explicit numeric position, otherwise use tmux’s available index
"panes"Ordered pane list; omission supplies one blank pane
"layout"Named tmux layout or explicit layout description
start_directoryDirectory inherited by panes unless a pane overrides it
"window_shell"Initial shell/application for panes, subject to pane shell override
focusSelect the window after building
"options"Window options applied during creation
"options_after"Window options applied after panes and their initial commands
"environment"Launch environment used when a pane lacks its own map
shell_command_beforeCommands prepended after session before commands
"suppress_history"Window default overriding the session history policy

First pane and later panesLink to section

A new window already has its initial pane. Tmuxp uses the first configured pane’s start_directory, shell, and environment when launching that window, then creates splits for later panes. A first-pane override therefore matters during new-window, not only while creating splits.

A pane shell overrides window_shell. Window environment is used when the pane has no environment map; providing a pane map selects that map instead. These rules have native-port differences, so use the current builder note on this page.

Index, layout, and focusLink to section

The classic builder moves the temporary initial window before creating the configured first window. This permits an explicit first index without reusing the temporary window’s content. Do not assume window list position and tmux numeric index are identical.

Window options precede layout application. "options_after" exists for settings such as synchronize-panes that should take effect after individual setup commands. Layouts explains named layouts, dimensions, and focus; panes describes the pane forms accepted inside a window.

Current C++ builderLink to section

Names, indexes, directories, environment, options, layouts, focus, and options_after are supported in the subset. Inspect actual creation order and current tmux state when matching reference semantics.

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

Reference sourceLink to section

classic.py; loader.py; 2-pane-synchronized.yaml.

Esc

Type to search.