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

method libtmux-scala

Window.panes

This link's panes.

Source and package
Qualified name
io.github.libtmux.scaladsl.Window.panes
Package
io.github.libtmux.scaladsl
Declared in
Window
Distribution
io.github.libtmux:libtmux-scala_3
Source
libtmux-scala/build/generated/sources/catalog/scala/fields/GeneratedFields.scala
Scala method declarationsDeclares a method, with its name, parameter lists and return type.Language documentation panes: _root_.io.github.libtmux.scaladsl.query.Fields.ToManyRef[ JavaWindow, JavaPane ]Scala extension methodsAdds methods callable on the receiver type without changing its definition.Language documentation (self: Window) Scala method declarationsDeclares a method, with its name, parameter lists and return type.Language documentation panes: Vector[Pane]

Exported from io.github.libtmux.scaladsl.generated.WindowFields.panes

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/cat and /bin/sh available. In an empty directory, save this consumer setup as settings.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 {
scala
application
}
repositories { mavenCentral() }
dependencies {
implementation("io.github.libtmux:libtmux-scala_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 source

gradle.properties
org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=768m -Dfile.encoding=UTF-8
kotlin.daemon.jvmargs=-Xmx2g
org.gradle.workers.max=2

Save 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 source

src/main/scala/ListPanes.scalaComplete program
package io.github.libtmux.examples.api.scaladirect
import io.github.libtmux.{SessionSpec, SplitSpec, WindowSpec}
import io.github.libtmux.scaladsl.*
import scala.util.Using
import scala.util.control.NonFatal
/** List all panes, then the panes captured for one window. */
object ListPanes {
def main(args: Array[String]): Unit = {
try {
Using.resource(Server.start()) { server =>
val 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()
)
println(s"panes=${server.panes().size}")
val session =
server.session("work-one").getOrElse(sys.error("missing work-one"))
val window = session.windows
.find(_.name.equals("editor"))
.getOrElse(sys.error("missing editor"))
println(s"window-panes=${window.panes.size}")
}
} catch {
case NonFatal(error) =>
System.err.println("Example failed: " + error.getMessage)
sys.exit(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.scaladirect.ListPanes && \
build/install/api-example/bin/api-example

Expected output:

panes=4
window-panes=2

Recorded calls

source calls
No call edges in the Scala model.

The 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.Window.panes.

In other ports

task equivalence 19 other ports mapped

Source-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.

List a window's panes in each port
PortAPIDiffers from Scala
Scala io.github.libtmux.scaladsl.Window.panes
This link's panes.
This page
Python libtmux.Window.panes
Panes contained by window.
None recorded in the model
Ruby LibTmux::Window#list_panes
Behavior: Live acquisition.
None recorded in the model
PowerShell LibTmux\Get-TmuxPane
Read panes from a server, session or window.
free function3 overloads
Use the -Window parameter set to acquire panes in one window.
Julia LibTmux.panes free function
panes with a captured WindowSnapshot reads panes in that window; missing coverage is an error.
Erlang tmux_snapshot:related/3
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:panes
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.Window.panes
Panes of this window placement; a linked window keeps each set apart.
None recorded in the model
Rust window.Window.panes
List this window's panes, preserving any failure.
async
Go tmux.Window.Panes
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.github.libtmux.Window.panes
This link's panes, in tmux's order. A pure read of the capture.
None recorded in the model
Clojure libtmux.data/panes
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.github.libtmux.kotlin.Window.panes
This link's panes, in tmux's order. A pure read of the capture.
None recorded in the model
C# LibTmux.Window.Panes
Gets the panes the capture found in this window.
None recorded in the model
F# LibTmux.FSharp.Window.panes
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::Window::panes readonly
Swift Snapshot.panes(of:)
The panes of a window, in tmux's order.
on Snapshot
OCaml Libtmux.Window.panes free function
Reads captured panes in one global window without I/O.
Perl LibTmux::Window::panes
LibTmux::Selection of LibTmux::Pane entities. Local captured data; no I/O.
Reads this physical window’s captured panes without I/O.
Raku LibTmux::Model::Window.panes
Captured physical panes; relation traversal never acquires newer data.
None recorded in the model
No Haskell equivalent.

No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.

No equivalent is recorded in Lua or Elixir.

Esc
Search in

Type to search.

Reference previewOpen reference