Core Library0.xAPI reference

Choose documentation 1

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

Scala API

API reference

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

36 types, 3 functions, 546 methods, 16 fields and 20 constants.

Also on Scaladoc · source libtmux/libtmux-java@4d77001ac74c
Server 3 types
Server type alias API: Direct API 51 members

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

Server class API: Cats Effect 48 members

A tmux server whose operations run in the effect type F.

LiveServer class 3 members

Observe a tmux server through a continuously updated signal.

Session 2 types
Session type alias API: Direct API 25 members

A captured session, opaque over the Java handle; every operation beyond equality is an extension, generated from the operation catalog or handwritten where the catalog marks it WAIT, STREAM or LIFECYCLE.

Session class API: Cats Effect 26 members

A tmux session whose operations run in the effect type F.

Window 2 types
Window type alias API: Direct API 39 members

One captured window placement, opaque over the Java handle. Equality includes its session and index, since a window linked into more than one session has more than one placement. Every operation beyond equality is an extension, generated from the operation catalog or handwritten where the catalog marks it WAIT, STREAM or LIFECYCLE.

Window class API: Cats Effect 38 members

A tmux window at a specific session position, with operations in the effect type F.

Pane 2 types
Pane type alias API: Direct API 62 members

A captured pane occurrence, opaque over the Java handle. Java equality identifies the physical pane; every operation beyond that is an extension, generated from the operation catalog or handwritten where the catalog marks it WAIT, STREAM or LIFECYCLE.

Pane class API: Cats Effect 54 members

A tmux pane with input, output, and layout operations in the effect type F.

Client 2 types, 1 function or constant
Client type alias API: Direct API 12 members

A captured attached client, opaque over the Java handle. Every operation beyond equality is an extension, generated from the operation catalog or handwritten where the catalog marks it WAIT, STREAM or LIFECYCLE.

Client class API: Cats Effect 14 members

An attached tmux client with operations in the effect type F.

matching function

The captured clients expr matches: a local filter over what is already held.

Hooks 1 type
Hooks class 10 members

Read and update tmux hooks through the owning server.

Keys and bindings 1 type
Keys class 9 members

Read and update bindings in tmux key tables.

Buffers 1 type
Buffers class 11 members

Read, create, and remove the server's paste buffers.

Environment 1 type
Environment class 14 members

Read and update environment variables for processes started by tmux.

Commands 6 types
Batch class 5 members

An immutable batch plan. Construction does no tmux I/O and never touches a shared Java object: each add returns a new value holding one more argument vector. Each run/length builds a fresh Java Batch from create and dispatches it through Execution, so it is F-suspended, cancellation-safe, and admission-bounded like every other Cats operation — cancelling one run never disturbs a concurrent one, since neither shares Java state.

CommandChain class 8 members

An immutable plan using tmux's evolving current target. Construction does no tmux I/O; each run builds a fresh Java chain from create and dispatches it through Execution, F-suspended and cancellation-safe like every other Cats operation.

Shell class 8 members

Run shell commands through tmux in the effect type F.

Commands class 6 members

Inspect the commands supported by the selected tmux executable.

MessageLog class 6 members

Read messages recorded by the tmux server.

Prompt class 7 members

Read and clear the server's command-prompt history.

Control mode 3 types
Channel class 3 members

One of tmux's wait-for channels. signal is a real dispatch (tmux's own wait-for -S), routed through Execution#apply like any other mutation; await reserves this server's shared-wait capacity the way every other handwritten WAIT operation does, since a Cats caller waiting and the caller releasing it usually share this same bounded transport.

Control class 11 members

Owns an attached Java control client. Canceling one call interrupts only its caller. A deadline after dispatch or releasing this resource can end the attachment and its queued requests and observations. Use separate attachments when those lifetimes must be independent.

Flows module 2 members

An Ox Flow over a subscription or a live view, for a supervised scope. Ox adds no new handle type (io.github.libtmux.scaladsl's opaque handles work unchanged inside a fork); what it needs from this project is the same single-owner discipline the direct-style Observation and LiveView already give a blocking caller, expressed as a cold Flow instead of an Iterator.

Queries 2 functions and constants
atMostOne function

The single match if there is one, None if there is none — still a failure for several.

exactlyOne function

The single match, or a failure naming which way the count was wrong. Single-pass: mirrors Selections.exactlyOne's early exit, stopping at the second match.

Queries — Fields 5 types
PaneFields module 14 members

Typed fields for filtering captured pane objects.

SessionFields module 5 members

Typed fields for filtering captured session objects.

WindowFields module 10 members

Typed fields for filtering captured window objects.

ClientFields module 2 members

Typed fields for filtering captured client objects.

Fields module 5 members

Typed field handles, wrapping Java's io.github.libtmux.query.Fields records so every operator returns this facade's Expr rather than a raw Java FilterExpr. An extension cannot reshape these methods' return type on the Java records directly — same-named would silently lose to the Java member, exactly the trap -Werror exists to catch — so each kind gets its own small Scala class instead, one line per operator, forwarding to the Java one underneath.

Queries — Expressions 1 type
Expr type alias 10 members

A filter over T, both runnable and readable, opaque over Java's own FilterExpr[T] — lossless by construction, the same reasoning io.github.libtmux.scaladsl.Pane and its siblings rest on. T is the raw Java handle type a Java field metamodel (Pane_, Session_, ...) is built over, not this facade's opaque one: a query is a Java-shaped value that this facade's own .matching extensions apply to captured Scala handles.

Snapshots 4 types
Instances module 13 members

Instances derived from Java's equals/hashCode/toString, and from TmuxVersion's own Comparable — the one handle-adjacent type that actually has a natural order. None of Server, Session, Window, Pane or Client implements Comparable in Java, and none has a domain-meaningful order (a pane's tmux index is not identity, and two panes can share an index across different windows), so those get Eq/Show/Hash only — never a manufactured Order that invites .sorted/SortedSet producing an ordering nobody asked for.

Observation class API: Cats Effect 6 members

Pulls a bounded Java subscription with one active stream consumer. A full buffer yields a Delivery.Gap in this stream before the events that remain. FS2 demand does not provide tmux backpressure. A subscription does not reconnect: attach again and read a snapshot.

LiveView type alias 8 members

A live view of one tmux server's sessions, windows, panes and clients, opaque over Java's own ServerMirror — re-snapshotting on notification, on a gap and on reconnect is entirely Java's job; this only wraps it, rather than re-deriving resnapshot-on-notification from a raw control subscription. close() comes from the AutoCloseable bound with no forwarding of its own.

Observation class API: Direct API 4 members

A single-consumer guard over one Java subscription, for direct-style reading.

Errors 1 type
CardinalityError enum 3 members

Mirrors CardinalityException's two leaves losslessly, including the match count Java's own MultipleMatches.atLeast() carries — dropping it would be exactly the hand-authored lossy projection this facade's opaque handles exist to make impossible everywhere else.

Constants and enums 1 type
Options class 13 members

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

By module 9 modules

Esc
Search in

Type to search.

Reference previewOpen reference