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

property libtmux stable

Server.clients

Clients attached to this tmux server.

Source and package
Qualified name
libtmux.Server.clients
Module
libtmux
Declared in
Server
Package
libtmux
Source
src/libtmux/server.py
Other languages
PowerShellcmdlet Juliafunction Ruby Lua TypeScriptRustGoJavaC#C++SwiftKotlinScalaF#function
clients (self) → QueryList[Client]

Description#

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

tmux command list-clients

In other ports List the server's attached clients
Esc

Type to search.

Reference preview Open reference