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.from_window_id

Create Window from existing window_id.

Source and package
Qualified name
libtmux.Window.from_window_id
Module
libtmux
Declared in
Window
Package
libtmux
Source
src/libtmux/window.py
from_window_id ( cls, server: Server, window_id: str ) → Window

Description#

tmux's cmd_find routes a -t target by sigil, so an @-id handed to list-windows resolves to that window's session and lists it. The rows come back stamped with the session tmux considers canonical for the window -- the most recently active one -- so a window linked into several sessions reports the same parent tmux itself would.

Examples#

>>> Window.from_window_id(server=window.server, window_id=window.window_id)
Window(@1 1:..., Session($1 ...))
Parameters
Returns

Window

Raises

Discussed in Filtering and queries

Esc

Type to search.

Reference preview Open reference