On this page
libtmux.Client
- Module
- libtmux
- Package
- libtmux
- Source
- src/libtmux/client.py
- Bases:
tmux(1) Client [client_manual].
A tmux client is an attached terminal. The same tmux server can have multiple clients attached simultaneously (e.g.
$ tmux attachfrom several terminals) and each receives its own view of the active session, window, and pane.Examples
>>> with control_mode() as ctl: ... attached = [ ... c ... for c in server.clients ... if c.client_name == ctl.client_name ... ] >>> bool(attached) True>>> with control_mode() as ctl: ... client = server.clients.get(client_name=ctl.client_name) ... client.client_readonly in {"0", "1"} TrueReferences
- [client_manual]
-
tmux client. openbsd manpage for TMUX(1). "tmux supports multiple attached clients. Each client has its own keymap, view of the session, and message log." https://man.openbsd.org/tmux.1#DESCRIPTION. Accessed 2026.
warning
client_session,session_id,window_idandpane_idare snapshots of the client's *currently attached view* at the moment this object was read — not stable identity for the client. When the client switches sessions viaswitch-client, moves focus viaselect-window/select-pane, or detaches, these fields go stale untilrefreshre-reads them fromlist-clients. Theclient_name(tty path on Unix) is the client's stable identity. Preferattached_session,attached_window, andattached_panewhen you need the client's current attachment. Each property re-reads tmux before returning, so theSession/Window/Paneyou get back reflects where the client is attached *now*, not where it was when thisClientwas constructed. If tmux no longer reports thisclient_namethroughlist-clients, these properties returnNone.attached_panefollows the attached session's current window. That can differ from the per-client active pane set byselect-pane -P; seeattached_panefor the exact behavior. Each property re-reads tmux on every access.
7 declared, 179 inherited
Members
- server attribute
- _resolve_attached method Resolve live attachment with a single
list-clientsrefresh. - from_client_name method Create Client from an existing client_name.
- refresh method Refresh client attributes from tmux.
- attached_pane property Return the
Panethis client is currently viewing. - attached_session property Return the
Sessionthis client is currently attached to. - attached_window property Return the
Windowthis client is currently viewing.
Inherited members
Reached through libtmux.neo.Obj.
- active_window_index libtmux.neo.Obj
- alternate_saved_x libtmux.neo.Obj
- alternate_saved_y libtmux.neo.Obj
- bracket_paste_flag libtmux.neo.Obj
- buffer_name libtmux.neo.Obj
- buffer_sample libtmux.neo.Obj
- buffer_size libtmux.neo.Obj
- client_activity libtmux.neo.Obj
- client_cell_height libtmux.neo.Obj
- client_cell_width libtmux.neo.Obj
- client_control_mode libtmux.neo.Obj
- client_created libtmux.neo.Obj
- client_discarded libtmux.neo.Obj
- client_flags libtmux.neo.Obj
- client_height libtmux.neo.Obj
- client_key_table libtmux.neo.Obj
- client_last_session libtmux.neo.Obj
- client_mode_format libtmux.neo.Obj
- client_name libtmux.neo.Obj
- client_pid libtmux.neo.Obj
- client_prefix libtmux.neo.Obj
- client_readonly libtmux.neo.Obj
- client_session libtmux.neo.Obj
- client_termfeatures libtmux.neo.Obj
- client_termname libtmux.neo.Obj
- client_termtype libtmux.neo.Obj
- client_tty libtmux.neo.Obj
- client_uid libtmux.neo.Obj
- client_user libtmux.neo.Obj
- client_utf8 libtmux.neo.Obj
- client_width libtmux.neo.Obj
- client_written libtmux.neo.Obj
- command_list_alias libtmux.neo.Obj
- command_list_name libtmux.neo.Obj
- command_list_usage libtmux.neo.Obj
- config_files libtmux.neo.Obj
- copy_cursor_line libtmux.neo.Obj
- copy_cursor_word libtmux.neo.Obj
- copy_cursor_x libtmux.neo.Obj
- copy_cursor_y libtmux.neo.Obj
- current_file libtmux.neo.Obj
- cursor_character libtmux.neo.Obj
- cursor_flag libtmux.neo.Obj
- cursor_x libtmux.neo.Obj
- cursor_y libtmux.neo.Obj
- history_bytes libtmux.neo.Obj
- history_limit libtmux.neo.Obj
- history_size libtmux.neo.Obj
- insert_flag libtmux.neo.Obj
- keypad_cursor_flag libtmux.neo.Obj
- keypad_flag libtmux.neo.Obj
- last_window_index libtmux.neo.Obj
- line libtmux.neo.Obj
- mouse_all_flag libtmux.neo.Obj
- mouse_any_flag libtmux.neo.Obj
- mouse_button_flag libtmux.neo.Obj
- mouse_sgr_flag libtmux.neo.Obj
- mouse_standard_flag libtmux.neo.Obj
- next_session_id libtmux.neo.Obj
- origin_flag libtmux.neo.Obj
- pane_active libtmux.neo.Obj
- pane_at_bottom libtmux.neo.Obj
- pane_at_left libtmux.neo.Obj
- pane_at_right libtmux.neo.Obj
- pane_at_top libtmux.neo.Obj
- pane_bg libtmux.neo.Obj
- pane_bottom libtmux.neo.Obj
- pane_current_command libtmux.neo.Obj
- pane_current_path libtmux.neo.Obj
- pane_dead libtmux.neo.Obj
- pane_dead_signal libtmux.neo.Obj
- pane_dead_status libtmux.neo.Obj
- pane_dead_time libtmux.neo.Obj
- pane_fg libtmux.neo.Obj
- pane_flags libtmux.neo.Obj
- pane_floating_flag libtmux.neo.Obj
- pane_format libtmux.neo.Obj
- pane_height libtmux.neo.Obj
- pane_id libtmux.neo.Obj
- pane_in_mode libtmux.neo.Obj
- pane_index libtmux.neo.Obj
- pane_input_off libtmux.neo.Obj
- pane_last libtmux.neo.Obj
- pane_left libtmux.neo.Obj
- pane_marked libtmux.neo.Obj
- pane_marked_set libtmux.neo.Obj
- pane_mode libtmux.neo.Obj
- pane_path libtmux.neo.Obj
- pane_pb_progress libtmux.neo.Obj
- pane_pb_state libtmux.neo.Obj
- pane_pid libtmux.neo.Obj
- pane_pipe libtmux.neo.Obj
- pane_pipe_pid libtmux.neo.Obj
- pane_right libtmux.neo.Obj
- pane_search_string libtmux.neo.Obj
- pane_start_command libtmux.neo.Obj
- pane_start_path libtmux.neo.Obj
- pane_synchronized libtmux.neo.Obj
- pane_tabs libtmux.neo.Obj
- pane_title libtmux.neo.Obj
- pane_top libtmux.neo.Obj
- pane_tty libtmux.neo.Obj
- pane_width libtmux.neo.Obj
- pane_x libtmux.neo.Obj
- pane_y libtmux.neo.Obj
- pane_z libtmux.neo.Obj
- pane_zoomed_flag libtmux.neo.Obj
- pid libtmux.neo.Obj
- scroll_position libtmux.neo.Obj
- scroll_region_lower libtmux.neo.Obj
- scroll_region_upper libtmux.neo.Obj
- search_match libtmux.neo.Obj
- selection_end_x libtmux.neo.Obj
- selection_end_y libtmux.neo.Obj
- selection_start_x libtmux.neo.Obj
- selection_start_y libtmux.neo.Obj
- session_activity libtmux.neo.Obj
- session_alerts libtmux.neo.Obj
- session_attached libtmux.neo.Obj
- session_attached_list libtmux.neo.Obj
- session_created libtmux.neo.Obj
- session_format libtmux.neo.Obj
- session_group libtmux.neo.Obj
- session_group_attached libtmux.neo.Obj
- session_group_attached_list libtmux.neo.Obj
- session_group_list libtmux.neo.Obj
- session_group_many_attached libtmux.neo.Obj
- session_group_size libtmux.neo.Obj
- session_grouped libtmux.neo.Obj
- session_id libtmux.neo.Obj
- session_last_attached libtmux.neo.Obj
- session_many_attached libtmux.neo.Obj
- session_marked libtmux.neo.Obj
- session_name libtmux.neo.Obj
- session_path libtmux.neo.Obj
- session_stack libtmux.neo.Obj
- session_windows libtmux.neo.Obj
- socket_path libtmux.neo.Obj
- start_time libtmux.neo.Obj
- synchronized_output_flag libtmux.neo.Obj
- uid libtmux.neo.Obj
- user libtmux.neo.Obj
- version libtmux.neo.Obj
- window_active libtmux.neo.Obj
- window_active_clients libtmux.neo.Obj
- window_active_clients_list libtmux.neo.Obj
- window_active_sessions libtmux.neo.Obj
- window_active_sessions_list libtmux.neo.Obj
- window_activity libtmux.neo.Obj
- window_activity_flag libtmux.neo.Obj
- window_bell_flag libtmux.neo.Obj
- window_bigger libtmux.neo.Obj
- window_cell_height libtmux.neo.Obj
- window_cell_width libtmux.neo.Obj
- window_end_flag libtmux.neo.Obj
- window_flags libtmux.neo.Obj
- window_format libtmux.neo.Obj
- window_height libtmux.neo.Obj
- window_id libtmux.neo.Obj
- window_index libtmux.neo.Obj
- window_last_flag libtmux.neo.Obj
- window_layout libtmux.neo.Obj
- window_linked libtmux.neo.Obj
- window_linked_sessions libtmux.neo.Obj
- window_linked_sessions_list libtmux.neo.Obj
- window_marked_flag libtmux.neo.Obj
- window_name libtmux.neo.Obj
- window_offset_x libtmux.neo.Obj
- window_offset_y libtmux.neo.Obj
- window_panes libtmux.neo.Obj
- window_raw_flags libtmux.neo.Obj
- window_silence_flag libtmux.neo.Obj
- window_stack_index libtmux.neo.Obj
- window_start_flag libtmux.neo.Obj
- window_visible_layout libtmux.neo.Obj
- window_width libtmux.neo.Obj
- window_zoomed_flag libtmux.neo.Obj
- wrap_flag libtmux.neo.Obj
- _refresh libtmux.neo.Obj Refresh dataclass fields from a single
list-*row.