libtmux Reference MCP Search
On this page

libtmux.Server.clients

View as Markdown

Module
libtmux
Declared in
Server
Package
libtmux
Source
src/libtmux/server.py
clients ( self ) QueryList[Client]
property [source]
property [source]
clients

Clients attached to this tmux server.

Each attached terminal is a separate Client . server.clients returns the typed view; client.client_readonly, client.client_termtype, client.client_session etc. read tmux's client_* format tokens.

Returns an empty QueryList when tmux's list-clients fails for any reason — no running daemon, a missing socket, a permission error, or a subprocess failure. To distinguish "no clients attached" from "tmux unreachable", call Server.is_alive or Server.raise_if_dead .

Examples

>>> with control_mode() as ctl:
...     names = [c.client_name for c in server.clients]
...     ctl.client_name in names
True

0 declared, 0 inherited

Esc

Type to search.