# Workspace examples

Source: https://libtmux.org/en/csharp/latest/workspace/examples/gallery/

> Start from complete configurations for pane layout, commands and environment.

Each configuration below is a complete workspace document. Save it to a file
and load it on the private socket from the
[installation walkthrough](https://libtmux.org/en/csharp/latest/workspace/guides/installation/).

## Two blank panes

```yaml title="gallery-blank.yaml"
session_name: gallery-blank
windows:
  - window_name: work
    layout: even-horizontal
    panes: [null, null]
```

Blank panes open their shells without application-specific prerequisites.
Change the [layout](https://libtmux.org/en/csharp/latest/workspace/configuration/layouts/) to arrange them vertically.

## Setup before pane commands

```yaml title="gallery-commands.yaml"
session_name: gallery-commands
shell_command_before:
  - printf setup
windows:
  - window_name: shell
    panes:
      - shell_command:
          - printf first
          - printf second
```

Both commands run in one pane after its inherited setup. Read
[command ordering](https://libtmux.org/en/csharp/latest/workspace/configuration/commands/) before adding delays or
commands that should remain unsubmitted.

## More complete examples

- [Session options and environment](https://libtmux.org/en/csharp/latest/workspace/configuration/session/).
- [Explicit window index and synchronized input](https://libtmux.org/en/csharp/latest/workspace/configuration/windows/).
- [Pane launch shell and focus](https://libtmux.org/en/csharp/latest/workspace/configuration/panes/).
- [Inherited directories](https://libtmux.org/en/csharp/latest/workspace/configuration/directories/).
- [Environment overrides](https://libtmux.org/en/csharp/latest/workspace/configuration/environment/).
- [Checked bootstrap process](https://libtmux.org/en/csharp/latest/workspace/configuration/hooks/).

Use the [workspace library](https://libtmux.org/en/csharp/latest/workspace/internals/) when application code needs to
construct sessions directly.

[CLI source](https://github.com/libtmux/libtmux-dotnet/blob/f77fe776ba67a04abb20ddbbc26cf4a000d63b74/src/LibTmux.Workspace.Cli/README.md).
