Core LibraryunreleasedAPI Reference

Choose documentation 1

latest

Current version

latest
English

Unreleased libtmux_erlang has not been released. Its API may change during development. This site's structure and URLs may change too.

function libtmux-erlang latest

tmux_window_link:swap/3

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.

Source and package
Qualified name
tmux_window_link:swap/3
Declared in
tmux_window_link
Package
libtmux_erlang
Source
apps/libtmux_erlang/src/tmux_window_link.erl
Other languages
Perl PowerShell Julia Elixir Haskell Common Lisp Python Ruby LuaTypeScriptRustGo Java C#C++Swift Kotlin Scala OCaml F# Clojure
swap(Source, Destination, Options) -spec swap(tmux_model:window_link(), tmux_model:window_link(), swap_options()) -> {ok, tmux_operation:completed()} | {error, tmux_operation:failure()}.

tmux command#

The tmux commands behind swap/3.

tmux C API#

The C declarations in tmux that implement these commands.

In other ports#

Exchange two windows

Equivalents of Exchange two windows in other languages
Language Equivalent
Python libtmux.Window.swap
Lua libtmux.WindowLink:swap
Haskell No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.
TypeScript window.Window.swapWith
Rust window.Window.swap_with
Go tmux.Window.Swap
Java no equivalent on Window
C# LibTmux.Window.SwapAsync
C++ libtmux::Window::swap_with
Swift Server.swap(_:with:)
OCaml No direct public OCaml equivalent is recorded for this operation.
Perl 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#.

Esc

Type to search.

Reference previewOpen reference