Server.panes
Captures every pane on the server.
Source and package
- Qualified name
-
io.github .libtmux .kotlin .Server. panes - Package
- io.github.libtmux.kotlin
- Declared in
Server- Distribution
- io.github.libtmux:libtmux-kotlin
- Source
- libtmux-kotlin/build/generated/sources/operations/kotlin/io/github/libtmux/kotlin/ServerOperations.kt
- public
Kotlin suspending functionsAllows a function to call suspending operations and pause without blocking a thread. It does not start a coroutine by itself. fun Server.panes(): List<Pane>publicKotlin suspending functionsAllows a function to call suspending operations and pause without blocking a thread. It does not start a coroutine by itself. fun Server.panes( expression: FilterExpr <io.github > ): List<Pane>.libtmux .Pane -
- Parameters
-
-
expression(FilterExpr <io.github >) for.libtmux .Pane panes(expression)
-
Examples
List all panes, then the panes captured for one window. Use JDK 25, Gradle 9 or newer, and tmux 3.3a or newer on Linux, with
/bin/catand/bin/shavailable. In an empty directory, save this consumer setup assettings.gradle.kts:rootProject.name = "api-example"Save this consumer setup as
build.gradle.kts. It depends on the 0.1.2 release from Maven Central:plugins {kotlin("jvm") version "2.4.10"application}repositories { mavenCentral() }dependencies {implementation("io.github.libtmux:libtmux-kotlin:0.1.2")}java { toolchain { languageVersion.set(JavaLanguageVersion.of(25)) } }kotlin { jvmToolchain(25) }application { mainClass.set(providers.gradleProperty("exampleMain")) }Save this consumer setup as
gradle.properties: View sourcegradle.properties org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=768m -Dfile.encoding=UTF-8kotlin.daemon.jvmargs=-Xmx2gorg.gradle.workers.max=2Save this complete program as
src/main/kotlin/ListPanes.kt. It starts a private tmux server of its own and stops it when the program closes it. View sourcesrc/main/kotlin/ListPanes.ktComplete program package io.github.libtmux.examples.api.kotlinimport io.github.libtmux.SplitSpecimport io.github.libtmux.kotlin.*import io.github.libtmux.kotlin.query.nameimport kotlin.system.exitProcessimport kotlinx.coroutines.runBlocking/** List all panes, then the panes captured for one window. */fun main() {try {runBlocking {withPrivateServer { server ->val workOne = server.newSession {name = "work-one"window { name = "editor"; running("/bin/cat") }window { name = "logs"; running("/bin/cat") }}workOne.windows.first().split(SplitSpec.builder().toRight().running("/bin/cat").build())server.newSession {name = "work-two"window { name = "editor"; running("/bin/cat") }}println("panes=${server.panes().size}")val session = server.session(Session.name eq "work-one")val window = session.windows.single { it.name == "editor" }println("window-panes=${window.panes.size}")}}} catch (error: Exception) {if (error is InterruptedException) Thread.currentThread().interrupt()System.err.println("Example failed: ${error.message}")exitProcess(1)}}Build the minimal consumer with Gradle and run the saved program. An operation or cleanup error makes the command exit unsuccessfully:
Terminal window $ gradle --console=plain --quiet installDist -PexampleMain=io.github.libtmux.examples.api.kotlin.ListPanesKt && \build/install/api-example/bin/api-exampleExpected output:
panes=4window-panes=2
Same owner
containment 1 of 51 shownOther members of io.github.libtmux.kotlin.Server whose names share panes. They sit on the same type; that does not make them behave alike.
Recorded calls
source callsThe Kotlin reference records declarations, not calls, so this page shows no callers or callees. That is a limit of the extracted data, not a statement that nothing calls io.github.libtmux.kotlin.Server.panes.
tmux command
task materialThe tmux commands behind panes.
list-panes -a server scope, cmd_list_panes_server tmux C API
task materialThe C declarations in tmux that implement these commands.
In other ports
task equivalence 21 other ports mappedSource-verified mappings for List the server's panes. 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 Captures every pane on the server. | This page |
| Python | libtmux Panes contained in tmux server (across all windows in all sessions). | None recorded in the model |
| Ruby | Lib Behavior: Live acquisition. | None recorded in the model |
| Lua | libtmux | None recorded in the model |
| PowerShell | Lib Read panes from a server, session or window. | free function3 overloads Use the -Server parameter set to acquire panes across the server. |
| Julia | Lib | free function panes with a Snapshot reads every captured physical pane. Use paneoccurrences for session placements. |
| Erlang | tmux Return unique captured physical panes in numeric ID order without I/O. related/3 orders panes within a window by pane index. | free function Returns unique captured physical panes without tmux I/O. |
| Elixir | Lib Returns a materialized physical pane selection without I/O. | on Snapshot Returns a Selection of every captured physical pane without contacting tmux. |
| Common Lisp | libtmux: Return a fresh vector of captured physical panes, without I/O.
Snapshots preserve first occurrence; windows preserve the captured pane order. | free function3 overloads panes on a snapshot returns captured physical panes once each. |
| TypeScript | server Every pane on the server. | None recorded in the model |
| Rust | server List every pane on the server, preserving any failure. | None recorded in the model |
| Go | tmux Panes materializes pane records for every winlink. Failures, including ErrNoServer, remain errors rather than empty results. | None recorded in the model |
| Java | io Captures every pane on the server. | None recorded in the model |
| Clojure | libtmux Acquires captured pane occurrences. | free function Acquires a new graph and returns its pane occurrences. |
| Scala | io Captures every pane on the server. | None recorded in the model |
| C# | Lib Gets the panes this handle captured, across every window. | None recorded in the model |
| F# | Lib Queries every pane. | free function Builds a deferred pane query on the shared .NET LibTmux.Server. Query.list acquires panes across that server. |
| C++ | libtmux:: | readonly |
| Swift | Server Every pane on this server, in tmux's own order. A pane whose window has several session links appears once. | None recorded in the model |
| OCaml | Libtmux | free function |
| Perl | Lib Return a fresh LibTmux::PaneSelection containing each physical pane identity once. Membership edits cannot change the graph store. | on Snapshot One entry per captured physical pane; raw listings preserve contextual rows separately. |
| Raku | Lib Captured physical panes; relation traversal never acquires newer data. | on Snapshot |
No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.