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

Client._resolve_attached

Resolve live attachment with a single list-clients refresh.

Source and package
Qualified name
libtmux.Client._resolve_attached
Module
libtmux
Declared in
Client
Package
libtmux
Source
src/libtmux/client.py
_resolve_attached ( self, ) → tuple[Session | None, Window | None, Pane | None]

Description#

The three attached_session / attached_window / attached_pane properties each trigger their own list-clients refresh — calling them in sequence performs three tmux reads for one conceptual "where is this client attached now" read. _resolve_attached shares a single refresh across the triple and returns the three values together.

Returns

tuple[Session | None, Window | None, Pane | None] * (None, None, None) when tmux no longer reports this client_name through list-clients, when the client snapshot has no session_id, or when the snapshot session_id no longer names a live session. * (session, None, None) when the attached session has no active window. * (session, window, pane) for a fully-resolved live attachment. pane is None only when the active window has no active pane. MultipleActiveWindows propagates rather than collapsing to (session, None, None) — multiple active windows in one session indicates inconsistent tmux state that callers should see, not absent attachment.

Esc

Type to search.

Reference preview Open reference