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

Python API

Python documentation

View as Markdown

Module
libtmux
Declared in
Server
Package
libtmux
Source
src/libtmux/server.py
Other languages
Ruby Lua TypeScriptRustGoJava.NETC++Swift
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 .

In other ports List the server's attached clients

Examples

>>> with control_mode() as ctl:
... names = [c.client_name for c in server.clients]
... ctl.client_name in names
True
const clients = await server.clients();
clients.map((entry) => entry.tty);

0 declared, 0 inherited

Esc

Type to search.