# Pane configuration

Source: https://libtmux.org/en/rs/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`](<https://libtmux.org/en/rs/latest/workspace/reference/config-windowconfig-panes/>) list describes one pane. A string is a command;
`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/rs/latest/workspace/configuration/session/#session-fields-start-directory) overrides the inherited working directory.
- [`shell`](<https://libtmux.org/en/rs/latest/workspace/reference/config-paneconfig-shell/>) overrides the window's launch command.
- [`environment`](https://libtmux.org/en/rs/latest/workspace/configuration/session/#session-fields-environment) supplies the pane's launch environment map.
- [`shell_command_before`](https://libtmux.org/en/rs/latest/workspace/configuration/session/#session-fields-shell-command-before) adds setup after session and window setup.
- `enter`, `sleep_before` and `sleep_after` supply command defaults.
- [`suppress_history`](https://libtmux.org/en/rs/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/rs/latest/workspace/configuration/commands/) for Enter and delay behavior and
[environment](https://libtmux.org/en/rs/latest/workspace/configuration/environment/) for variable handling.

[CLI source](https://github.com/libtmux/libtmux-rs/blob/e9be0b6f6d22cd2eb79b0ec08964f82e717e5fe4/crates/tmux-workspace/docs/cli.md).
