LibTmux.Get-TmuxWindow
Read contextual windows from a server or session.
Source and package
- Qualified name
-
LibTmux\ Get-Tmux Window - Declared in
LibTmux- Package
- LibTmux
- Source
- src/LibTmux.PowerShell/GetTmuxWindowCommand.cs
- Server (default): Get-TmuxWindow [-Server] <Lib
Tmux > [-Id <System.Server .String >] [-Name <System.String >] [<CommonParameters >]Session: Get-TmuxWindow [-Session] <LibTmux > [-Id <System.Session .String >] [-Name <System.String >] [<CommonParameters >] -
Description
Accept a native
ServerorSessionas 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.WindowthatGet-TmuxWindowreturns. 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-TmuxWindowlists the windows of a server or a session, or the ones that match an exact id or name.Get-TmuxPanelists the panes of one window.Get-TmuxSnapshotcaptures windows with their panes, andGet-TmuxClientAttachmentresolves the window a client is viewing.- Filtering and querying windows
Select-TmuxWindowfilters windows you already captured without contacting tmux, and can require exactly one match.New-TmuxQuerybuilds criteria for theWindowtarget andGet-TmuxQueryFieldlists the fields they accept.Invoke-TmuxQueryacquires fresh windows instead.- Creating, renaming and removing a window
New-TmuxWindowcreates a window and its first pane in a session, and returns it.Rename-TmuxWindownames the window by id and, with PassThru, returns a replacement that carries the new name.Remove-TmuxWindowdestroys the physical window and its panes in every session that links it.- Linking and moving a window
New-TmuxWindowLinklinks a window into another session.Move-TmuxWindowmoves one placement, within its session or to another.Remove-TmuxWindowLinkremoves 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-TmuxLayoutapplies a named preset or a layout string you captured, and arranges the panes.Set-TmuxWindowSizeresizes the window in cells or against its attached clients.- Options and hooks
Get-TmuxOption,Set-TmuxOptionandRemove-TmuxOptionread, write and unset the options of one window.Get-TmuxHook,Set-TmuxHookandRemove-TmuxHookdo the same for its hooks, andInvoke-TmuxHookruns one now.
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
-
-
-Server(LibTmux ) for.Server ServerThe server whose windows are read.
- Required
- Yes
- Position
- 0
- Pipeline input
- By value
- Validation
ValidateNotNull()
-
An ordinal, literal window identifier selector.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Completion
ArgumentCompleter("LibTmux.PowerShell.WindowSelectorCompleter")- Validation
ValidateNotNullOrEmpty()
-
An ordinal, literal window name selector.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Completion
ArgumentCompleter("LibTmux.PowerShell.WindowSelectorCompleter")- Validation
ValidateNotNullOrEmpty()
-
-Session(LibTmux ) for.Session SessionThe session whose windows are read.
- Required
- Yes
- Position
- 0
- Pipeline input
- By value
- Validation
ValidateNotNull()
Common parameters 12
PowerShell supplies these parameters. See common parameter behavior for their effects.
-
-Verbose(System.Management ).Automation .Switch Parameter Display verbose messages produced by this command.
Aliases:vbMicrosoft Learn reference -
-Debug(System.Management ).Automation .Switch Parameter Display debug messages produced by this command.
Aliases:dbMicrosoft Learn reference -
-ErrorAction(System.Management ).Automation .Action Preference Choose how this command responds to non-terminating errors.
Aliases:eaMicrosoft Learn reference -
-WarningAction(System.Management ).Automation .Action Preference Choose how this command responds to warning messages.
Aliases:waMicrosoft Learn reference -
-InformationAction(System.Management ).Automation .Action Preference Choose how this command handles information messages.
Aliases:infaMicrosoft Learn reference -
-ProgressAction(System.Management ).Automation .Action Preference Choose how this command handles progress updates.
Aliases:progaMicrosoft Learn reference -
-ErrorVariable(System.String )Store the command's error records in the named variable.
Aliases:evMicrosoft Learn reference -
-WarningVariable(System.String )Store the command's warning records in the named variable.
Aliases:wvMicrosoft Learn reference -
-InformationVariable(System.String )Store the command's information records in the named variable.
Aliases:ivMicrosoft Learn reference -
Save output in the named variable while passing it down the pipeline.
Aliases:ovMicrosoft Learn reference -
Buffer output before passing it to the next pipeline command.
Aliases:obMicrosoft Learn reference -
-PipelineVariable(System.String )Make the most recent output object available through a named variable within the pipeline.
Aliases:pvMicrosoft Learn reference
-
- Returns
-
LibTmux.Window: Native pipeline type for this command.
Examples
Example 1
Listwindow placements on the existing server identified by$SocketPath. View sourceTerminal window LibTmux\New-TmuxServer -SocketPath $SocketPath | LibTmux\Get-TmuxWindow
Recorded calls
source callsThe 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 materialThe tmux commands behind Get-TmuxWindow.
list-windows -t session scope, cmd_list_windows_exec tmux C API
task materialThe C declarations in tmux that implement these commands.
Guides
task materialPages that discuss Get-TmuxWindow.
- Concepts
In other ports
task equivalenceSource-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.
| Port | API | Differs from PowerShell |
|---|---|---|
| PowerShell | Lib Read contextual windows from a server or session. | This page |
| Python | libtmux tmux(1) Window [window_manual]. | None recorded in the model |
| Ruby | Lib | None recorded in the model |
| Lua | libtmux | None recorded in the model |
| Julia | Lib | WindowSnapshot holds captured physical-window data. WindowLink records a placement in a session; actions use WindowRef. |
| Erlang | #tmux | A physical window can have several session memberships. window_link holds the session-relative index and active flag. |
| Elixir | Lib An immutable physical window, independent of session membership and index. | Window is a physical window. WindowLink records its session index and active state. |
| Haskell | Lib 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: A physical window shared by zero or more captured links. | window is a physical captured window. window-link preserves each session placement. |
| TypeScript | window One window on one tmux server, as a handle rather than a copy of it. | None recorded in the model |
| Rust | window One tmux window, as reached through one session that links it. | None recorded in the model |
| Go | tmux 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 One tmux window at one of its positions, as one capture saw it. | readonly |
| Clojure | libtmux 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 A tmux window at a specific position in a session. | None recorded in the model |
| Scala | io 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# | Lib Represents an immutable window handle and snapshot. | None recorded in the model |
| F# | Lib 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:: 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 | A global window can have several session placements. Window_link holds the session, index and current flag. |
| Perl | Lib Captured window entity | Physical window identity. WindowLink owns each session/index placement. |
| Raku | Lib 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.
| Port | API | Differs from PowerShell |
|---|---|---|
| PowerShell | Lib Read contextual windows from a server or session. | This page |
| Python | libtmux Windows contained by session. | None recorded in the model |
| Ruby | Lib Behavior: Live acquisition. | None recorded in the model |
| Julia | Lib | windows with a captured SessionSnapshot reads distinct physical windows in that session. Use windowlinks for placements. |
| 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. | Pass windows, a captured session and its snapshot for a local relationship read. |
| Common Lisp | libtmux: 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 Windows placed in this session, in listing order. | None recorded in the model |
| Rust | session List the windows linked into this session, preserving any failure. | async |
| Go | tmux 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 This session's windows, in tmux's order. A pure read of the capture. | None recorded in the model |
| Clojure | libtmux Returns the captured window occurrences in a snapshot or session. | Traverses one capture locally. It does not issue a list-windows command. |
| Kotlin | io This session's windows, in tmux's order. A pure read of the capture. | None recorded in the model |
| Scala | io This session's windows. | None recorded in the model |
| C# | Lib Gets the windows the capture found in this session. | None recorded in the model |
| F# | Lib 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:: | readonly |
| Swift | Snapshot The windows of a session, in tmux's order. | None recorded in the model |
| OCaml | Libtmux 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 | Lib Captured session/index associations, including repeated links to one physical window. | Returns captured WindowLink placements. Follow each window relationship for the physical window. |
No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.
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.
| Port | API | Differs from PowerShell |
|---|---|---|
| PowerShell | Lib Read contextual windows from a server or session. | This page |
| Python | libtmux Windows contained in server's sessions. | None recorded in the model |
| Ruby | Lib Behavior: Live acquisition. | None recorded in the model |
| Lua | libtmux | None recorded in the model |
| Julia | Lib | windows with a Snapshot reads every captured physical window. Use windowlinks for session placements. |
| Erlang | tmux 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 | Lib 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: 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 Every window on the server, including each placement of a linked window. | async |
| Rust | server List every window on the server, preserving any failure. | async |
| Go | tmux Windows materializes one record per winlink. Failures, including ErrNoServer, remain errors rather than empty results. | None recorded in the model |
| Java | io Captures every winlink, preserving each session and index placement. | 3 overloads |
| Clojure | libtmux Acquires captured window occurrences. | Acquires a new graph and returns its window placements without deduplicating linked windows. |
| Kotlin | io Captures every winlink, preserving each session and index placement. | async3 overloads |
| Scala | io Captures every winlink, preserving each session and index placement. | 3 overloads |
| C# | Lib Gets the windows this handle captured, across every session. | None recorded in the model |
| F# | Lib 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:: 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 Every window on this server, in tmux's own order. | async |
| OCaml | Libtmux | Reads captured global windows; use window_links for indexed session placements. |
| Perl | Lib 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 | Lib Captured physical windows, unique by daemon-scoped identity. | Physical windows occur once; window-links preserves placements. |
No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.