Core Library0.xTopics

Choose documentation 1

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.

tmux field catalog

This curated catalog describes the scalar fields needed by the core entity model. It does not enumerate every tmux format. Edit the source catalog and regenerate this reference together with Lua metadata and LuaLS field annotations:

Terminal window
$ python scripts/generate_fields.py

Check generated files without changing them:

Terminal window
$ python scripts/generate_fields.py --check

Generation uses Python and the pinned StyLua formatter; it needs no network or tmux process. The optional --verify-source argument accepts a local tmux Git checkout and verifies every pinned format mapping and source anchor.

Availability and values

Since means the first release supported by this catalog for that field, not necessarily the release that introduced it. The floor is tmux 3.3a. Source inspection establishes format availability; it does not establish complete runtime or platform compatibility. The schema helper accepts recognized final, release-candidate and next-X.Y reports that rank at or above the floor. Field availability is checked against that rank. Unrecognized reports and versions below the floor are rejected.

Record names are Lua aliases for literal tmux format names. IDs retain their $, @, and % prefixes. number fields represent integers; consumers must reject values outside the exact integer range of their Lua runtime rather than silently round them. All generated LuaLS fields are optional because a projection may leave a field unloaded.

Nullable fields may be absent within an otherwise valid native context. Loaded absence uses query.NULL; an omitted key means not loaded. Known fields unavailable at the requested version remain in the query schema with supported = false. Empty text remains text for nonnullable string fields. The scalar catalog does not build relationships or perform I/O.

Window index, active state, and flags belong to window_link. Windows and panes have no scalar session ID because a window can be linked into several sessions. client_session provides a session name, not a session ID. Client names and buffer names need contextual revalidation before later mutations.

Source provenance

Server

Record fieldtmux formatTypeNullableSinceNative scope
pidpidnumberno3.3aserver
socket_pathsocket_pathstringno3.3aserver
versionversionstringno3.3aserver
start_timestart_timenumberno3.3aserver
  • pid: Daemon process ID.
  • socket_path: Socket path reported by the daemon.
  • version: Daemon version string.
  • start_time: Daemon start time in Unix seconds.

Session

Record fieldtmux formatTypeNullableSinceNative scope
idsession_idstringno3.3asession
namesession_namestringno3.3asession
createdsession_creatednumberno3.3asession
activitysession_activitynumberno3.3asession
attachedsession_attachednumberno3.3asession
window_countsession_windowsnumberno3.3asession
groupsession_groupstringyes3.3asession
groupedsession_groupedbooleanno3.3asession
pathsession_pathstringno3.3asession
  • id: Session ID, including its dollar-sign prefix.
  • name: Session name.
  • created: Creation time in Unix seconds.
  • activity: Last activity time in Unix seconds.
  • attached: Attached client count, not a boolean.
  • window_count: Number of window links in this session.
  • group: Session group name; absent for an ungrouped session.
  • grouped: Whether this session belongs to a group.
  • path: Session working directory.

Window

Record fieldtmux formatTypeNullableSinceNative scope
idwindow_idstringno3.3awindow
namewindow_namestringno3.3awindow
widthwindow_widthnumberno3.3awindow
heightwindow_heightnumberno3.3awindow
pane_countwindow_panesnumberno3.3awindow
layoutwindow_layoutstringyes3.3awindow
visible_layoutwindow_visible_layoutstringyes3.3awindow
zoomedwindow_zoomed_flagbooleanno3.3awindow
  • id: Window ID, including its at-sign prefix.
  • name: Window name.
  • width: Width in character cells.
  • height: Height in character cells.
  • pane_count: Number of panes owned by this window.
  • layout: Layout including panes hidden by zoom; absent without a layout tree.
  • visible_layout: Visible layout; absent without a layout tree.
  • zoomed: Whether this window is zoomed.
Record fieldtmux formatTypeNullableSinceNative scope
session_idsession_idstringno3.3asession
window_idwindow_idstringno3.3awindow
indexwindow_indexnumberno3.3awinlink
activewindow_activebooleanno3.3awinlink
flagswindow_flagsstringno3.3awinlink
  • session_id: Session owning this contextual link.
  • window_id: Underlying window shared by links.
  • index: tmux index within the session, not Lua array position.
  • active: Whether this link is the session current window.
  • flags: Printable flags for this session/window link.

Pane

Record fieldtmux formatTypeNullableSinceNative scope
idpane_idstringno3.3apane
window_idwindow_idstringno3.3awindow
indexpane_indexnumberno3.3apane
activepane_activebooleanno3.3apane
titlepane_titlestringno3.3apane
widthpane_widthnumberno3.3apane
heightpane_heightnumberno3.3apane
leftpane_leftnumberno3.3apane
toppane_topnumberno3.3apane
pidpane_pidnumberno3.3apane
ttypane_ttystringno3.3apane
current_pathpane_current_pathstringyes3.3apane
current_commandpane_current_commandstringyes3.3apane
start_commandpane_start_commandstringno3.3apane
deadpane_deadbooleanno3.3apane
dead_statuspane_dead_statusnumberyes3.3apane
dead_signalpane_dead_signalstringyes3.3apane
dead_timepane_dead_timenumberyes3.3apane
modepane_modestringyes3.3apane
mode_countpane_in_modenumberno3.3apane
synchronizedpane_synchronizedbooleanno3.3apane
  • id: Pane ID, including its percent-sign prefix.
  • window_id: ID of the window that owns this pane.
  • index: tmux pane index within its window.
  • active: Whether this pane is active in its window.
  • title: Pane title; an empty title remains an empty string.
  • width: Width in character cells.
  • height: Height in character cells.
  • left: Left cell offset in the window.
  • top: Top cell offset in the window.
  • pid: PID recorded for the pane process.
  • tty: Pseudo-terminal name; empty is preserved.
  • current_path: Process working directory when the OS can determine it.
  • current_command: Displayed command name; absent without pane shell context.
  • start_command: Stringified startup argv; this is not a shell-safe command.
  • dead: Whether tmux has a ready dead-process status.
  • dead_status: Exit status only when the process exited normally.
  • dead_signal: Signal name only when the process terminated by signal.
  • dead_time: Dead-pane display time in Unix seconds, when available.
  • mode: Top mode name; absent outside pane modes.
  • mode_count: Number of active modes, not a boolean.
  • synchronized: Effective synchronize-panes option.

Client

Record fieldtmux formatTypeNullableSinceNative scope
nameclient_namestringno3.3aclient
ttyclient_ttystringno3.3aclient
pidclient_pidnumberno3.3aclient
session_nameclient_sessionstringyes3.3aclient
widthclient_widthnumberyes3.3aclient
heightclient_heightnumberyes3.3aclient
control_modeclient_control_modebooleanno3.3aclient
readonlyclient_readonlybooleanno3.3aclient
createdclient_creatednumberno3.3aclient
activityclient_activitynumberno3.3aclient
  • name: Observed client name; not a persistent identifier.
  • tty: Observed terminal name; empty is preserved.
  • pid: Client process ID.
  • session_name: Attached session name, not a session ID.
  • width: Terminal width; nullable without a started TTY.
  • height: Terminal height; nullable without a started TTY.
  • control_mode: Whether this is a control-mode client.
  • readonly: Whether this client is read-only.
  • created: Creation time in Unix seconds.
  • activity: Last activity time in Unix seconds.

Buffer

Record fieldtmux formatTypeNullableSinceNative scope
namebuffer_namestringno3.3abuffer
sizebuffer_sizenumberno3.3abuffer
samplebuffer_samplestringno3.3abuffer
createdbuffer_creatednumberno3.3abuffer
  • name: Buffer name; revalidate before later mutations.
  • size: Buffer size in bytes.
  • sample: tmux printable preview; not complete buffer bytes.
  • created: Creation time in Unix seconds.
Esc

Type to search.

Reference previewOpen reference