Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

class libtmux latest

Obj

Dataclass of generic tmux object.

Source and package
Qualified name
libtmux.neo.Obj
Module
libtmux.neo
Package
libtmux
Source
src/libtmux/neo.py
class libtmux.neo.Obj

Description#

Every field but server is a tmux format token, and tmux reports each one as a string. A field is None when its token was left out of the query or expanded to empty: tokens outside the listing's scope (see SCOPES_BY_LIST_CMD) and tokens the running tmux is too old to register (see FIELD_VERSION) are never requested, and copy-mode and command-context tokens only resolve at event time.

Notes

tmux may return fields from an object's active children along with the object itself. The practical consequence:

  • On a Session row (list-sessions), every pane_* and window_* field resolves to the session's current window's active pane — not "the session's pane" (no such thing). session.active_window.window_id and session.active_window.active_pane.pane_id are the canonical accessors for the same values.
  • On a Window row (list-windows), every pane_* field resolves to that window's active pane.
  • On a Client row (list-clients), every session_*, window_*, and pane_* field reflects the client's attached session, current window, and active pane.

A reader who treats session.pane_id as the literal session's pane id (rather than "active pane of this session's current window") will be surprised when the active window changes.

Members180#

Guides#

Pages that discuss Obj.

Esc

Type to search.

Reference previewOpen reference