Workspace ManagerconceptExamples

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

Edit this page on GitHub

Workspace examples

@libtmux/workspace 0.1.0-alpha.12 · Source

Each configuration below is a complete workspace document. Save it to a file and load it on the private socket from the installation walkthrough.

Two blank panes

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 to arrange them vertically.

Setup before pane commands

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 before adding delays or commands that should remain unsubmitted.

More complete examples

Use the workspace library when application code needs to construct sessions directly.

CLI source.

Esc

Type to search.

Reference previewOpen reference