Core Library0.xAPI reference

Choose documentation 2

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

cmdlet libtmux-powershell

LibTmux.Get-TmuxWindow

Read contextual windows from a server or session.

Source and package
Qualified name
LibTmux\Get-TmuxWindow
Declared in
LibTmux
Package
LibTmux
Source
src/LibTmux.PowerShell/GetTmuxWindowCommand.cs
Server (default): Get-TmuxWindow [-Server] <LibTmux.Server> [-Id <System.String>] [-Name <System.String>] [<CommonParameters>]Session: Get-TmuxWindow [-Session] <LibTmux.Session> [-Id <System.String>] [-Name <System.String>] [<CommonParameters>]

Description

Accept a native Server or Session as the owner. Each result retains its session placement. A linked window can therefore appear more than once. Id and Name are ordinal literal selectors; they do not expand wildcards.

What is on here. A window is the native LibTmux.Window that Get-TmuxWindow returns. It carries its session placement, so a window linked into two sessions appears twice. The cmdlets below return one, take one directly or from the pipeline, or query for one. They fall into a few groups:

Finding windows
Get-TmuxWindow lists the windows of a server or a session, or the ones that match an exact id or name. Get-TmuxPane lists the panes of one window. Get-TmuxSnapshot captures windows with their panes, and Get-TmuxClientAttachment resolves the window a client is viewing.
Filtering and querying windows
Select-TmuxWindow filters windows you already captured without contacting tmux, and can require exactly one match. New-TmuxQuery builds criteria for the Window target and Get-TmuxQueryField lists the fields they accept. Invoke-TmuxQuery acquires fresh windows instead.
Creating, renaming and removing a window
New-TmuxWindow creates a window and its first pane in a session, and returns it. Rename-TmuxWindow names the window by id and, with PassThru, returns a replacement that carries the new name. Remove-TmuxWindow destroys the physical window and its panes in every session that links it.
Linking and moving a window
New-TmuxWindowLink links a window into another session. Move-TmuxWindow moves one placement, within its session or to another. Remove-TmuxWindowLink removes one placement and leaves the other links alone; tmux refuses to remove the last one unless you pass KillIfLast.
Arranging and resizing a window
Set-TmuxLayout applies a named preset or a layout string you captured, and arranges the panes. Set-TmuxWindowSize resizes the window in cells or against its attached clients.

Notes

Global window identity differs from session-relative placement. Do not silently deduplicate results when placement index matters.

Command details

Command type
cmdlet
Default parameter set
Server
Positional binding
Enabled.
Pipeline inputs
LibTmux.Server: Native pipeline type for this command.; LibTmux.Session: Native pipeline type for this command.
Outputs
LibTmux.Window
Parameters
Common parameters 12

PowerShell supplies these parameters. See common parameter behavior for their effects.

Returns

LibTmux.Window: Native pipeline type for this command.

Examples

Example 1 List window placements on the existing server identified by $SocketPath. View source

Terminal window
LibTmux\New-TmuxServer -SocketPath $SocketPath | LibTmux\Get-TmuxWindow

Recorded calls

source calls
No call edges in the PowerShell model.

The PowerShell 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 LibTmux\Get-TmuxWindow.

tmux command

task material

The tmux commands behind Get-TmuxWindow.

tmux C API

task material

The C declarations in tmux that implement these commands.

Guides

task material

Pages that discuss Get-TmuxWindow.

In other ports

task equivalence

Source-verified mappings for A tmux window. 22 other ports mapped. A mapping says these APIs perform the same task. It does not say they share defaults, errors or completion: check each page.

A tmux window in each port
PortAPIDiffers from PowerShell
PowerShell LibTmux\Get-TmuxWindow
Read contextual windows from a server or session.
This page
Python libtmux.Window
tmux(1) Window [window_manual].
None recorded in the model
Ruby LibTmux::Window None recorded in the model
Lua libtmux.Window None recorded in the model
Julia LibTmux.WindowSnapshot
WindowSnapshot holds captured physical-window data. WindowLink records a placement in a session; actions use WindowRef.
Erlang #tmux_model:window{}
A physical window can have several session memberships. window_link holds the session-relative index and active flag.
Elixir LibTmux.Window
An immutable physical window, independent of session membership and index.
Window is a physical window. WindowLink records its session index and active state.
Haskell LibTmux.Snapshot.Window
Detached physical window, independent of its session and index appearances.
Window is a detached physical window, independent of its session placements. WindowLink records each session, index and window binding, and operations take a generation-bound WindowRef.
Common Lisp libtmux:window
A physical window shared by zero or more captured links.
window is a physical captured window. window-link preserves each session placement.
TypeScript window.Window
One window on one tmux server, as a handle rather than a copy of it.
None recorded in the model
Rust window.Window
One tmux window, as reached through one session that links it.
None recorded in the model
Go tmux.Window
Window is one materialized (session, index, window) winlink record. It is normally returned by Server.Snapshot, Server.Window, or Window.Refresh. A zero Window is not a usable tmux target.
None recorded in the model
Java io.github.libtmux.Window
One tmux window at one of its positions, as one capture saw it.
readonly
Clojure libtmux.data/windows
Returns the captured window occurrences in a snapshot or session.
Traverses captured window-placement maps without I/O; the window value is a map with an explicit Java reference for effects.
Kotlin io.github.libtmux.kotlin.Window
A tmux window at a specific position in a session.
None recorded in the model
Scala io.github.libtmux.scaladsl.Window
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.
None recorded in the model
C# LibTmux.Window
Represents an immutable window handle and snapshot.
None recorded in the model
F# LibTmux.FSharp.Window
Identifies window placements and starts queries confined to one window.
This F# module identifies shared .NET LibTmux.Window placements and builds deferred pane queries. Query.list acquires their results from tmux.
C++ libtmux::Window
One window, as one listing saw it.
None recorded in the model
Swift Window
One tmux window, independent of every session that links it.
None recorded in the model
OCaml Libtmux.Window.t
A global window can have several session placements. Window_link holds the session, index and current flag.
Perl LibTmux::Window
Captured window entity
Physical window identity. WindowLink owns each session/index placement.
Raku LibTmux::Model::Window
Captured physical window; session-relative indices belong to WindowLink.
A physical window may have multiple WindowLink placements, including distinct indexes in one session.

Source-verified mappings for List a session's windows. 18 other ports mapped. A mapping says these APIs perform the same task. It does not say they share defaults, errors or completion: check each page.

List a session's windows in each port
PortAPIDiffers from PowerShell
PowerShell LibTmux\Get-TmuxWindow
Read contextual windows from a server or session.
This page
Python libtmux.Session.windows
Windows contained by session.
None recorded in the model
Ruby LibTmux::Session#list_windows
Behavior: Live acquisition.
None recorded in the model
Julia LibTmux.windows
windows with a captured SessionSnapshot reads distinct physical windows in that session. Use windowlinks for placements.
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.
Pass windows, a captured session and its snapshot for a local relationship read.
Common Lisp libtmux:windows
Return a fresh vector of captured windows, without I/O. Snapshot windows are physical entities in first-occurrence order. Session windows contain one item per link and preserve repeated physical windows.
3 overloads
windows traverses a captured session. Repeated links preserve their physical-window multiplicity.
TypeScript session.Session.windows
Windows placed in this session, in listing order.
None recorded in the model
Rust session.Session.windows
List the windows linked into this session, preserving any failure.
async
Go tmux.Session.Windows
Windows returns newly allocated shallow copies of this snapshot record's winlink views, and reports whether the receiver carries relations at all.
None recorded in the model
Java io.github.libtmux.Session.windows
This session's windows, in tmux's order. A pure read of the capture.
None recorded in the model
Clojure libtmux.data/windows
Returns the captured window occurrences in a snapshot or session.
Traverses one capture locally. It does not issue a list-windows command.
Kotlin io.github.libtmux.kotlin.Session.windows
This session's windows, in tmux's order. A pure read of the capture.
None recorded in the model
Scala io.github.libtmux.scaladsl.Session.windows
This session's windows.
None recorded in the model
C# LibTmux.Session.Windows
Gets the windows the capture found in this session.
None recorded in the model
F# LibTmux.FSharp.Session.windows
Queries the window placements in a session.
Builds a deferred window query from one LibTmux.Session and its server. Query.list acquires placements scoped to that session ID.
C++ libtmux::Session::windows readonly
Swift Snapshot.windows(of:)
The windows of a session, in tmux's order.
None recorded in the model
OCaml Libtmux.Session.windows
Distinct windows in first-link order. All accesses are local.
Reads distinct captured global windows in this session. window_links preserves individual indexed placements.
Raku LibTmux::Model::Session.window-links
Captured session/index associations, including repeated links to one physical window.
Returns captured WindowLink placements. Follow each window relationship for the physical window.
No Haskell equivalent.

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

No Perl equivalent.

Traverse Session::window_links and resolve each link’s window, preserving explicit session placement and multiplicity.

No equivalent is recorded in Lua or Elixir.

Source-verified mappings for List the server's windows. 21 other ports mapped. A mapping says these APIs perform the same task. It does not say they share defaults, errors or completion: check each page.

List the server's windows in each port
PortAPIDiffers from PowerShell
PowerShell LibTmux\Get-TmuxWindow
Read contextual windows from a server or session.
This page
Python libtmux.Server.windows
Windows contained in server's sessions.
None recorded in the model
Ruby LibTmux::Server#list_windows
Behavior: Live acquisition.
None recorded in the model
Lua libtmux.Snapshot.windows None recorded in the model
Julia LibTmux.windows
windows with a Snapshot reads every captured physical window. Use windowlinks for session placements.
Erlang tmux_snapshot:windows/1
Return unique captured physical windows in numeric ID order. Performs no I/O. Use window_links/1 for session-relative membership and indexes.
Returns unique captured physical windows. window_links/1 lists session memberships.
Elixir LibTmux.Snapshot.windows/1
Returns a materialized physical window selection without I/O.
Returns a Selection of every captured physical window. window_links/1 lists session placements.
Common Lisp libtmux:windows
Return a fresh vector of captured windows, without I/O. Snapshot windows are physical entities in first-occurrence order. Session windows contain one item per link and preserve repeated physical windows.
3 overloads
windows on a snapshot returns captured physical windows once each.
TypeScript server.Server.windows
Every window on the server, including each placement of a linked window.
async
Rust server.Server.windows
List every window on the server, preserving any failure.
async
Go tmux.Server.Windows
Windows materializes one record per winlink. Failures, including ErrNoServer, remain errors rather than empty results.
None recorded in the model
Java io.github.libtmux.Server.windows
Captures every winlink, preserving each session and index placement.
3 overloads
Clojure libtmux.core/windows!
Acquires captured window occurrences.
Acquires a new graph and returns its window placements without deduplicating linked windows.
Kotlin io.github.libtmux.kotlin.Server.windows
Captures every winlink, preserving each session and index placement.
async3 overloads
Scala io.github.libtmux.scaladsl.Server.windows
Captures every winlink, preserving each session and index placement.
3 overloads
C# LibTmux.Server.Windows
Gets the windows this handle captured, across every session.
None recorded in the model
F# LibTmux.FSharp.Server.windows
Queries window placements across all sessions.
Builds a deferred query for placements across all sessions. Query.list acquires the results; a linked window appears once for each session placement.
C++ libtmux::Server::windows
tmux scopes window and pane listings to the current session unless asked for every one, so -a is part of the request rather than a caller's responsibility to remember.
readonly
Swift Server.windows()
Every window on this server, in tmux's own order.
async
OCaml Libtmux.Snapshot.windows
Reads captured global windows; use window_links for indexed session placements.
Perl LibTmux::Snapshot::windows
Return a fresh LibTmux::WindowSelection containing each physical window identity once. Context lives in "window_links".
One entry per physical identity. window_links retains all session placements.
Raku LibTmux::Model::Snapshot.windows
Captured physical windows, unique by daemon-scoped identity.
Physical windows occur once; window-links preserves placements.
No Haskell equivalent.

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

Esc
Search in

Type to search.

Reference previewOpen reference