Core LibrarystableAPI Reference

Choose documentation 3

stable

Current version

stable
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

Python API

method libtmux stable

Window.kill

Kill Window .

Source and package
Qualified name
libtmux.Window.kill
Module
libtmux
Declared in
Window
Package
libtmux
Source
src/libtmux/window.py
Other languages
PowerShell Julia RubyLuaTypeScriptRustGoJavaC#C++Swift Kotlin Scala F#
kill (self, all_except: bool | None = None) → None

Description#

$ tmux kill-window.

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
Parameters

tmux command kill-window

In other ports Close a window
Esc

Type to search.

Reference preview Open reference