- Module
- libtmux
- Declared in
- Pane
- Package
- libtmux
- Source
- src/libtmux/pane.py
- Other languages
- RubyLuaTypeScriptRustGoJava.NETC++ Swift
-
Swap this pane with another via
$ tmux swap-pane.- Parameters
-
-
target ( str | Pane | None ) – Target pane to swap with. Can be a pane ID string or Pane object. Mutually exclusive with *move_up* / *move_down*. Now optional; required only when *move_up* / *move_down* are not set. Versionchanged: 0.56
-
detach ( bool | None ) – Do not change the active pane (
-dflag). -
move_up ( bool | None ) – Swap with the pane above (
-Uflag). Mutually exclusive with *target* and *move_down*. -
move_down ( bool | None ) – Swap with the pane below (
-Dflag). Mutually exclusive with *target* and *move_up*. -
keep_zoom ( bool | None ) – Keep the window zoomed if it was zoomed (
-Zflag).
-
In other ports Exchange two panes
- Ruby
LibTmux::Pane#swap - Lua
libtmux.Pane:swap - TypeScript
pane.Pane.swapWith - Rust
pane.Pane.swap_with - Go
tmux.Pane.Swap - Java
io.github.libtmux.Pane.Pane.swapWith - .NET
LibTmux.Pane.SwapAsync - C++
libtmux::Pane::swap_with - Swift
Server.swap(_:with:)swaps windows, not panes
Examples
>>> pane1 = window.active_pane>>> pane2 = window.split()>>> pane1_id, pane2_id = pane1.pane_id, pane2.pane_id>>> pane1.swap(pane2)>>> pane1.refresh()>>> pane2.refresh()await pane.swapWith(otherPane);0 declared, 0 inherited