Core Library0.xTopics

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.

MoreLess about this notice
Edit this page on GitHub

Architecture

Needs libtmux for C++ 0.x Install

A server handle selects a tmux server. Object IDs select sessions, windows, and panes within it. For the object hierarchy and stable IDs, start with Server, session, window, pane.

Calling operations

Session, window, and pane handles carry their ID and server context. Call an operation on the object you want to change. The examples below send input and kill that pane.

pane->send_text("echo hi");
pane->kill();

Reading tmux fields

Object IDs become tmux targets (-t). Format variables (#{...}) provide the state returned by tmux.

Handles capture a fixed set of non-optional fields. Use pane->expand("#{...}") for tokens outside those fields. Format-token fields covers their interpretation.

Source layout

include/libtmux/entities.hpp declares Session, Window, and Pane. Their method bodies live in src/. include/libtmux/server.hpp, include/libtmux/options.hpp, and include/libtmux/capabilities.hpp define server operations, options, and capability checks.

The include/libtmux/testing/ component is separate from the library; Context managers explains its test-server ownership.

Esc
Search in

Type to search.

Reference previewOpen reference