libtmux Reference MCP Search
On this page

libtmux.Window.from_window_id

View as Markdown

Module
libtmux
Declared in
Window
Package
libtmux
Source
src/libtmux/window.py
from_window_id ( cls , server : Server , window_id : str ) Window
methodclassmethod [source]
methodclassmethod [source]
from_window_id

Create Window from existing window_id.

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
  • server ( Server ) – The tmux server holding the window.

  • window_id ( str ) – Window id, e.g. "@3".

Returns

Window

Raises

0 declared, 0 inherited

Esc

Type to search.