Window.panes
This link's panes, in tmux's order.
Source and package
- Qualified name
-
io.github .libtmux .scaladsl .cats .Window. panes - Package
- io.github.libtmux.scaladsl.cats
- Declared in
Window- Distribution
- io.github.libtmux:libtmux-scala_3
- Source
- libtmux-scala-cats/build/generated/sources/catalog/scala/operations/GeneratedOperations.scala
-
- Type parameters
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 {scalaapplication}repositories { mavenCentral() }dependencies {implementation("io.github.libtmux:libtmux-scala-cats_3:0.1.2")implementation("org.scala-lang:scala3-library_3:3.9.0")}java { toolchain { languageVersion.set(JavaLanguageVersion.of(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/scala/ListPanes.scala. It starts a private tmux server of its own and stops it when the program closes it. View sourcesrc/main/scala/ListPanes.scalaComplete program package io.github.libtmux.examples.api.scalacatsimport io.github.libtmux.{SessionSpec, SplitSpec, WindowSpec}import io.github.libtmux.scaladsl.cats.*import _root_.cats.effect.{ExitCode, IO, IOApp}import _root_.cats.syntax.all.*/** List all panes, then the panes captured for one window. */object ListPanes extends IOApp {def run(args: List[String]): IO[ExitCode] = {val program = Server.start[IO]().use { server =>for {workOne <- server.newSession(SessionSpec.builder().named("work-one").firstWindowNamed("editor").running("/bin/cat").build())_ <- workOne.windows.head.split(SplitSpec.builder().toRight().running("/bin/cat").build())_ <- workOne.newWindow(WindowSpec.builder().named("logs").running("/bin/cat").detached().build())_ <- server.newSession(SessionSpec.builder().named("work-two").firstWindowNamed("editor").running("/bin/cat").build())panes <- server.panes()_ <- IO.println(s"panes=${panes.size}")found <- server.session("work-one")session <- IO.fromOption(found)(new IllegalStateException("missing work-one"))window <- IO.fromOption(session.windows.find(_.name.equals("editor")))(new IllegalStateException("missing editor"))_ <- IO.println(s"window-panes=${window.panes.size}")} yield ()}program.as(ExitCode.Success).handleErrorWith { error =>IO(System.err.println("Example failed: " + error.getMessage)).as(ExitCode.Error)}}}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.scalacats.ListPanes && \build/install/api-example/bin/api-exampleExpected output:
panes=4window-panes=2
Recorded calls
source callsThe Scala 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.scaladsl.cats.Window.panes.
In other ports
task equivalence 19 other ports mappedSource-verified mappings for List a window'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 Scala |
|---|---|---|
| Scala | io This link's panes, in tmux's order. | This page |
| Python | libtmux Panes contained by window. | None recorded in the model |
| Ruby | Lib Behavior: Live acquisition. | None recorded in the model |
| PowerShell | Lib Read panes from a server, session or window. | free function3 overloads Use the -Window parameter set to acquire panes in one window. |
| Julia | Lib | free function2 overloads panes with a captured WindowSnapshot reads panes in that window; missing coverage is an error. |
| Erlang | tmux Traverse a complete captured relationship without I/O. To-many relations return lists; to-one relations return a row or known absence. The input row must belong to this snapshot. Unloaded relations and mismatched rows return tagged errors. | free function Pass panes, a captured physical window and its snapshot for a local relationship read. |
| 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 traverses a captured window without contacting tmux. |
| TypeScript | window Panes of this window placement; a linked window keeps each set apart. | None recorded in the model |
| Rust | window List this window's panes, preserving any failure. | async |
| Go | tmux Panes returns newly allocated shallow copies of panes for this exact winlink, and reports whether the receiver carries relations at all. | None recorded in the model |
| Java | io This link's panes, in tmux's order. A pure read of the capture. | None recorded in the model |
| Clojure | libtmux Returns captured pane occurrences in a snapshot, session, or window. | free function Traverses one capture locally. It does not issue a list-panes command. |
| Kotlin | io This link's panes, in tmux's order. A pure read of the capture. | None recorded in the model |
| C# | Lib Gets the panes the capture found in this window. | None recorded in the model |
| F# | Lib Queries the panes in a window. | free function Builds a deferred pane query from one LibTmux.Window and its server. Query.list acquires panes scoped to that window ID. |
| C++ | libtmux:: | readonly |
| Swift | Snapshot The panes of a window, in tmux's order. | on Snapshot2 overloads |
| OCaml | Libtmux | free function Reads captured panes in one global window without I/O. |
| Perl | Lib LibTmux::Selection of LibTmux::Pane entities. Local captured data; no I/O. | Reads this physical window’s captured panes without I/O. |
| Raku | Lib Captured physical panes; relation traversal never acquires newer data. | None recorded in the model |
No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.
No equivalent is recorded in Lua or Elixir.