Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

Develop the C++ workspace consumer

C++

Edit this page on GitHub

workspace consumer 0.1.0-alpha.10 · Source

Try the workspace consumer from the libtmux C++ source checkout. It is built as a repository target, so installing the core package alone does not provide its headers or YAML reader.

Build the consumerLink to section

Use the repository’s prepared development toolchain and install tmux. From the checkout root, configure the development preset:

Terminal window
$ cmake --preset cxx-dev

Build the workspace test executable:

Terminal window
$ cmake --build --preset cxx-dev --target workspace_builder_test

Run the consumer tests against their isolated tmux fixtures:

Terminal window
$ ctest --preset cxx-dev -R consumer.workspace --output-on-failure

The tests exercise both YAML parsing and typed configuration. The example shows the session shape used by the builder test.

Use it in an applicationLink to section

The workspace_builder CMake target provides the consumer include directory, links the core libtmux::libtmux target publicly, and keeps yaml-cpp private to the YAML reader. If you adapt the consumer, preserve those dependency boundaries and include the parser implementation when using parse_tmuxp.

Parse first and inspect ParseError before contacting tmux. Start the target tmux server before opening its core handle, as the test fixture does. Pass a core Server and the parsed description to build. Check the returned expected value before reading its session; after failure, inspect the target server because earlier operations may remain.

There is no separate installed workspace product in this source tree. Do not expect core package managers to expose libtmux_consumers/workspace.hpp.

Consumer build targets

Esc

Type to search.