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.
Server 3 types
Direct API
The Java client, opaque: every member beyond java.lang.AutoCloseable#close is an extension, generated from the operation catalog or handwritten where the catalog marks it WAIT , STREAM or LIFECYCLE . Closing an owned client releases its transport, not tmux; close() comes from the AutoCloseable bound with no forwarding of its own, so Using.resource(server) { ... } works.
Observe a tmux server through a continuously updated signal .
Session 2 types
Direct API
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 .
Window 2 types
Direct API
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 .
Cats Effect
A tmux window at a specific session position, with operations in the effect type F .
Pane 2 types
Direct API
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 .
Cats Effect
A tmux pane with input, output, and layout operations in the effect type F .
Client 2 types, 1 function or constant
Direct API
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 .
The captured clients expr matches: a local filter over what is already held.
Hooks 1 type
Read and update tmux hooks through the owning server .
Keys and bindings 1 type
Read and update bindings in tmux key tables.
Buffers 1 type
Read, create, and remove the server's paste buffers.
Environment 1 type
Read and update environment variables for processes started by tmux.
Commands 6 types
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.
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.
Run shell commands through tmux in the effect type F .
Inspect the commands supported by the selected tmux executable.
Read messages recorded by the tmux server.
Read and clear the server's command-prompt history.
Control mode 3 types
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.
Owns an attached Java control client. Canceling an active request can end this attachment and its queued requests and observations. Use separate attachments for commands and observations that must survive that failure.
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
The single match if there is one, None if there is none — still a failure for several.
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
Typed fields for filtering captured pane objects.
Typed fields for filtering captured session objects.
Typed fields for filtering captured window objects.
Typed fields for filtering captured client objects.
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
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 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.
Cats Effect
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.
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.
Direct API
A single-consumer guard over one Java subscription, for direct-style reading.
Errors 1 type
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
Read and update options on the server, session, window, or pane that owns this handle.
By module 9 modules
-
io.github.libtmux.scaladsl.cats 21
-
io.github.libtmux.scaladsl.generated 4
-
io.github.libtmux.scaladsl.live 1
-
io.github.libtmux.scaladsl.ox 1
-
io.github.libtmux.scaladsl.query 3
-
io.github.libtmux.scaladsl.streaming 1
-
io.github.libtmux.scaladsl.Vector 1
-
io.github.libtmux.scaladsl.query.IterableOnce 2