Workspace ManagerconceptAPI Reference

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.

Workspace Manager: API Reference

Edit this page on GitHub

C++ workspace builder API

workspace consumer 0.1.0 · Source

The workspace API described here belongs to the repository consumer. Its headers are available through the workspace_builder target and are not installed core library headers.

Typed description

libtmux_consumers/workspace.hpp defines the libtmux::workspace namespace:

  • Workspace holds the session name, directories, options, environment, and windows.
  • Window holds layout, options, index, focus, and panes.
  • Pane holds its shell, directory, environment, focus, and commands.
  • Command controls text, Enter, delays, and history suppression.

build(const Server&, const Workspace&) returns libtmux::expected<libtmux::Session, BuildError>. BuildError contains a window index and reason. It does not contain a rollback result or guarantee that the server is unchanged.

YAML reader

libtmux_consumers/tmuxp.hpp declares parse_tmuxp(std::string_view), returning libtmux::expected<Workspace, ParseError>. ParseError.where identifies the configuration path and reason explains the refusal.

The compiled implementation in src/tmuxp.cpp is the part that depends on yaml-cpp. Applications constructing Workspace values directly do not need to parse YAML.

Core operations

The returned session is a core libtmux value. Use the C++ core reference for subsequent inspection and mutation. Consumer source contracts remain the authority for the workspace types.

Workspace header; YAML header.

API declarations

Follow a declaration for its signature, members, documentation, and source.

Workspace files

libtmux::workspace::append
libtmux::workspace::BeforeBuild
libtmux::workspace::Command
libtmux::workspace::Pane
libtmux::workspace::parse_tmuxp
libtmux::workspace::validate_layouts
libtmux::workspace::Window
libtmux::workspace::Workspace

Building and freezing

libtmux::workspace::build
libtmux::workspace::BuildEvent
libtmux::workspace::BuildObserver
libtmux::workspace::BuildPhase
libtmux::workspace::BuildStop

Errors

libtmux::workspace::BuildError
libtmux::workspace::ParseError
Esc

Type to search.

Reference previewOpen reference