On this page
LibTmux.Window.KillAsync
- Module
- LibTmux
- Declared in
- Window
- Package
- LibTmux
- Source
- src/LibTmux/Window.Lifecycle.cs
- Other languages
- PythonTypeScriptRustGoJavaC++Swift
- KillAsync ( allExcept : bool , cancellationToken : CancellationToken ) Task
-
Stops this window.
- Parameters
-
-
allExcept ( bool ) – Whether every other window in the session is stopped instead.
-
cancellationToken ( CancellationToken ) – Cancels the tmux command.
-
In other languages Close a window
- Python
libtmux.Window.kill - TypeScript
window.Window.kill - Rust
window.Window.kill - Go
tmux.Window.Kill - Java
io.github.libtmux.Window.Window.kill - C++
libtmux::Window::kill - Swift
Server.kill(_:)
Examples
Kill a window:
>>> window_1 = session.new_window() >>> window_1 in session.windows
True >>> window_1.kill() >>> window_1 not in session.windows
True Kill all windows except the current one:
>>> one_window_to_rule_them_all = session.new_window() >>> other_windows = session.new_window(
... ), session.new_window() >>> all([w in session.windows for w in other_windows])
True >>> one_window_to_rule_them_all.kill(all_except=True) >>> all([w not in session.windows for w in other_windows])
True >>> one_window_to_rule_them_all in session.windows
True await window.kill(); 0 declared, 0 inherited