Window.SwapAsync
Swaps this window with another.
Source and package
- Qualified name
-
LibTmux .Window. Swap Async - Namespace
- LibTmux
- Declared in
Window- Package
- LibTmux
- Source
- src/LibTmux/Window.Links.cs
- Task SwapAsync( Window
Id target, bool detach = false, CancellationToken cancellationToken = default ) -
Description
A window linked into several sessions resolves to whichever link tmux picks, because a window identifier does not name one.
- Parameters
-
-
detach(bool) – Whether the swapped window is left unselected.Default
false -
cancellationToken(CancellationToken ) – Cancels the tmux command.Default
default
Recorded calls
source callsThe C# 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.Window.SwapAsync.
tmux command
task materialThe tmux commands behind SwapAsync.
tmux C API
task materialThe C declarations in tmux that implement these commands.
In other ports
task equivalence 9 other ports mappedSource-verified mappings for Exchange two windows. 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 C# |
|---|---|---|
| C# | Lib Swaps this window with another. | This page |
| Python | libtmux Swap this window with another via $ tmux swap-window. | None recorded in the model |
| Lua | libtmux | on WindowLink |
| Erlang | tmux Swap the physical windows at two checked memberships. Other links to either window remain intact. detach maps to tmux -d and defaults true. tmux applies its session-selection and group-synchronization rules. Returns the command result; old rows still name their original expected windows and can become stale. Performs I/O, with the documented gap between preflight and action. | free function |
| TypeScript | window Exchange positions with another window. | None recorded in the model |
| Rust | window Swap this window's position with another. | async |
| Go | tmux Swap exchanges the receiver and Target exact winlinks. Their stable WindowIDs move to the opposite session-and-index views; a WindowID alone does not identify either endpoint. Unless Detach is set, tmux may change the affected sessions' current-window selection; this is not a global client-focus guarantee. | None recorded in the model |
| C++ | libtmux:: Exchange positions with another window, keeping both ids. | readonly |
| Swift | Server Swaps two window appearances. Their underlying window ids do not change, but both links move to new indices. | asyncon Server2 overloads |
| Raku | Lib Swap the two verified pane identities or session-relative window placements. | on WindowLinkRef |
No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.
no equivalent on Window
No direct public OCaml equivalent is recorded for this operation.
No dedicated equivalent in the selected Perl surface. Explicit Server::cmd remains available for native tmux commands.
No equivalent is recorded in Ruby, PowerShell, Julia, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.