4 * Copyright (c) 2011 Nicholas Marriott <nicholas.marriott@gmail.com>
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
15 * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
16 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 #include <sys/types.h>
27 * This file has a tables with all the server, session and window
28 * options. These tables are the master copy of the options with their real
29 * (user-visible) types, range limits and default values. At start these are
30 * copied into the runtime global options trees (which only has number and
31 * string types). These tables are then used to look up the real type when the
32 * user sets an option or its value needs to be shown.
35 /* Choice option type lists. */
36 static const char *options_table_mode_keys_list
[] = {
39 static const char *options_table_clock_mode_style_list
[] = {
42 static const char *options_table_status_list
[] = {
43 "off", "on", "2", "3", "4", "5", NULL
45 static const char *options_table_message_line_list
[] = {
46 "0", "1", "2", "3", "4", NULL
48 static const char *options_table_status_keys_list
[] = {
51 static const char *options_table_status_justify_list
[] = {
52 "left", "centre", "right", "absolute-centre", NULL
54 static const char *options_table_status_position_list
[] = {
57 static const char *options_table_bell_action_list
[] = {
58 "none", "any", "current", "other", NULL
60 static const char *options_table_visual_bell_list
[] = {
61 "off", "on", "both", NULL
63 static const char *options_table_cursor_style_list
[] = {
64 "default", "blinking-block", "block", "blinking-underline", "underline",
65 "blinking-bar", "bar", NULL
67 static const char *options_table_pane_status_list
[] = {
68 "off", "top", "bottom", NULL
70 static const char *options_table_pane_border_indicators_list
[] = {
71 "off", "colour", "arrows", "both", NULL
73 static const char *options_table_pane_border_lines_list
[] = {
74 "single", "double", "heavy", "simple", "number", NULL
76 static const char *options_table_popup_border_lines_list
[] = {
77 "single", "double", "heavy", "simple", "rounded", "padded", "none", NULL
79 static const char *options_table_set_clipboard_list
[] = {
80 "off", "external", "on", NULL
82 static const char *options_table_window_size_list
[] = {
83 "largest", "smallest", "manual", "latest", NULL
85 static const char *options_table_remain_on_exit_list
[] = {
86 "off", "on", "failed", NULL
88 static const char *options_table_detach_on_destroy_list
[] = {
89 "off", "on", "no-detached", NULL
91 static const char *options_table_extended_keys_list
[] = {
92 "off", "on", "always", NULL
94 static const char *options_table_allow_passthrough_list
[] = {
95 "off", "on", "all", NULL
98 /* Status line format. */
99 #define OPTIONS_TABLE_STATUS_FORMAT1 \
100 "#[align=left range=left #{E:status-left-style}]" \
102 "#{T;=/#{status-left-length}:status-left}" \
104 "#[norange default]" \
105 "#[list=on align=#{status-justify}]" \
106 "#[list=left-marker]<#[list=right-marker]>#[list=on]" \
108 "#[range=window|#{window_index} " \
109 "#{E:window-status-style}" \
110 "#{?#{&&:#{window_last_flag}," \
111 "#{!=:#{E:window-status-last-style},default}}, " \
112 "#{E:window-status-last-style}," \
114 "#{?#{&&:#{window_bell_flag}," \
115 "#{!=:#{E:window-status-bell-style},default}}, " \
116 "#{E:window-status-bell-style}," \
117 "#{?#{&&:#{||:#{window_activity_flag}," \
118 "#{window_silence_flag}}," \
120 "#{E:window-status-activity-style}," \
122 "#{E:window-status-activity-style}," \
127 "#{T:window-status-format}" \
129 "#[norange default]" \
130 "#{?window_end_flag,,#{window-status-separator}}" \
132 "#[range=window|#{window_index} list=focus " \
133 "#{?#{!=:#{E:window-status-current-style},default}," \
134 "#{E:window-status-current-style}," \
135 "#{E:window-status-style}" \
137 "#{?#{&&:#{window_last_flag}," \
138 "#{!=:#{E:window-status-last-style},default}}, " \
139 "#{E:window-status-last-style}," \
141 "#{?#{&&:#{window_bell_flag}," \
142 "#{!=:#{E:window-status-bell-style},default}}, " \
143 "#{E:window-status-bell-style}," \
144 "#{?#{&&:#{||:#{window_activity_flag}," \
145 "#{window_silence_flag}}," \
147 "#{E:window-status-activity-style}," \
149 "#{E:window-status-activity-style}," \
154 "#{T:window-status-current-format}" \
156 "#[norange list=on default]" \
157 "#{?window_end_flag,,#{window-status-separator}}" \
159 "#[nolist align=right range=right #{E:status-right-style}]" \
161 "#{T;=/#{status-right-length}:status-right}" \
164 #define OPTIONS_TABLE_STATUS_FORMAT2 \
165 "#[align=centre]#{P:#{?pane_active,#[reverse],}" \
166 "#{pane_index}[#{pane_width}x#{pane_height}]#[default] }"
167 static const char *options_table_status_format_default
[] = {
168 OPTIONS_TABLE_STATUS_FORMAT1
, OPTIONS_TABLE_STATUS_FORMAT2
, NULL
171 /* Helpers for hook options. */
172 #define OPTIONS_TABLE_HOOK(hook_name, default_value) \
173 { .name = hook_name, \
174 .type = OPTIONS_TABLE_COMMAND, \
175 .scope = OPTIONS_TABLE_SESSION, \
176 .flags = OPTIONS_TABLE_IS_ARRAY|OPTIONS_TABLE_IS_HOOK, \
177 .default_str = default_value, \
181 #define OPTIONS_TABLE_PANE_HOOK(hook_name, default_value) \
182 { .name = hook_name, \
183 .type = OPTIONS_TABLE_COMMAND, \
184 .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE, \
185 .flags = OPTIONS_TABLE_IS_ARRAY|OPTIONS_TABLE_IS_HOOK, \
186 .default_str = default_value, \
190 #define OPTIONS_TABLE_WINDOW_HOOK(hook_name, default_value) \
191 { .name = hook_name, \
192 .type = OPTIONS_TABLE_COMMAND, \
193 .scope = OPTIONS_TABLE_WINDOW, \
194 .flags = OPTIONS_TABLE_IS_ARRAY|OPTIONS_TABLE_IS_HOOK, \
195 .default_str = default_value, \
199 /* Map of name conversions. */
200 const struct options_name_map options_other_names
[] = {
201 { "display-panes-color", "display-panes-colour" },
202 { "display-panes-active-color", "display-panes-active-colour" },
203 { "clock-mode-color", "clock-mode-colour" },
204 { "cursor-color", "cursor-colour" },
205 { "pane-colors", "pane-colours" },
209 /* Top-level options. */
210 const struct options_table_entry options_table
[] = {
211 /* Server options. */
212 { .name
= "backspace",
213 .type
= OPTIONS_TABLE_KEY
,
214 .scope
= OPTIONS_TABLE_SERVER
,
215 .default_num
= '\177',
216 .text
= "The key to send for backspace."
219 { .name
= "buffer-limit",
220 .type
= OPTIONS_TABLE_NUMBER
,
221 .scope
= OPTIONS_TABLE_SERVER
,
225 .text
= "The maximum number of automatic buffers. "
226 "When this is reached, the oldest buffer is deleted."
229 { .name
= "command-alias",
230 .type
= OPTIONS_TABLE_STRING
,
231 .scope
= OPTIONS_TABLE_SERVER
,
232 .flags
= OPTIONS_TABLE_IS_ARRAY
,
233 .default_str
= "split-pane=split-window,"
234 "splitp=split-window,"
235 "server-info=show-messages -JT,"
236 "info=show-messages -JT,"
237 "choose-window=choose-tree -w,"
238 "choose-session=choose-tree -s",
240 .text
= "Array of command aliases. "
241 "Each entry is an alias and a command separated by '='."
244 { .name
= "copy-command",
245 .type
= OPTIONS_TABLE_STRING
,
246 .scope
= OPTIONS_TABLE_SERVER
,
248 .text
= "Shell command run when text is copied. "
249 "If empty, no command is run."
252 { .name
= "cursor-colour",
253 .type
= OPTIONS_TABLE_COLOUR
,
254 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
256 .text
= "Colour of the cursor."
259 { .name
= "cursor-style",
260 .type
= OPTIONS_TABLE_CHOICE
,
261 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
262 .choices
= options_table_cursor_style_list
,
264 .text
= "Style of the cursor."
267 { .name
= "default-terminal",
268 .type
= OPTIONS_TABLE_STRING
,
269 .scope
= OPTIONS_TABLE_SERVER
,
270 .default_str
= TMUX_TERM
,
271 .text
= "Default for the 'TERM' environment variable."
275 .type
= OPTIONS_TABLE_STRING
,
276 .scope
= OPTIONS_TABLE_SERVER
,
277 .default_str
= _PATH_VI
,
278 .text
= "Editor run to edit files."
281 { .name
= "escape-time",
282 .type
= OPTIONS_TABLE_NUMBER
,
283 .scope
= OPTIONS_TABLE_SERVER
,
287 .unit
= "milliseconds",
288 .text
= "Time to wait before assuming a key is Escape."
291 { .name
= "exit-empty",
292 .type
= OPTIONS_TABLE_FLAG
,
293 .scope
= OPTIONS_TABLE_SERVER
,
295 .text
= "Whether the server should exit if there are no sessions."
298 { .name
= "exit-unattached",
299 .type
= OPTIONS_TABLE_FLAG
,
300 .scope
= OPTIONS_TABLE_SERVER
,
302 .text
= "Whether the server should exit if there are no attached "
306 { .name
= "extended-keys",
307 .type
= OPTIONS_TABLE_CHOICE
,
308 .scope
= OPTIONS_TABLE_SERVER
,
309 .choices
= options_table_extended_keys_list
,
311 .text
= "Whether to request extended key sequences from terminals "
315 { .name
= "focus-events",
316 .type
= OPTIONS_TABLE_FLAG
,
317 .scope
= OPTIONS_TABLE_SERVER
,
319 .text
= "Whether to send focus events to applications."
322 { .name
= "history-file",
323 .type
= OPTIONS_TABLE_STRING
,
324 .scope
= OPTIONS_TABLE_SERVER
,
326 .text
= "Location of the command prompt history file. "
327 "Empty does not write a history file."
330 { .name
= "menu-style",
331 .type
= OPTIONS_TABLE_STRING
,
332 .scope
= OPTIONS_TABLE_WINDOW
,
333 .flags
= OPTIONS_TABLE_IS_STYLE
,
334 .default_str
= "default",
336 .text
= "Default style of menu."
339 { .name
= "menu-border-style",
340 .type
= OPTIONS_TABLE_STRING
,
341 .scope
= OPTIONS_TABLE_WINDOW
,
342 .default_str
= "default",
343 .flags
= OPTIONS_TABLE_IS_STYLE
,
345 .text
= "Default style of menu borders."
348 { .name
= "menu-border-lines",
349 .type
= OPTIONS_TABLE_CHOICE
,
350 .scope
= OPTIONS_TABLE_WINDOW
,
351 .choices
= options_table_popup_border_lines_list
,
352 .default_num
= BOX_LINES_SINGLE
,
353 .text
= "Type of characters used to draw menu border lines. Some of "
354 "these are only supported on terminals with UTF-8 support."
357 { .name
= "message-limit",
358 .type
= OPTIONS_TABLE_NUMBER
,
359 .scope
= OPTIONS_TABLE_SERVER
,
363 .text
= "Maximum number of server messages to keep."
366 { .name
= "prompt-history-limit",
367 .type
= OPTIONS_TABLE_NUMBER
,
368 .scope
= OPTIONS_TABLE_SERVER
,
372 .text
= "Maximum number of commands to keep in history."
375 { .name
= "set-clipboard",
376 .type
= OPTIONS_TABLE_CHOICE
,
377 .scope
= OPTIONS_TABLE_SERVER
,
378 .choices
= options_table_set_clipboard_list
,
380 .text
= "Whether to attempt to set the system clipboard ('on' or "
381 "'external') and whether to allow applications to create "
382 "paste buffers with an escape sequence ('on' only)."
385 { .name
= "terminal-overrides",
386 .type
= OPTIONS_TABLE_STRING
,
387 .scope
= OPTIONS_TABLE_SERVER
,
388 .flags
= OPTIONS_TABLE_IS_ARRAY
,
391 .text
= "List of terminal capabilities overrides."
394 { .name
= "terminal-features",
395 .type
= OPTIONS_TABLE_STRING
,
396 .scope
= OPTIONS_TABLE_SERVER
,
397 .flags
= OPTIONS_TABLE_IS_ARRAY
,
398 .default_str
= "xterm*:clipboard:ccolour:cstyle:focus:title,"
402 .text
= "List of terminal features, used if they cannot be "
403 "automatically detected."
406 { .name
= "user-keys",
407 .type
= OPTIONS_TABLE_STRING
,
408 .scope
= OPTIONS_TABLE_SERVER
,
409 .flags
= OPTIONS_TABLE_IS_ARRAY
,
412 .text
= "User key assignments. "
413 "Each sequence in the list is translated into a key: "
414 "'User0', 'User1' and so on."
417 /* Session options. */
418 { .name
= "activity-action",
419 .type
= OPTIONS_TABLE_CHOICE
,
420 .scope
= OPTIONS_TABLE_SESSION
,
421 .choices
= options_table_bell_action_list
,
422 .default_num
= ALERT_OTHER
,
423 .text
= "Action to take on an activity alert."
426 { .name
= "assume-paste-time",
427 .type
= OPTIONS_TABLE_NUMBER
,
428 .scope
= OPTIONS_TABLE_SESSION
,
432 .unit
= "milliseconds",
433 .text
= "Maximum time between input to assume it is pasting rather "
437 { .name
= "base-index",
438 .type
= OPTIONS_TABLE_NUMBER
,
439 .scope
= OPTIONS_TABLE_SESSION
,
443 .text
= "Default index of the first window in each session."
446 { .name
= "bell-action",
447 .type
= OPTIONS_TABLE_CHOICE
,
448 .scope
= OPTIONS_TABLE_SESSION
,
449 .choices
= options_table_bell_action_list
,
450 .default_num
= ALERT_ANY
,
451 .text
= "Action to take on a bell alert."
454 { .name
= "default-command",
455 .type
= OPTIONS_TABLE_STRING
,
456 .scope
= OPTIONS_TABLE_SESSION
,
458 .text
= "Default command to run in new panes. If empty, a shell is "
462 { .name
= "default-shell",
463 .type
= OPTIONS_TABLE_STRING
,
464 .scope
= OPTIONS_TABLE_SESSION
,
465 .default_str
= _PATH_BSHELL
,
466 .text
= "Location of default shell."
469 { .name
= "default-size",
470 .type
= OPTIONS_TABLE_STRING
,
471 .scope
= OPTIONS_TABLE_SESSION
,
472 .pattern
= "[0-9]*x[0-9]*",
473 .default_str
= "80x24",
474 .text
= "Initial size of new sessions."
477 { .name
= "destroy-unattached",
478 .type
= OPTIONS_TABLE_FLAG
,
479 .scope
= OPTIONS_TABLE_SESSION
,
481 .text
= "Whether to destroy sessions when they have no attached "
485 { .name
= "detach-on-destroy",
486 .type
= OPTIONS_TABLE_CHOICE
,
487 .scope
= OPTIONS_TABLE_SESSION
,
488 .choices
= options_table_detach_on_destroy_list
,
490 .text
= "Whether to detach when a session is destroyed, or switch "
491 "the client to another session if any exist."
494 { .name
= "display-panes-active-colour",
495 .type
= OPTIONS_TABLE_COLOUR
,
496 .scope
= OPTIONS_TABLE_SESSION
,
498 .text
= "Colour of the active pane for 'display-panes'."
501 { .name
= "display-panes-colour",
502 .type
= OPTIONS_TABLE_COLOUR
,
503 .scope
= OPTIONS_TABLE_SESSION
,
505 .text
= "Colour of not active panes for 'display-panes'."
508 { .name
= "display-panes-time",
509 .type
= OPTIONS_TABLE_NUMBER
,
510 .scope
= OPTIONS_TABLE_SESSION
,
514 .unit
= "milliseconds",
515 .text
= "Time for which 'display-panes' should show pane numbers."
518 { .name
= "display-time",
519 .type
= OPTIONS_TABLE_NUMBER
,
520 .scope
= OPTIONS_TABLE_SESSION
,
524 .unit
= "milliseconds",
525 .text
= "Time for which status line messages should appear."
528 { .name
= "history-limit",
529 .type
= OPTIONS_TABLE_NUMBER
,
530 .scope
= OPTIONS_TABLE_SESSION
,
535 .text
= "Maximum number of lines to keep in the history for each "
537 "If changed, the new value applies only to new panes."
540 { .name
= "key-table",
541 .type
= OPTIONS_TABLE_STRING
,
542 .scope
= OPTIONS_TABLE_SESSION
,
543 .default_str
= "root",
544 .text
= "Default key table. "
545 "Key presses are first looked up in this table."
548 { .name
= "lock-after-time",
549 .type
= OPTIONS_TABLE_NUMBER
,
550 .scope
= OPTIONS_TABLE_SESSION
,
555 .text
= "Time after which a client is locked if not used."
558 { .name
= "lock-command",
559 .type
= OPTIONS_TABLE_STRING
,
560 .scope
= OPTIONS_TABLE_SESSION
,
561 .default_str
= "lock -np",
562 .text
= "Shell command to run to lock a client."
565 { .name
= "message-command-style",
566 .type
= OPTIONS_TABLE_STRING
,
567 .scope
= OPTIONS_TABLE_SESSION
,
568 .default_str
= "bg=black,fg=yellow",
569 .flags
= OPTIONS_TABLE_IS_STYLE
,
571 .text
= "Style of the command prompt when in command mode, if "
572 "'mode-keys' is set to 'vi'."
575 { .name
= "message-line",
576 .type
= OPTIONS_TABLE_CHOICE
,
577 .scope
= OPTIONS_TABLE_SESSION
,
578 .choices
= options_table_message_line_list
,
580 .text
= "Position (line) of messages and the command prompt."
583 { .name
= "message-style",
584 .type
= OPTIONS_TABLE_STRING
,
585 .scope
= OPTIONS_TABLE_SESSION
,
586 .default_str
= "bg=yellow,fg=black",
587 .flags
= OPTIONS_TABLE_IS_STYLE
,
589 .text
= "Style of messages and the command prompt."
593 .type
= OPTIONS_TABLE_FLAG
,
594 .scope
= OPTIONS_TABLE_SESSION
,
596 .text
= "Whether the mouse is recognised and mouse key bindings are "
598 "Applications inside panes can use the mouse even when 'off'."
602 .type
= OPTIONS_TABLE_KEY
,
603 .scope
= OPTIONS_TABLE_SESSION
,
604 .default_num
= '\002',
605 .text
= "The prefix key."
609 .type
= OPTIONS_TABLE_KEY
,
610 .scope
= OPTIONS_TABLE_SESSION
,
611 .default_num
= KEYC_NONE
,
612 .text
= "A second prefix key."
615 { .name
= "renumber-windows",
616 .type
= OPTIONS_TABLE_FLAG
,
617 .scope
= OPTIONS_TABLE_SESSION
,
619 .text
= "Whether windows are automatically renumbered rather than "
623 { .name
= "repeat-time",
624 .type
= OPTIONS_TABLE_NUMBER
,
625 .scope
= OPTIONS_TABLE_SESSION
,
629 .unit
= "milliseconds",
630 .text
= "Time to wait for a key binding to repeat, if it is bound "
631 "with the '-r' flag."
634 { .name
= "set-titles",
635 .type
= OPTIONS_TABLE_FLAG
,
636 .scope
= OPTIONS_TABLE_SESSION
,
638 .text
= "Whether to set the terminal title, if supported."
641 { .name
= "set-titles-string",
642 .type
= OPTIONS_TABLE_STRING
,
643 .scope
= OPTIONS_TABLE_SESSION
,
644 .default_str
= "#S:#I:#W - \"#T\" #{session_alerts}",
645 .text
= "Format of the terminal title to set."
648 { .name
= "silence-action",
649 .type
= OPTIONS_TABLE_CHOICE
,
650 .scope
= OPTIONS_TABLE_SESSION
,
651 .choices
= options_table_bell_action_list
,
652 .default_num
= ALERT_OTHER
,
653 .text
= "Action to take on a silence alert."
657 .type
= OPTIONS_TABLE_CHOICE
,
658 .scope
= OPTIONS_TABLE_SESSION
,
659 .choices
= options_table_status_list
,
661 .text
= "Number of lines in the status line."
664 { .name
= "status-bg",
665 .type
= OPTIONS_TABLE_COLOUR
,
666 .scope
= OPTIONS_TABLE_SESSION
,
668 .text
= "Background colour of the status line. This option is "
669 "deprecated, use 'status-style' instead."
672 { .name
= "status-fg",
673 .type
= OPTIONS_TABLE_COLOUR
,
674 .scope
= OPTIONS_TABLE_SESSION
,
676 .text
= "Foreground colour of the status line. This option is "
677 "deprecated, use 'status-style' instead."
680 { .name
= "status-format",
681 .type
= OPTIONS_TABLE_STRING
,
682 .scope
= OPTIONS_TABLE_SESSION
,
683 .flags
= OPTIONS_TABLE_IS_ARRAY
,
684 .default_arr
= options_table_status_format_default
,
685 .text
= "Formats for the status lines. "
686 "Each array member is the format for one status line. "
687 "The default status line is made up of several components "
688 "which may be configured individually with other options such "
692 { .name
= "status-interval",
693 .type
= OPTIONS_TABLE_NUMBER
,
694 .scope
= OPTIONS_TABLE_SESSION
,
699 .text
= "Number of seconds between status line updates."
702 { .name
= "status-justify",
703 .type
= OPTIONS_TABLE_CHOICE
,
704 .scope
= OPTIONS_TABLE_SESSION
,
705 .choices
= options_table_status_justify_list
,
707 .text
= "Position of the window list in the status line."
710 { .name
= "status-keys",
711 .type
= OPTIONS_TABLE_CHOICE
,
712 .scope
= OPTIONS_TABLE_SESSION
,
713 .choices
= options_table_status_keys_list
,
714 .default_num
= MODEKEY_EMACS
,
715 .text
= "Key set to use at the command prompt."
718 { .name
= "status-left",
719 .type
= OPTIONS_TABLE_STRING
,
720 .scope
= OPTIONS_TABLE_SESSION
,
721 .default_str
= "[#{session_name}] ",
722 .text
= "Contents of the left side of the status line."
725 { .name
= "status-left-length",
726 .type
= OPTIONS_TABLE_NUMBER
,
727 .scope
= OPTIONS_TABLE_SESSION
,
731 .text
= "Maximum width of the left side of the status line."
734 { .name
= "status-left-style",
735 .type
= OPTIONS_TABLE_STRING
,
736 .scope
= OPTIONS_TABLE_SESSION
,
737 .default_str
= "default",
738 .flags
= OPTIONS_TABLE_IS_STYLE
,
740 .text
= "Style of the left side of the status line."
743 { .name
= "status-position",
744 .type
= OPTIONS_TABLE_CHOICE
,
745 .scope
= OPTIONS_TABLE_SESSION
,
746 .choices
= options_table_status_position_list
,
748 .text
= "Position of the status line."
751 { .name
= "status-right",
752 .type
= OPTIONS_TABLE_STRING
,
753 .scope
= OPTIONS_TABLE_SESSION
,
754 .default_str
= "#{?window_bigger,"
755 "[#{window_offset_x}#,#{window_offset_y}] ,}"
756 "\"#{=21:pane_title}\" %H:%M %d-%b-%y",
757 .text
= "Contents of the right side of the status line."
761 { .name
= "status-right-length",
762 .type
= OPTIONS_TABLE_NUMBER
,
763 .scope
= OPTIONS_TABLE_SESSION
,
767 .text
= "Maximum width of the right side of the status line."
770 { .name
= "status-right-style",
771 .type
= OPTIONS_TABLE_STRING
,
772 .scope
= OPTIONS_TABLE_SESSION
,
773 .default_str
= "default",
774 .flags
= OPTIONS_TABLE_IS_STYLE
,
776 .text
= "Style of the right side of the status line."
779 { .name
= "status-style",
780 .type
= OPTIONS_TABLE_STRING
,
781 .scope
= OPTIONS_TABLE_SESSION
,
782 .default_str
= "bg=green,fg=black",
783 .flags
= OPTIONS_TABLE_IS_STYLE
,
785 .text
= "Style of the status line."
788 { .name
= "update-environment",
789 .type
= OPTIONS_TABLE_STRING
,
790 .scope
= OPTIONS_TABLE_SESSION
,
791 .flags
= OPTIONS_TABLE_IS_ARRAY
,
792 .default_str
= "DISPLAY KRB5CCNAME SSH_ASKPASS SSH_AUTH_SOCK "
793 "SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY",
794 .text
= "List of environment variables to update in the session "
795 "environment when a client is attached."
798 { .name
= "visual-activity",
799 .type
= OPTIONS_TABLE_CHOICE
,
800 .scope
= OPTIONS_TABLE_SESSION
,
801 .choices
= options_table_visual_bell_list
,
802 .default_num
= VISUAL_OFF
,
803 .text
= "How activity alerts should be shown: a message ('on'), "
804 "a message and a bell ('both') or nothing ('off')."
807 { .name
= "visual-bell",
808 .type
= OPTIONS_TABLE_CHOICE
,
809 .scope
= OPTIONS_TABLE_SESSION
,
810 .choices
= options_table_visual_bell_list
,
811 .default_num
= VISUAL_OFF
,
812 .text
= "How bell alerts should be shown: a message ('on'), "
813 "a message and a bell ('both') or nothing ('off')."
816 { .name
= "visual-silence",
817 .type
= OPTIONS_TABLE_CHOICE
,
818 .scope
= OPTIONS_TABLE_SESSION
,
819 .choices
= options_table_visual_bell_list
,
820 .default_num
= VISUAL_OFF
,
821 .text
= "How silence alerts should be shown: a message ('on'), "
822 "a message and a bell ('both') or nothing ('off')."
825 { .name
= "word-separators",
826 .type
= OPTIONS_TABLE_STRING
,
827 .scope
= OPTIONS_TABLE_SESSION
,
829 * The set of non-alphanumeric printable ASCII characters minus the
832 .default_str
= "!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~",
833 .text
= "Characters considered to separate words."
836 /* Window options. */
837 { .name
= "aggressive-resize",
838 .type
= OPTIONS_TABLE_FLAG
,
839 .scope
= OPTIONS_TABLE_WINDOW
,
841 .text
= "When 'window-size' is 'smallest', whether the maximum size "
842 "of a window is the smallest attached session where it is "
843 "the current window ('on') or the smallest session it is "
847 { .name
= "allow-passthrough",
848 .type
= OPTIONS_TABLE_CHOICE
,
849 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
850 .choices
= options_table_allow_passthrough_list
,
852 .text
= "Whether applications are allowed to use the escape sequence "
853 "to bypass tmux. Can be 'off' (disallowed), 'on' (allowed "
854 "if the pane is visible), or 'all' (allowed even if the pane "
858 { .name
= "allow-rename",
859 .type
= OPTIONS_TABLE_FLAG
,
860 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
862 .text
= "Whether applications are allowed to use the escape sequence "
866 { .name
= "alternate-screen",
867 .type
= OPTIONS_TABLE_FLAG
,
868 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
870 .text
= "Whether applications are allowed to use the alternate "
874 { .name
= "automatic-rename",
875 .type
= OPTIONS_TABLE_FLAG
,
876 .scope
= OPTIONS_TABLE_WINDOW
,
878 .text
= "Whether windows are automatically renamed."
881 { .name
= "automatic-rename-format",
882 .type
= OPTIONS_TABLE_STRING
,
883 .scope
= OPTIONS_TABLE_WINDOW
,
884 .default_str
= "#{?pane_in_mode,[tmux],#{pane_current_command}}"
885 "#{?pane_dead,[dead],}",
886 .text
= "Format used to automatically rename windows."
889 { .name
= "clock-mode-colour",
890 .type
= OPTIONS_TABLE_COLOUR
,
891 .scope
= OPTIONS_TABLE_WINDOW
,
893 .text
= "Colour of the clock in clock mode."
896 { .name
= "clock-mode-style",
897 .type
= OPTIONS_TABLE_CHOICE
,
898 .scope
= OPTIONS_TABLE_WINDOW
,
899 .choices
= options_table_clock_mode_style_list
,
901 .text
= "Time format of the clock in clock mode."
904 { .name
= "copy-mode-match-style",
905 .type
= OPTIONS_TABLE_STRING
,
906 .scope
= OPTIONS_TABLE_WINDOW
,
907 .default_str
= "bg=cyan,fg=black",
908 .flags
= OPTIONS_TABLE_IS_STYLE
,
910 .text
= "Style of search matches in copy mode."
913 { .name
= "copy-mode-current-match-style",
914 .type
= OPTIONS_TABLE_STRING
,
915 .scope
= OPTIONS_TABLE_WINDOW
,
916 .default_str
= "bg=magenta,fg=black",
917 .flags
= OPTIONS_TABLE_IS_STYLE
,
919 .text
= "Style of the current search match in copy mode."
922 { .name
= "copy-mode-mark-style",
923 .type
= OPTIONS_TABLE_STRING
,
924 .scope
= OPTIONS_TABLE_WINDOW
,
925 .default_str
= "bg=red,fg=black",
926 .flags
= OPTIONS_TABLE_IS_STYLE
,
928 .text
= "Style of the marked line in copy mode."
931 { .name
= "fill-character",
932 .type
= OPTIONS_TABLE_STRING
,
933 .scope
= OPTIONS_TABLE_WINDOW
,
935 .text
= "Character used to fill unused parts of window."
938 { .name
= "main-pane-height",
939 .type
= OPTIONS_TABLE_STRING
,
940 .scope
= OPTIONS_TABLE_WINDOW
,
942 .text
= "Height of the main pane in the 'main-horizontal' layout. "
943 "This may be a percentage, for example '10%'."
946 { .name
= "main-pane-width",
947 .type
= OPTIONS_TABLE_STRING
,
948 .scope
= OPTIONS_TABLE_WINDOW
,
950 .text
= "Width of the main pane in the 'main-vertical' layout. "
951 "This may be a percentage, for example '10%'."
954 { .name
= "mode-keys",
955 .type
= OPTIONS_TABLE_CHOICE
,
956 .scope
= OPTIONS_TABLE_WINDOW
,
957 .choices
= options_table_mode_keys_list
,
958 .default_num
= MODEKEY_EMACS
,
959 .text
= "Key set used in copy mode."
962 { .name
= "mode-style",
963 .type
= OPTIONS_TABLE_STRING
,
964 .scope
= OPTIONS_TABLE_WINDOW
,
965 .default_str
= "bg=yellow,fg=black",
966 .flags
= OPTIONS_TABLE_IS_STYLE
,
968 .text
= "Style of indicators and highlighting in modes."
971 { .name
= "monitor-activity",
972 .type
= OPTIONS_TABLE_FLAG
,
973 .scope
= OPTIONS_TABLE_WINDOW
,
975 .text
= "Whether an alert is triggered by activity."
978 { .name
= "monitor-bell",
979 .type
= OPTIONS_TABLE_FLAG
,
980 .scope
= OPTIONS_TABLE_WINDOW
,
982 .text
= "Whether an alert is triggered by a bell."
985 { .name
= "monitor-silence",
986 .type
= OPTIONS_TABLE_NUMBER
,
987 .scope
= OPTIONS_TABLE_WINDOW
,
991 .text
= "Time after which an alert is triggered by silence. "
992 "Zero means no alert."
996 { .name
= "other-pane-height",
997 .type
= OPTIONS_TABLE_STRING
,
998 .scope
= OPTIONS_TABLE_WINDOW
,
1000 .text
= "Height of the other panes in the 'main-horizontal' layout. "
1001 "This may be a percentage, for example '10%'."
1004 { .name
= "other-pane-width",
1005 .type
= OPTIONS_TABLE_STRING
,
1006 .scope
= OPTIONS_TABLE_WINDOW
,
1008 .text
= "Height of the other panes in the 'main-vertical' layout. "
1009 "This may be a percentage, for example '10%'."
1012 { .name
= "pane-active-border-style",
1013 .type
= OPTIONS_TABLE_STRING
,
1014 .scope
= OPTIONS_TABLE_WINDOW
,
1015 .default_str
= "#{?pane_in_mode,fg=yellow,#{?synchronize-panes,fg=red,fg=green}}",
1016 .flags
= OPTIONS_TABLE_IS_STYLE
,
1018 .text
= "Style of the active pane border."
1021 { .name
= "pane-base-index",
1022 .type
= OPTIONS_TABLE_NUMBER
,
1023 .scope
= OPTIONS_TABLE_WINDOW
,
1025 .maximum
= USHRT_MAX
,
1027 .text
= "Index of the first pane in each window."
1030 { .name
= "pane-border-format",
1031 .type
= OPTIONS_TABLE_STRING
,
1032 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
1033 .default_str
= "#{?pane_active,#[reverse],}#{pane_index}#[default] "
1034 "\"#{pane_title}\"",
1035 .text
= "Format of text in the pane status lines."
1038 { .name
= "pane-border-indicators",
1039 .type
= OPTIONS_TABLE_CHOICE
,
1040 .scope
= OPTIONS_TABLE_WINDOW
,
1041 .choices
= options_table_pane_border_indicators_list
,
1042 .default_num
= PANE_BORDER_COLOUR
,
1043 .text
= "Whether to indicate the active pane by colouring border or "
1044 "displaying arrow markers."
1047 { .name
= "pane-border-lines",
1048 .type
= OPTIONS_TABLE_CHOICE
,
1049 .scope
= OPTIONS_TABLE_WINDOW
,
1050 .choices
= options_table_pane_border_lines_list
,
1051 .default_num
= PANE_LINES_SINGLE
,
1052 .text
= "Type of characters used to draw pane border lines. Some of "
1053 "these are only supported on terminals with UTF-8 support."
1056 { .name
= "pane-border-status",
1057 .type
= OPTIONS_TABLE_CHOICE
,
1058 .scope
= OPTIONS_TABLE_WINDOW
,
1059 .choices
= options_table_pane_status_list
,
1060 .default_num
= PANE_STATUS_OFF
,
1061 .text
= "Position of the pane status lines."
1064 { .name
= "pane-border-style",
1065 .type
= OPTIONS_TABLE_STRING
,
1066 .scope
= OPTIONS_TABLE_WINDOW
,
1067 .default_str
= "default",
1068 .flags
= OPTIONS_TABLE_IS_STYLE
,
1070 .text
= "Style of the pane status lines."
1073 { .name
= "pane-colours",
1074 .type
= OPTIONS_TABLE_COLOUR
,
1075 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
1077 .flags
= OPTIONS_TABLE_IS_ARRAY
,
1078 .text
= "The default colour palette for colours zero to 255."
1081 { .name
= "popup-style",
1082 .type
= OPTIONS_TABLE_STRING
,
1083 .scope
= OPTIONS_TABLE_WINDOW
,
1084 .default_str
= "default",
1085 .flags
= OPTIONS_TABLE_IS_STYLE
,
1087 .text
= "Default style of popups."
1090 { .name
= "popup-border-style",
1091 .type
= OPTIONS_TABLE_STRING
,
1092 .scope
= OPTIONS_TABLE_WINDOW
,
1093 .default_str
= "default",
1094 .flags
= OPTIONS_TABLE_IS_STYLE
,
1096 .text
= "Default style of popup borders."
1099 { .name
= "popup-border-lines",
1100 .type
= OPTIONS_TABLE_CHOICE
,
1101 .scope
= OPTIONS_TABLE_WINDOW
,
1102 .choices
= options_table_popup_border_lines_list
,
1103 .default_num
= BOX_LINES_SINGLE
,
1104 .text
= "Type of characters used to draw popup border lines. Some of "
1105 "these are only supported on terminals with UTF-8 support."
1108 { .name
= "remain-on-exit",
1109 .type
= OPTIONS_TABLE_CHOICE
,
1110 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
1111 .choices
= options_table_remain_on_exit_list
,
1113 .text
= "Whether panes should remain ('on') or be automatically "
1114 "killed ('off' or 'failed') when the program inside exits."
1117 { .name
= "remain-on-exit-format",
1118 .type
= OPTIONS_TABLE_STRING
,
1119 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
1120 .default_str
= "Pane is dead ("
1121 "#{?#{!=:#{pane_dead_status},},"
1122 "status #{pane_dead_status},}"
1123 "#{?#{!=:#{pane_dead_signal},},"
1124 "signal #{pane_dead_signal},}, "
1125 "#{t:pane_dead_time})",
1126 .text
= "Message shown after the program in a pane has exited, if "
1127 "remain-on-exit is enabled."
1130 { .name
= "scroll-on-clear",
1131 .type
= OPTIONS_TABLE_FLAG
,
1132 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
1134 .text
= "Whether the contents of the screen should be scrolled into"
1135 "history when clearing the whole screen."
1138 { .name
= "synchronize-panes",
1139 .type
= OPTIONS_TABLE_FLAG
,
1140 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
1142 .text
= "Whether typing should be sent to all panes simultaneously."
1145 { .name
= "window-active-style",
1146 .type
= OPTIONS_TABLE_STRING
,
1147 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
1148 .default_str
= "default",
1149 .flags
= OPTIONS_TABLE_IS_STYLE
,
1151 .text
= "Default style of the active pane."
1154 { .name
= "window-size",
1155 .type
= OPTIONS_TABLE_CHOICE
,
1156 .scope
= OPTIONS_TABLE_WINDOW
,
1157 .choices
= options_table_window_size_list
,
1158 .default_num
= WINDOW_SIZE_LATEST
,
1159 .text
= "How window size is calculated. "
1160 "'latest' uses the size of the most recently used client, "
1161 "'largest' the largest client, 'smallest' the smallest "
1162 "client and 'manual' a size set by the 'resize-window' "
1166 { .name
= "window-style",
1167 .type
= OPTIONS_TABLE_STRING
,
1168 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
1169 .default_str
= "default",
1170 .flags
= OPTIONS_TABLE_IS_STYLE
,
1172 .text
= "Default style of panes that are not the active pane."
1175 { .name
= "window-status-activity-style",
1176 .type
= OPTIONS_TABLE_STRING
,
1177 .scope
= OPTIONS_TABLE_WINDOW
,
1178 .default_str
= "reverse",
1179 .flags
= OPTIONS_TABLE_IS_STYLE
,
1181 .text
= "Style of windows in the status line with an activity alert."
1184 { .name
= "window-status-bell-style",
1185 .type
= OPTIONS_TABLE_STRING
,
1186 .scope
= OPTIONS_TABLE_WINDOW
,
1187 .default_str
= "reverse",
1188 .flags
= OPTIONS_TABLE_IS_STYLE
,
1190 .text
= "Style of windows in the status line with a bell alert."
1193 { .name
= "window-status-current-format",
1194 .type
= OPTIONS_TABLE_STRING
,
1195 .scope
= OPTIONS_TABLE_WINDOW
,
1196 .default_str
= "#I:#W#{?window_flags,#{window_flags}, }",
1197 .text
= "Format of the current window in the status line."
1200 { .name
= "window-status-current-style",
1201 .type
= OPTIONS_TABLE_STRING
,
1202 .scope
= OPTIONS_TABLE_WINDOW
,
1203 .default_str
= "default",
1204 .flags
= OPTIONS_TABLE_IS_STYLE
,
1206 .text
= "Style of the current window in the status line."
1209 { .name
= "window-status-format",
1210 .type
= OPTIONS_TABLE_STRING
,
1211 .scope
= OPTIONS_TABLE_WINDOW
,
1212 .default_str
= "#I:#W#{?window_flags,#{window_flags}, }",
1213 .text
= "Format of windows in the status line, except the current "
1217 { .name
= "window-status-last-style",
1218 .type
= OPTIONS_TABLE_STRING
,
1219 .scope
= OPTIONS_TABLE_WINDOW
,
1220 .default_str
= "default",
1221 .flags
= OPTIONS_TABLE_IS_STYLE
,
1223 .text
= "Style of the last window in the status line."
1226 { .name
= "window-status-separator",
1227 .type
= OPTIONS_TABLE_STRING
,
1228 .scope
= OPTIONS_TABLE_WINDOW
,
1230 .text
= "Separator between windows in the status line."
1233 { .name
= "window-status-style",
1234 .type
= OPTIONS_TABLE_STRING
,
1235 .scope
= OPTIONS_TABLE_WINDOW
,
1236 .default_str
= "default",
1237 .flags
= OPTIONS_TABLE_IS_STYLE
,
1239 .text
= "Style of windows in the status line, except the current and "
1243 { .name
= "wrap-search",
1244 .type
= OPTIONS_TABLE_FLAG
,
1245 .scope
= OPTIONS_TABLE_WINDOW
,
1247 .text
= "Whether searching in copy mode should wrap at the top or "
1251 { .name
= "xterm-keys", /* no longer used */
1252 .type
= OPTIONS_TABLE_FLAG
,
1253 .scope
= OPTIONS_TABLE_WINDOW
,
1255 .text
= "Whether xterm-style function key sequences should be sent. "
1256 "This option is no longer used."
1260 OPTIONS_TABLE_HOOK("after-bind-key", ""),
1261 OPTIONS_TABLE_HOOK("after-capture-pane", ""),
1262 OPTIONS_TABLE_HOOK("after-copy-mode", ""),
1263 OPTIONS_TABLE_HOOK("after-display-message", ""),
1264 OPTIONS_TABLE_HOOK("after-display-panes", ""),
1265 OPTIONS_TABLE_HOOK("after-kill-pane", ""),
1266 OPTIONS_TABLE_HOOK("after-list-buffers", ""),
1267 OPTIONS_TABLE_HOOK("after-list-clients", ""),
1268 OPTIONS_TABLE_HOOK("after-list-keys", ""),
1269 OPTIONS_TABLE_HOOK("after-list-panes", ""),
1270 OPTIONS_TABLE_HOOK("after-list-sessions", ""),
1271 OPTIONS_TABLE_HOOK("after-list-windows", ""),
1272 OPTIONS_TABLE_HOOK("after-load-buffer", ""),
1273 OPTIONS_TABLE_HOOK("after-lock-server", ""),
1274 OPTIONS_TABLE_HOOK("after-new-session", ""),
1275 OPTIONS_TABLE_HOOK("after-new-window", ""),
1276 OPTIONS_TABLE_HOOK("after-paste-buffer", ""),
1277 OPTIONS_TABLE_HOOK("after-pipe-pane", ""),
1278 OPTIONS_TABLE_HOOK("after-queue", ""),
1279 OPTIONS_TABLE_HOOK("after-refresh-client", ""),
1280 OPTIONS_TABLE_HOOK("after-rename-session", ""),
1281 OPTIONS_TABLE_HOOK("after-rename-window", ""),
1282 OPTIONS_TABLE_HOOK("after-resize-pane", ""),
1283 OPTIONS_TABLE_HOOK("after-resize-window", ""),
1284 OPTIONS_TABLE_HOOK("after-save-buffer", ""),
1285 OPTIONS_TABLE_HOOK("after-select-layout", ""),
1286 OPTIONS_TABLE_HOOK("after-select-pane", ""),
1287 OPTIONS_TABLE_HOOK("after-select-window", ""),
1288 OPTIONS_TABLE_HOOK("after-send-keys", ""),
1289 OPTIONS_TABLE_HOOK("after-set-buffer", ""),
1290 OPTIONS_TABLE_HOOK("after-set-environment", ""),
1291 OPTIONS_TABLE_HOOK("after-set-hook", ""),
1292 OPTIONS_TABLE_HOOK("after-set-option", ""),
1293 OPTIONS_TABLE_HOOK("after-show-environment", ""),
1294 OPTIONS_TABLE_HOOK("after-show-messages", ""),
1295 OPTIONS_TABLE_HOOK("after-show-options", ""),
1296 OPTIONS_TABLE_HOOK("after-split-window", ""),
1297 OPTIONS_TABLE_HOOK("after-unbind-key", ""),
1298 OPTIONS_TABLE_HOOK("alert-activity", ""),
1299 OPTIONS_TABLE_HOOK("alert-bell", ""),
1300 OPTIONS_TABLE_HOOK("alert-silence", ""),
1301 OPTIONS_TABLE_HOOK("client-active", ""),
1302 OPTIONS_TABLE_HOOK("client-attached", ""),
1303 OPTIONS_TABLE_HOOK("client-detached", ""),
1304 OPTIONS_TABLE_HOOK("client-focus-in", ""),
1305 OPTIONS_TABLE_HOOK("client-focus-out", ""),
1306 OPTIONS_TABLE_HOOK("client-resized", ""),
1307 OPTIONS_TABLE_HOOK("client-session-changed", ""),
1308 OPTIONS_TABLE_PANE_HOOK("pane-died", ""),
1309 OPTIONS_TABLE_PANE_HOOK("pane-exited", ""),
1310 OPTIONS_TABLE_PANE_HOOK("pane-focus-in", ""),
1311 OPTIONS_TABLE_PANE_HOOK("pane-focus-out", ""),
1312 OPTIONS_TABLE_PANE_HOOK("pane-mode-changed", ""),
1313 OPTIONS_TABLE_PANE_HOOK("pane-set-clipboard", ""),
1314 OPTIONS_TABLE_PANE_HOOK("pane-title-changed", ""),
1315 OPTIONS_TABLE_HOOK("session-closed", ""),
1316 OPTIONS_TABLE_HOOK("session-created", ""),
1317 OPTIONS_TABLE_HOOK("session-renamed", ""),
1318 OPTIONS_TABLE_HOOK("session-window-changed", ""),
1319 OPTIONS_TABLE_WINDOW_HOOK("window-layout-changed", ""),
1320 OPTIONS_TABLE_HOOK("window-linked", ""),
1321 OPTIONS_TABLE_WINDOW_HOOK("window-pane-changed", ""),
1322 OPTIONS_TABLE_WINDOW_HOOK("window-renamed", ""),
1323 OPTIONS_TABLE_WINDOW_HOOK("window-resized", ""),
1324 OPTIONS_TABLE_HOOK("window-unlinked", ""),