tmuxtmuxC source reference

Choose documentation 1

3.2a

tmux source version

Latest (3.7c) 3.7c 3.2a
English

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

tmux C source reference

C declarations from tmux 3.2a. These are tmux internals, not a supported external library API.

Paths through the source#

Follow these functions to explore a task. Arrows show source relationships.

Create a session and its first pane

  1. cmd_new_session_exec
  2. calls → spawn_window
  3. calls → spawn_pane
  4. calls → window_add_pane
  5. calls → window_pane_create

Split a window

  1. cmd_split_window_exec
  2. references → spawn_pane
  3. calls → window_add_pane
  4. calls → window_pane_create

Start the server and create a client

  1. server_start
  2. calls → server_client_create
  3. calls → proc_add_peer
Server 6 functions and constants
Server — Supporting declarations 44 functions and constants
Session 1 type, 8 functions and constants
Session — Supporting declarations 3 types, 52 functions and constants
Window 2 types, 6 functions and constants
Window — Supporting declarations 24 types, 360 functions and constants
Pane 1 type, 6 functions and constants
Pane — Supporting declarations 10 types, 52 functions and constants
Client 1 type, 5 functions and constants
Client — Supporting declarations 6 types, 96 functions and constants
Commands 5 types, 5 functions and constants
Commands — Supporting declarations 26 types, 363 functions and constants
cmd_attach_session_entry attribute
cmd_bind_key_entry attribute
cmd_break_pane_entry attribute
cmd_capture_pane_entry attribute
cmd_choose_buffer_entry attribute
cmd_choose_client_entry attribute
cmd_choose_tree_entry attribute
cmd_clear_history_entry attribute
cmd_clock_mode_entry attribute
cmd_command_prompt_entry attribute
cmd_confirm_before_entry attribute
cmd_copy_mode_entry attribute
cmd_customize_mode_entry attribute
cmd_delete_buffer_entry attribute
cmd_detach_client_entry attribute
cmd_display_menu_entry attribute
cmd_display_message_entry attribute
cmd_display_panes_entry attribute
cmd_display_popup_entry attribute
cmd_down_pane_entry attribute
cmd_find_window_entry attribute
cmd_has_session_entry attribute
cmd_if_shell_entry attribute
cmd_join_pane_entry attribute
cmd_kill_pane_entry attribute
cmd_kill_server_entry attribute
cmd_kill_session_entry attribute
cmd_kill_window_entry attribute
cmd_last_pane_entry attribute
cmd_last_window_entry attribute
cmd_link_window_entry attribute
cmd_list_buffers_entry attribute
cmd_list_clients_entry attribute
cmd_list_commands_entry attribute
cmd_list_keys_entry attribute
cmd_list_panes_entry attribute
cmd_list_sessions_entry attribute
cmd_list_windows_entry attribute
cmd_load_buffer_entry attribute
cmd_lock_client_entry attribute
cmd_lock_server_entry attribute
cmd_lock_session_entry attribute
cmd_move_pane_entry attribute
cmd_move_window_entry attribute
cmd_new_session_entry attribute
cmd_new_window_entry attribute
cmd_next_layout_entry attribute
cmd_next_window_entry attribute
cmd_paste_buffer_entry attribute
cmd_pipe_pane_entry attribute
cmd_previous_layout_entry attribute
cmd_previous_window_entry attribute
cmd_refresh_client_entry attribute
cmd_rename_session_entry attribute
cmd_rename_window_entry attribute
cmd_resize_pane_entry attribute
cmd_resize_window_entry attribute
cmd_respawn_pane_entry attribute
cmd_respawn_window_entry attribute
cmd_rotate_window_entry attribute
cmd_run_shell_entry attribute
cmd_save_buffer_entry attribute
cmd_select_layout_entry attribute
cmd_select_pane_entry attribute
cmd_select_window_entry attribute
cmd_send_keys_entry attribute
cmd_send_prefix_entry attribute
cmd_set_buffer_entry attribute
cmd_set_environment_entry attribute
cmd_set_hook_entry attribute
cmd_set_option_entry attribute
cmd_set_window_option_entry attribute
cmd_show_buffer_entry attribute
cmd_show_environment_entry attribute
cmd_show_hooks_entry attribute
cmd_show_messages_entry attribute
cmd_show_options_entry attribute
cmd_show_window_options_entry attribute
cmd_source_file_entry attribute
cmd_split_window_entry attribute
cmd_start_server_entry attribute
cmd_suspend_client_entry attribute
cmd_swap_pane_entry attribute
cmd_swap_window_entry attribute
cmd_switch_client_entry attribute
cmd_unbind_key_entry attribute
cmd_unlink_window_entry attribute
cmd_up_pane_entry attribute
cmd_wait_for_entry attribute
cmd_get_entry function
Options and formats 3 types, 5 functions and constants
Options and formats — Supporting declarations 18 types, 398 functions and constants
format_entry_cmp function
format_entry_tree_RB_FIND function
format_entry_tree_RB_INSERT function
format_entry_tree_RB_INSERT_COLOR function
format_entry_tree_RB_MINMAX function
format_entry_tree_RB_NEXT function
format_entry_tree_RB_NFIND function
format_entry_tree_RB_PREV function
format_entry_tree_RB_REMOVE function
format_entry_tree_RB_REMOVE_COLOR function
options_parent_table_entry function
options_table_entry function

Screen and terminal 4 types, 5 functions and constants
Screen and terminal — Supporting declarations 42 types, 590 functions and constants
grid_cleared_entry attribute
Layouts and buffers 2 types, 5 functions and constants
Layouts and buffers — Supporting declarations 5 types, 85 functions and constants
Supporting declarations 58 types, 775 functions and constants
Esc

Type to search.