Pane.swap
Swap this pane with another via $ tmux swap-pane.
Source and package
-
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()- 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).
-
tmux command
swap-paneIn other ports Exchange two panes
- PowerShell No source-verified PowerShell equivalent is recorded for this operation.
- Julia No source-verified Julia equivalent is recorded for this operation.
- Ruby
- Lua
- TypeScript
- Rust
- Go
- Java
- C#
- C++
- Swift
Server.swap(_:with:)swaps windows, not panes - Kotlin No source-verified Kotlin equivalent is recorded for this operation.
- Scala No source-verified Scala equivalent is recorded for this operation.
- F# No source-verified F# equivalent is recorded for this operation.