Core LibraryAPI Reference

Choose documentation 1

latest

Current version

latest
English

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

API reference

Browse the Kotlin types and operations for working with tmux. Start with the core objects below, or search for a type or member.

Server 2 types, 1 function or constant
Server 49 members

Manages sessions, windows, and panes on a tmux server.

LibTmuxDsl annotation

Marks every builder below so an inner block cannot reach an outer block's receiver by accident: split { directory = x } inside window { } resolves to the innermost SplitBuilder , never to the WindowBuilder it is nested in. Reaching the outer receiver on purpose still works, spelled explicitly (this@window.directory = x).

withServer function

Opens a Server , runs block , and closes it — even if block throws or is cancelled.

Session 2 types
Session 26 members

A tmux session and its captured windows and properties.

SessionBuilder 5 members

Configure a new session, its initial command, and its windows with Server.newSession .

Window 2 types
Window 38 members

A tmux window at a specific position in a session.

WindowBuilder 5 members

Configure a window and its pane splits inside a SessionBuilder block.

Pane 1 type
Pane 53 members

A tmux pane, with operations for input, output, and layout.

Client 1 type
Client 15 members

An attached tmux client and its captured properties.

Hooks 1 type
Hooks 10 members

Read and update hooks for the server, session, window, or pane that owns this handle.

Options — Functions 2 functions and constants
orNull function

java.util.OptionalInt

The value, or null when absent: an exit status, a captured server pid.

orNull function

java.util.OptionalLong

The value, or null when absent.

Keys and bindings 1 type
Keys 9 members

The server's key bindings, in one key table or across all of them.

Buffers 1 type
Buffers 11 members

The tmux server's paste buffers.

Layout and geometry 1 type
SplitBuilder 8 members

Choose the position, size, and working directory of a new pane split.

Environment 1 type
Environment 14 members

Read and update environment variables used to start processes in tmux.

Commands 7 types, 1 function or constant
Batch 9 members

Several tmux commands collected to run together in one invocation.

CommandChain 13 members

A sequence of tmux commands where each one acts on what the last one made.

Commands 6 members

The commands this tmux knows, read without starting a server to answer.

ExecutionPolicy 4 members

Controls the dispatchers and concurrency limits for a Server 's suspending operations.

MessageLog 6 members

The server's own message log, newest last.

Prompt 7 members

The server's command-prompt history.

Shell 8 members

A shell command run by tmux, and a tmux command chosen by a shell command's exit status.

retryIfSafe function

Retries block up to times more times after a DispatchException whose DispatchException.safeToRetry says the exact same request can be sent again.

Control mode 1 type, 3 functions and constants
ControlClient 11 members

A tmux client that stays attached and answers one command at a time.

await function

Waits for something to signal this channel.

awaitReservingCapacity function

As await , while preserving process capacity for a call that signals it.

Queries 2 functions and constants
filter function

Selects the elements an expression matches.

not function

Inverts an expression, so !Pane_.active().isTrue() says what it means.

Queries — Fields 5 types
TextField 7 members

Kotlin-idiomatic wrappers over Fields ' typed field handles, each holding the Java handle it wraps. A value class, so this costs nothing beyond the Java object it already holds — the same choice io.github.libtmux.kotlin.Server 's live handles reject, made here on purpose: a field handle carries exactly one property, which is what makes the boxing tradeoff free.

NumberField 6 members

Build numeric comparisons for a captured tmux field.

FlagField 2 members

Match a captured boolean field against true or false.

ToManyField 3 members

Match an object by the captured children related to it.

ToOneField 1 members

Match an object by one captured related object.

Constants and enums 1 type
Options 13 members

Read and update options for the server, session, window, or pane that owns this handle.

By module 8 modules

Esc

Type to search.