tmux_pane:swap/3
Exchange two panes' layout positions within or across physical windows. Preserves their IDs and processes; parent windows, dimensions, indexes and inherited options can change. Both rows require the same registered owner. detach defaults true; active positions can still receive different panes. zoom maps to native -Z. Identical IDs do not exchange panes, but native zoom handling still runs; the default can unzoom even a same-pane swap. Returns the command result; get/2 observes the resulting values explicitly.
Source and package
- Qualified name
-
tmux_pane: swap/3 - Declared in
tmux_pane- Package
- libtmux_erlang
- Source
- apps/libtmux_erlang/src/tmux_pane.erl
- Other languages
- Perl PowerShell Julia Elixir Haskell Common Lisp PythonRubyLuaTypeScriptRustGoJavaC#C++ Swift Kotlin Scala OCaml F# Clojure
- swap(Source, Destination, Options) -spec swap(tmux
_model: (), tmuxpane _model: (), swappane _options ()) -> {ok, tmux_operation: ()} | {error, map()}.completed -
- Parameters
-
-
Source(tmux_model: ()) #pane -
Options(swap_options ()) #
-
tmux command#
The tmux commands behind swap/3.
tmux C API#
The C declarations in tmux that implement these commands.
Guides#
Pages that discuss swap/3.
In other ports#
Exchange two panes
| Language | Equivalent |
|---|---|
| Python | libtmux |
| Ruby | Lib |
| Lua | libtmux |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | pane |
| Rust | pane |
| Go | tmux |
| Java | io |
| C# | Lib |
| C++ | libtmux:: |
| Swift | Server.swap(_:with:) swaps windows, not panes |
| OCaml | Libtmux |
| Perl | No dedicated equivalent in the selected Perl surface. Explicit Server::cmd remains available for native tmux commands. |
No equivalent is recorded in PowerShell, Julia, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.