window.Window.swapWith
- Module
- window
- Declared in
- Window
- Package
- libtmux
- Source
- packages/libtmux/src/window.ts
- Other languages
- Python Ruby LuaRustGo Java .NETC++Swift
-
Exchange positions with another window.
In other ports Exchange two windows
- Python
libtmux.Window.swap - Ruby No source-verified Ruby equivalent is recorded for this operation.
- Lua
libtmux.WindowLink:swap - Rust
window.Window.swap_with - Go
tmux.Window.Swap - Java no equivalent on
Window - .NET
LibTmux.Window.SwapAsync - C++
libtmux::Window::swap_with - Swift
Server.swap(_:with:)
- Python
Examples
await window.swapWith(other);>>> w1 = session.new_window(window_name='swap_a')>>> w2 = session.new_window(window_name='swap_b')>>> w1_idx = w1.window_index>>> w2_idx = w2.window_index>>> w1.swap(w2)>>> w1.window_index == w2_idxTrue>>> w2.window_index == w1_idxTrue0 declared, 0 inherited