# Pane configuration

Source: https://libtmux.org/en/ts/latest/workspace/configuration/panes/

> Choose pane commands, launch settings and focus.

**Workspace Manager concept example** A working example of the core library. It can change without notice.



Each entry in a window's `panes` list describes one pane. A string is a command;
[`null`](<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/null>) leaves a blank shell pane. A mapping provides launch and command settings.

```yaml title="panes.yaml"
session_name: panes-example
windows:
  - window_name: work
    layout: even-horizontal
    panes:
      - null
      - shell: /bin/sh
        focus: true
        shell_command:
          - printf ready
          - printf second
```

The second pane launches `/bin/sh`, receives both commands in order and becomes
the active pane. A command list inside one pane does not create extra panes.

## Overrides

- [`start_directory`](https://libtmux.org/en/ts/latest/workspace/configuration/session/#session-fields-start-directory) overrides the inherited working directory.
- `shell` overrides the window's launch command.
- [`environment`](https://libtmux.org/en/ts/latest/workspace/configuration/session/#session-fields-environment) supplies the pane's launch environment map.
- [`shell_command_before`](https://libtmux.org/en/ts/latest/workspace/configuration/session/#session-fields-shell-command-before) adds setup after session and window setup.
- [`enter`](<https://libtmux.org/en/ts/latest/reference/types-sendkeysoptions-enter/>), `sleep_before` and `sleep_after` supply command defaults.
- [`suppress_history`](https://libtmux.org/en/ts/latest/workspace/configuration/session/#session-fields-suppress-history) overrides the inherited history policy.

Set focus explicitly when automation depends on which pane is selected. Use
returned pane IDs for later operations instead of assuming that creation order
is a stable tmux ID.

Read [commands](https://libtmux.org/en/ts/latest/workspace/configuration/commands/) for Enter and delay behavior and
[environment](https://libtmux.org/en/ts/latest/workspace/configuration/environment/) for variable handling.

[CLI source](https://github.com/libtmux/libtmux-ts/blob/f36d692552bb9a373b45338bb5fece854e57cc3d/packages/workspace-cli/README.md).
