Pane
A tmux pane, with operations for input, output, and layout.
Source and package
- Qualified name
-
io.github .libtmux .kotlin. Pane - Package
- io.github.libtmux.kotlin
- Distribution
- io.github.libtmux:libtmux-kotlin
- Source
- libtmux-kotlin/src/main/kotlin/io/github/libtmux/kotlin/Pane.kt
-
Description
Holds the Java handle privately, so a member here always wins over a same-named catalog-generated extension in
PaneOperations.kt.Companionhosts the generated query field namespace (Pane.command,Pane.active, ...).A property or a plain function here reads the capture this handle came from and issues no command. Every
suspendfunction asks tmux now, dispatched through theServer's policy, except the waits, which run on their own dispatcher.What is on here
The members fall into a few groups:
- Reading the capture
id,index,active,currentCommand,floating,size,position,edges,title,currentPathandpidread what this capture stored about the pane, andwindowandserverare what it sits in. The id is stable and the index is state, since panes renumber as neighbours come and go.floatingis null when the running tmux cannot say, which before 3.7 is always, andpidis null when tmux reported no process.currentPaththrows when this JVM cannot represent the directory's name.- Sending input
sendtypes keys without pressing Enter andsendLinepresses it, which is how a command gets run.sendKeysresolves each entry through tmux's key table and types an unknown name as text;sendLiteraltypes every entry as the characters it spells, soC-cis three characters.pastedelivers text as one block through a private buffer that is removed afterwards, and it throws for text containing NUL and before tmux 3.4.noteTypedtells a later wait about text that reached the pane without passing through this handle.- Reading output
capturereturns the visible content, one element per line, read from tmux now rather than from the capture. Give it aCaptureSpecto read part of the history; it throws when the spec asks for something this server does not have.pipeTosends everything the pane prints to a shell command untilstopPiping, andclearHistorydiscards the scrollback.- Running and waiting
runruns a shell command to its end and answers with its exit status and output, and throws when the pane is not running a POSIX shell. Reach for it first when the command is yours. When it is not,awaitTextandawaitpoll the screen or the pane's state on a timer and answer with why they ended; a pane killed mid-wait endsawaitTextasTextOutcome.PANE_GONErather than an exception. Cancelling the coroutine interrupts a wait and is not a timeout.deadreads fresh whether the pane's process has exited, and throws when the pane is gone from a server that still answers.- Splitting and arranging
splitdivides this pane in half, or as aSplitSpecdescribes, and returns the pane that appeared.breakOutmoves the pane into a window of its own,joinTointo another window, andswapWithswaps it with another pane.resizegrows it by cells in one direction,resizeTosets exact dimensions, andselectmakes it the active pane. An unnamedbreakOutthrows on exact tmux 3.7, which a named break or 3.7a avoids.- Modes
copyModeputs the pane into copy mode,modereads live which mode it is in, null when it is showing its program, andexitModeleaves whichever mode it is in.- Changing the pane
retitlereturns a replacement capture, because this handle keeps its original state.respawnkills what runs here and starts the pane's default command or one you give,respawnIndoes so in a directory, andkillcloses the pane.- Formats and refreshing
expandexpands a tmux format, andvariablesreads several named variables, in this pane's context.refreshtakes a new capture to see the pane as it is now. It leaves this handle unchanged and returns the new one, and throws if the pane is gone from a server that still answers.
Members53 members
Parent objects2
Common operations7
- capture method This pane's visible content, one element per line.
- sendKeys method Sends an ordered group of key names to this pane, as tmux resolves them.
- split method Splits this pane in half, putting the new one below it.
- currentCommand property The command tmux reported running here.
- options method This pane's own options.
- awaitText method Waits until
textshows in this pane. - sendLine method Sends a line to this pane and presses Enter, which is how a command gets run.
Other members44
- active property Whether this was its window's active pane when captured.
- asJava property The Java pane this wraps: the same object, for a Java API that takes one.
- await method Waits until
settledaccepts this pane, read fresh from tmux before each test. - batch method Collects commands fenced to the server incarnation that produced this pane.
- breakOut method Moves this pane into a window of its own, leaving tmux to name it.
- clearHistory method Discards this pane's scrollback.
- Companion module
- copyMode method Puts this pane into copy mode, where its scrollback can be navigated.
- currentPath property The working directory tmux reported for the pane.
- dead method Whether this pane's process has exited, read fresh rather than from the capture.
- edges property Which sides of its window the pane touches.
- equals method
- exitMode method Leaves whichever mode this pane is in.
- expand method Expands a tmux format in this pane's context, and answers with what it came to.
- floating property Whether this pane floats, or null when the running tmux cannot say.
- hashCode method
- hooks method This pane's own hooks.
- id property The pane's stable id.
- index property The pane's position, which shifts as neighbours come and go.
- joinTo method Moves this pane into another window, splitting it.
- kill method Closes this pane.
- mode method Which mode this pane is in at this moment, or empty when it is in none.
- noteTyped method Notes text that reached this pane without going through this handle, so a wait discounts its echo the way it discounts text sent through
.sendLiteral. - paste method Pastes text into this pane as one block, leaving nothing behind on the server.
- pasteBuffer method Pastes a named buffer into this pane, as though it had been typed.
- pid property The process id of the program running in the pane, captured at the time of the read.
- pipeTo method Sends everything this pane prints to a shell command, until
.stopPiping. - position property Where the pane's top-left corner sat in its window when captured, in terminal cells.
- refresh method Takes a new capture and returns this pane as it is now.
- resize method Grows this pane by a number of cells in one direction.
- resizeTo method Resizes this pane.
- respawn method Kills whatever runs here and starts the pane's default command again.
- respawnIn method Restarts the configured pane process in a caller-supplied literal directory, resolved against this process's working directory when relative.
- retitle method Retitles this pane and returns its replacement capture.
- run method Runs a shell command in this pane to its end, and answers with its exit status and output.
- select method Makes this the active pane of its window.
- send method Sends keys to this pane without pressing Enter.
- sendLiteral method Sends an ordered group of strings to this pane as the characters they spell.
- size property How large the pane was when captured, in terminal cells.
- stopPiping method Stops sending this pane's output anywhere.
- swapWith method Swaps this pane's position with another's.
- title property The pane title, which a program running inside it can change.
- toString method
- variables method Reads validated tmux variables in this pane's format context.
No members of Pane match . The filter searches only this type. Search the whole API.
Order: the accessors that walk the hierarchy, the operations the ports share, then the rest.
Guides
task materialPages that discuss Pane.
- Concepts
In other ports
task equivalence 22 other ports mappedSource-verified mappings for A tmux pane. A mapping says these APIs perform the same task. It does not say they share defaults, errors or completion: check each page.
| Port | API | Differs from Kotlin |
|---|---|---|
| Kotlin | io A tmux pane, with operations for input, output, and layout. | This page |
| Python | libtmux tmux(1) Pane [pane_manual]. | None recorded in the model |
| Ruby | Lib | None recorded in the model |
| Lua | libtmux | None recorded in the model |
| PowerShell | Lib Read panes from a server, session or window. | 3 overloads This cmdlet reads shared .NET LibTmux.Pane objects. Its -Server, -Session, and -Window parameter sets select the scope. |
| Julia | Lib | 2 overloads PaneSnapshot holds captured pane data. Actions use its PaneRef; PaneOccurrence adds a window placement in a session. |
| Erlang | #tmux | None recorded in the model |
| Elixir | Lib An immutable physical pane. It belongs to a window; text may be empty. | Pane is an immutable physical pane observation. It does not send keys or capture text. |
| Haskell | Lib Detached physical pane. Its window can appear in several session contexts;
PaneOccurrence preserves an appearance without duplicating physical identity. | Pane is a detached physical pane. PaneOccurrence keeps the window placement it was seen in, and operations take a generation-bound PaneRef. |
| Common Lisp | libtmux: A physical pane belonging to one captured window. | pane is an immutable captured physical pane. |
| TypeScript | pane One pane on one tmux server, as a handle rather than a copy of it. | None recorded in the model |
| Rust | pane One tmux pane, as reached through one window link. | None recorded in the model |
| Go | tmux Pane is one materialized pane record within a specific winlink. It is normally returned by Server.Snapshot, Server.Pane, or Pane.Refresh. A zero Pane is not a usable tmux target. | None recorded in the model |
| Java | io One tmux pane, as one capture saw it. | readonly |
| Clojure | libtmux Returns captured pane occurrences in a snapshot, session, or window. | Traverses captured pane maps without I/O. Use keyword lookup for scalar observations and the preserved :tmux/ref for effects. |
| Scala | io 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. | 2 overloads |
| C# | Lib Represents an immutable pane handle and snapshot. | None recorded in the model |
| F# | Lib Reads captured pane fields and starts explicit pane operations. | This F# module reads captured fields and starts explicit operations on the shared .NET LibTmux.Pane type. |
| C++ | libtmux:: One pane, as one listing saw it. | None recorded in the model |
| Swift | Pane A tmux pane, as it was when the listing was read. | None recorded in the model |
| OCaml | Libtmux | None recorded in the model |
| Perl | Lib Captured pane entity | A physical pane retains its captured graph, without retaining transport. |
| Raku | Lib Captured pane fields and its local physical-window relationship. | None recorded in the model |