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_status_keys_list
[] = {
48 static const char *options_table_status_justify_list
[] = {
49 "left", "centre", "right", "absolute-centre", NULL
51 static const char *options_table_status_position_list
[] = {
54 static const char *options_table_bell_action_list
[] = {
55 "none", "any", "current", "other", NULL
57 static const char *options_table_visual_bell_list
[] = {
58 "off", "on", "both", NULL
60 static const char *options_table_cursor_style_list
[] = {
61 "default", "blinking-block", "block", "blinking-underline", "underline",
62 "blinking-bar", "bar", NULL
64 static const char *options_table_pane_status_list
[] = {
65 "off", "top", "bottom", NULL
67 static const char *options_table_pane_border_indicators_list
[] = {
68 "off", "colour", "arrows", "both", NULL
70 static const char *options_table_pane_border_lines_list
[] = {
71 "single", "double", "heavy", "simple", "number", NULL
73 static const char *options_table_popup_border_lines_list
[] = {
74 "single", "double", "heavy", "simple", "rounded", "padded", "none", NULL
76 static const char *options_table_set_clipboard_list
[] = {
77 "off", "external", "on", NULL
79 static const char *options_table_window_size_list
[] = {
80 "largest", "smallest", "manual", "latest", NULL
82 static const char *options_table_remain_on_exit_list
[] = {
83 "off", "on", "failed", NULL
85 static const char *options_table_detach_on_destroy_list
[] = {
86 "off", "on", "no-detached", NULL
88 static const char *options_table_extended_keys_list
[] = {
89 "off", "on", "always", NULL
91 static const char *options_table_allow_passthrough_list
[] = {
92 "off", "on", "all", NULL
95 /* Status line format. */
96 #define OPTIONS_TABLE_STATUS_FORMAT1 \
97 "#[align=left range=left #{E:status-left-style}]" \
99 "#{T;=/#{status-left-length}:status-left}" \
101 "#[norange default]" \
102 "#[list=on align=#{status-justify}]" \
103 "#[list=left-marker]<#[list=right-marker]>#[list=on]" \
105 "#[range=window|#{window_index} " \
106 "#{E:window-status-style}" \
107 "#{?#{&&:#{window_last_flag}," \
108 "#{!=:#{E:window-status-last-style},default}}, " \
109 "#{E:window-status-last-style}," \
111 "#{?#{&&:#{window_bell_flag}," \
112 "#{!=:#{E:window-status-bell-style},default}}, " \
113 "#{E:window-status-bell-style}," \
114 "#{?#{&&:#{||:#{window_activity_flag}," \
115 "#{window_silence_flag}}," \
117 "#{E:window-status-activity-style}," \
119 "#{E:window-status-activity-style}," \
124 "#{T:window-status-format}" \
126 "#[norange default]" \
127 "#{?window_end_flag,,#{window-status-separator}}" \
129 "#[range=window|#{window_index} list=focus " \
130 "#{?#{!=:#{E:window-status-current-style},default}," \
131 "#{E:window-status-current-style}," \
132 "#{E:window-status-style}" \
134 "#{?#{&&:#{window_last_flag}," \
135 "#{!=:#{E:window-status-last-style},default}}, " \
136 "#{E:window-status-last-style}," \
138 "#{?#{&&:#{window_bell_flag}," \
139 "#{!=:#{E:window-status-bell-style},default}}, " \
140 "#{E:window-status-bell-style}," \
141 "#{?#{&&:#{||:#{window_activity_flag}," \
142 "#{window_silence_flag}}," \
144 "#{E:window-status-activity-style}," \
146 "#{E:window-status-activity-style}," \
151 "#{T:window-status-current-format}" \
153 "#[norange list=on default]" \
154 "#{?window_end_flag,,#{window-status-separator}}" \
156 "#[nolist align=right range=right #{E:status-right-style}]" \
158 "#{T;=/#{status-right-length}:status-right}" \
161 #define OPTIONS_TABLE_STATUS_FORMAT2 \
162 "#[align=centre]#{P:#{?pane_active,#[reverse],}" \
163 "#{pane_index}[#{pane_width}x#{pane_height}]#[default] }"
164 static const char *options_table_status_format_default
[] = {
165 OPTIONS_TABLE_STATUS_FORMAT1
, OPTIONS_TABLE_STATUS_FORMAT2
, NULL
168 /* Helpers for hook options. */
169 #define OPTIONS_TABLE_HOOK(hook_name, default_value) \
170 { .name = hook_name, \
171 .type = OPTIONS_TABLE_COMMAND, \
172 .scope = OPTIONS_TABLE_SESSION, \
173 .flags = OPTIONS_TABLE_IS_ARRAY|OPTIONS_TABLE_IS_HOOK, \
174 .default_str = default_value, \
178 #define OPTIONS_TABLE_PANE_HOOK(hook_name, default_value) \
179 { .name = hook_name, \
180 .type = OPTIONS_TABLE_COMMAND, \
181 .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE, \
182 .flags = OPTIONS_TABLE_IS_ARRAY|OPTIONS_TABLE_IS_HOOK, \
183 .default_str = default_value, \
187 #define OPTIONS_TABLE_WINDOW_HOOK(hook_name, default_value) \
188 { .name = hook_name, \
189 .type = OPTIONS_TABLE_COMMAND, \
190 .scope = OPTIONS_TABLE_WINDOW, \
191 .flags = OPTIONS_TABLE_IS_ARRAY|OPTIONS_TABLE_IS_HOOK, \
192 .default_str = default_value, \
196 /* Map of name conversions. */
197 const struct options_name_map options_other_names
[] = {
198 { "display-panes-color", "display-panes-colour" },
199 { "display-panes-active-color", "display-panes-active-colour" },
200 { "clock-mode-color", "clock-mode-colour" },
201 { "cursor-color", "cursor-colour" },
202 { "pane-colors", "pane-colours" },
206 /* Top-level options. */
207 const struct options_table_entry options_table
[] = {
208 /* Server options. */
209 { .name
= "backspace",
210 .type
= OPTIONS_TABLE_KEY
,
211 .scope
= OPTIONS_TABLE_SERVER
,
212 .default_num
= '\177',
213 .text
= "The key to send for backspace."
216 { .name
= "buffer-limit",
217 .type
= OPTIONS_TABLE_NUMBER
,
218 .scope
= OPTIONS_TABLE_SERVER
,
222 .text
= "The maximum number of automatic buffers. "
223 "When this is reached, the oldest buffer is deleted."
226 { .name
= "command-alias",
227 .type
= OPTIONS_TABLE_STRING
,
228 .scope
= OPTIONS_TABLE_SERVER
,
229 .flags
= OPTIONS_TABLE_IS_ARRAY
,
230 .default_str
= "split-pane=split-window,"
231 "splitp=split-window,"
232 "server-info=show-messages -JT,"
233 "info=show-messages -JT,"
234 "choose-window=choose-tree -w,"
235 "choose-session=choose-tree -s",
237 .text
= "Array of command aliases. "
238 "Each entry is an alias and a command separated by '='."
241 { .name
= "copy-command",
242 .type
= OPTIONS_TABLE_STRING
,
243 .scope
= OPTIONS_TABLE_SERVER
,
245 .text
= "Shell command run when text is copied. "
246 "If empty, no command is run."
249 { .name
= "cursor-colour",
250 .type
= OPTIONS_TABLE_COLOUR
,
251 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
253 .text
= "Colour of the cursor."
256 { .name
= "cursor-style",
257 .type
= OPTIONS_TABLE_CHOICE
,
258 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
259 .choices
= options_table_cursor_style_list
,
261 .text
= "Style of the cursor."
264 { .name
= "default-terminal",
265 .type
= OPTIONS_TABLE_STRING
,
266 .scope
= OPTIONS_TABLE_SERVER
,
267 .default_str
= TMUX_TERM
,
268 .text
= "Default for the 'TERM' environment variable."
272 .type
= OPTIONS_TABLE_STRING
,
273 .scope
= OPTIONS_TABLE_SERVER
,
274 .default_str
= _PATH_VI
,
275 .text
= "Editor run to edit files."
278 { .name
= "escape-time",
279 .type
= OPTIONS_TABLE_NUMBER
,
280 .scope
= OPTIONS_TABLE_SERVER
,
284 .unit
= "milliseconds",
285 .text
= "Time to wait before assuming a key is Escape."
288 { .name
= "exit-empty",
289 .type
= OPTIONS_TABLE_FLAG
,
290 .scope
= OPTIONS_TABLE_SERVER
,
292 .text
= "Whether the server should exit if there are no sessions."
295 { .name
= "exit-unattached",
296 .type
= OPTIONS_TABLE_FLAG
,
297 .scope
= OPTIONS_TABLE_SERVER
,
299 .text
= "Whether the server should exit if there are no attached "
303 { .name
= "extended-keys",
304 .type
= OPTIONS_TABLE_CHOICE
,
305 .scope
= OPTIONS_TABLE_SERVER
,
306 .choices
= options_table_extended_keys_list
,
308 .text
= "Whether to request extended key sequences from terminals "
312 { .name
= "focus-events",
313 .type
= OPTIONS_TABLE_FLAG
,
314 .scope
= OPTIONS_TABLE_SERVER
,
316 .text
= "Whether to send focus events to applications."
319 { .name
= "history-file",
320 .type
= OPTIONS_TABLE_STRING
,
321 .scope
= OPTIONS_TABLE_SERVER
,
323 .text
= "Location of the command prompt history file. "
324 "Empty does not write a history file."
327 { .name
= "message-limit",
328 .type
= OPTIONS_TABLE_NUMBER
,
329 .scope
= OPTIONS_TABLE_SERVER
,
333 .text
= "Maximum number of server messages to keep."
336 { .name
= "prompt-history-limit",
337 .type
= OPTIONS_TABLE_NUMBER
,
338 .scope
= OPTIONS_TABLE_SERVER
,
342 .text
= "Maximum number of commands to keep in history."
345 { .name
= "set-clipboard",
346 .type
= OPTIONS_TABLE_CHOICE
,
347 .scope
= OPTIONS_TABLE_SERVER
,
348 .choices
= options_table_set_clipboard_list
,
350 .text
= "Whether to attempt to set the system clipboard ('on' or "
351 "'external') and whether to allow applications to create "
352 "paste buffers with an escape sequence ('on' only)."
355 { .name
= "terminal-overrides",
356 .type
= OPTIONS_TABLE_STRING
,
357 .scope
= OPTIONS_TABLE_SERVER
,
358 .flags
= OPTIONS_TABLE_IS_ARRAY
,
361 .text
= "List of terminal capabilities overrides."
364 { .name
= "terminal-features",
365 .type
= OPTIONS_TABLE_STRING
,
366 .scope
= OPTIONS_TABLE_SERVER
,
367 .flags
= OPTIONS_TABLE_IS_ARRAY
,
368 .default_str
= "xterm*:clipboard:ccolour:cstyle:focus:title,"
372 .text
= "List of terminal features, used if they cannot be "
373 "automatically detected."
376 { .name
= "user-keys",
377 .type
= OPTIONS_TABLE_STRING
,
378 .scope
= OPTIONS_TABLE_SERVER
,
379 .flags
= OPTIONS_TABLE_IS_ARRAY
,
382 .text
= "User key assignments. "
383 "Each sequence in the list is translated into a key: "
384 "'User0', 'User1' and so on."
387 /* Session options. */
388 { .name
= "activity-action",
389 .type
= OPTIONS_TABLE_CHOICE
,
390 .scope
= OPTIONS_TABLE_SESSION
,
391 .choices
= options_table_bell_action_list
,
392 .default_num
= ALERT_OTHER
,
393 .text
= "Action to take on an activity alert."
396 { .name
= "assume-paste-time",
397 .type
= OPTIONS_TABLE_NUMBER
,
398 .scope
= OPTIONS_TABLE_SESSION
,
402 .unit
= "milliseconds",
403 .text
= "Maximum time between input to assume it is pasting rather "
407 { .name
= "base-index",
408 .type
= OPTIONS_TABLE_NUMBER
,
409 .scope
= OPTIONS_TABLE_SESSION
,
413 .text
= "Default index of the first window in each session."
416 { .name
= "bell-action",
417 .type
= OPTIONS_TABLE_CHOICE
,
418 .scope
= OPTIONS_TABLE_SESSION
,
419 .choices
= options_table_bell_action_list
,
420 .default_num
= ALERT_ANY
,
421 .text
= "Action to take on a bell alert."
424 { .name
= "default-command",
425 .type
= OPTIONS_TABLE_STRING
,
426 .scope
= OPTIONS_TABLE_SESSION
,
428 .text
= "Default command to run in new panes. If empty, a shell is "
432 { .name
= "default-shell",
433 .type
= OPTIONS_TABLE_STRING
,
434 .scope
= OPTIONS_TABLE_SESSION
,
435 .default_str
= _PATH_BSHELL
,
436 .text
= "Location of default shell."
439 { .name
= "default-size",
440 .type
= OPTIONS_TABLE_STRING
,
441 .scope
= OPTIONS_TABLE_SESSION
,
442 .pattern
= "[0-9]*x[0-9]*",
443 .default_str
= "80x24",
444 .text
= "Initial size of new sessions."
447 { .name
= "destroy-unattached",
448 .type
= OPTIONS_TABLE_FLAG
,
449 .scope
= OPTIONS_TABLE_SESSION
,
451 .text
= "Whether to destroy sessions when they have no attached "
455 { .name
= "detach-on-destroy",
456 .type
= OPTIONS_TABLE_CHOICE
,
457 .scope
= OPTIONS_TABLE_SESSION
,
458 .choices
= options_table_detach_on_destroy_list
,
460 .text
= "Whether to detach when a session is destroyed, or switch "
461 "the client to another session if any exist."
464 { .name
= "display-panes-active-colour",
465 .type
= OPTIONS_TABLE_COLOUR
,
466 .scope
= OPTIONS_TABLE_SESSION
,
468 .text
= "Colour of the active pane for 'display-panes'."
471 { .name
= "display-panes-colour",
472 .type
= OPTIONS_TABLE_COLOUR
,
473 .scope
= OPTIONS_TABLE_SESSION
,
475 .text
= "Colour of not active panes for 'display-panes'."
478 { .name
= "display-panes-time",
479 .type
= OPTIONS_TABLE_NUMBER
,
480 .scope
= OPTIONS_TABLE_SESSION
,
484 .unit
= "milliseconds",
485 .text
= "Time for which 'display-panes' should show pane numbers."
488 { .name
= "display-time",
489 .type
= OPTIONS_TABLE_NUMBER
,
490 .scope
= OPTIONS_TABLE_SESSION
,
494 .unit
= "milliseconds",
495 .text
= "Time for which status line messages should appear."
498 { .name
= "history-limit",
499 .type
= OPTIONS_TABLE_NUMBER
,
500 .scope
= OPTIONS_TABLE_SESSION
,
505 .text
= "Maximum number of lines to keep in the history for each "
507 "If changed, the new value applies only to new panes."
510 { .name
= "key-table",
511 .type
= OPTIONS_TABLE_STRING
,
512 .scope
= OPTIONS_TABLE_SESSION
,
513 .default_str
= "root",
514 .text
= "Default key table. "
515 "Key presses are first looked up in this table."
518 { .name
= "lock-after-time",
519 .type
= OPTIONS_TABLE_NUMBER
,
520 .scope
= OPTIONS_TABLE_SESSION
,
525 .text
= "Time after which a client is locked if not used."
528 { .name
= "lock-command",
529 .type
= OPTIONS_TABLE_STRING
,
530 .scope
= OPTIONS_TABLE_SESSION
,
531 .default_str
= "lock -np",
532 .text
= "Shell command to run to lock a client."
535 { .name
= "message-command-style",
536 .type
= OPTIONS_TABLE_STRING
,
537 .scope
= OPTIONS_TABLE_SESSION
,
538 .default_str
= "bg=black,fg=yellow",
539 .flags
= OPTIONS_TABLE_IS_STYLE
,
541 .text
= "Style of the command prompt when in command mode, if "
542 "'mode-keys' is set to 'vi'."
545 { .name
= "message-style",
546 .type
= OPTIONS_TABLE_STRING
,
547 .scope
= OPTIONS_TABLE_SESSION
,
548 .default_str
= "bg=yellow,fg=black",
549 .flags
= OPTIONS_TABLE_IS_STYLE
,
551 .text
= "Style of the command prompt."
555 .type
= OPTIONS_TABLE_FLAG
,
556 .scope
= OPTIONS_TABLE_SESSION
,
558 .text
= "Whether the mouse is recognised and mouse key bindings are "
560 "Applications inside panes can use the mouse even when 'off'."
564 .type
= OPTIONS_TABLE_KEY
,
565 .scope
= OPTIONS_TABLE_SESSION
,
566 .default_num
= '\002',
567 .text
= "The prefix key."
571 .type
= OPTIONS_TABLE_KEY
,
572 .scope
= OPTIONS_TABLE_SESSION
,
573 .default_num
= KEYC_NONE
,
574 .text
= "A second prefix key."
577 { .name
= "renumber-windows",
578 .type
= OPTIONS_TABLE_FLAG
,
579 .scope
= OPTIONS_TABLE_SESSION
,
581 .text
= "Whether windows are automatically renumbered rather than "
585 { .name
= "repeat-time",
586 .type
= OPTIONS_TABLE_NUMBER
,
587 .scope
= OPTIONS_TABLE_SESSION
,
591 .unit
= "milliseconds",
592 .text
= "Time to wait for a key binding to repeat, if it is bound "
593 "with the '-r' flag."
596 { .name
= "set-titles",
597 .type
= OPTIONS_TABLE_FLAG
,
598 .scope
= OPTIONS_TABLE_SESSION
,
600 .text
= "Whether to set the terminal title, if supported."
603 { .name
= "set-titles-string",
604 .type
= OPTIONS_TABLE_STRING
,
605 .scope
= OPTIONS_TABLE_SESSION
,
606 .default_str
= "#S:#I:#W - \"#T\" #{session_alerts}",
607 .text
= "Format of the terminal title to set."
610 { .name
= "silence-action",
611 .type
= OPTIONS_TABLE_CHOICE
,
612 .scope
= OPTIONS_TABLE_SESSION
,
613 .choices
= options_table_bell_action_list
,
614 .default_num
= ALERT_OTHER
,
615 .text
= "Action to take on a silence alert."
619 .type
= OPTIONS_TABLE_CHOICE
,
620 .scope
= OPTIONS_TABLE_SESSION
,
621 .choices
= options_table_status_list
,
623 .text
= "Number of lines in the status line."
626 { .name
= "status-bg",
627 .type
= OPTIONS_TABLE_COLOUR
,
628 .scope
= OPTIONS_TABLE_SESSION
,
630 .text
= "Background colour of the status line. This option is "
631 "deprecated, use 'status-style' instead."
634 { .name
= "status-fg",
635 .type
= OPTIONS_TABLE_COLOUR
,
636 .scope
= OPTIONS_TABLE_SESSION
,
638 .text
= "Foreground colour of the status line. This option is "
639 "deprecated, use 'status-style' instead."
642 { .name
= "status-format",
643 .type
= OPTIONS_TABLE_STRING
,
644 .scope
= OPTIONS_TABLE_SESSION
,
645 .flags
= OPTIONS_TABLE_IS_ARRAY
,
646 .default_arr
= options_table_status_format_default
,
647 .text
= "Formats for the status lines. "
648 "Each array member is the format for one status line. "
649 "The default status line is made up of several components "
650 "which may be configured individually with other options such "
654 { .name
= "status-interval",
655 .type
= OPTIONS_TABLE_NUMBER
,
656 .scope
= OPTIONS_TABLE_SESSION
,
661 .text
= "Number of seconds between status line updates."
664 { .name
= "status-justify",
665 .type
= OPTIONS_TABLE_CHOICE
,
666 .scope
= OPTIONS_TABLE_SESSION
,
667 .choices
= options_table_status_justify_list
,
669 .text
= "Position of the window list in the status line."
672 { .name
= "status-keys",
673 .type
= OPTIONS_TABLE_CHOICE
,
674 .scope
= OPTIONS_TABLE_SESSION
,
675 .choices
= options_table_status_keys_list
,
676 .default_num
= MODEKEY_EMACS
,
677 .text
= "Key set to use at the command prompt."
680 { .name
= "status-left",
681 .type
= OPTIONS_TABLE_STRING
,
682 .scope
= OPTIONS_TABLE_SESSION
,
683 .default_str
= "[#{session_name}] ",
684 .text
= "Contents of the left side of the status line."
687 { .name
= "status-left-length",
688 .type
= OPTIONS_TABLE_NUMBER
,
689 .scope
= OPTIONS_TABLE_SESSION
,
693 .text
= "Maximum width of the left side of the status line."
696 { .name
= "status-left-style",
697 .type
= OPTIONS_TABLE_STRING
,
698 .scope
= OPTIONS_TABLE_SESSION
,
699 .default_str
= "default",
700 .flags
= OPTIONS_TABLE_IS_STYLE
,
702 .text
= "Style of the left side of the status line."
705 { .name
= "status-position",
706 .type
= OPTIONS_TABLE_CHOICE
,
707 .scope
= OPTIONS_TABLE_SESSION
,
708 .choices
= options_table_status_position_list
,
710 .text
= "Position of the status line."
713 { .name
= "status-right",
714 .type
= OPTIONS_TABLE_STRING
,
715 .scope
= OPTIONS_TABLE_SESSION
,
716 .default_str
= "#{?window_bigger,"
717 "[#{window_offset_x}#,#{window_offset_y}] ,}"
718 "\"#{=21:pane_title}\" %H:%M %d-%b-%y",
719 .text
= "Contents of the right side of the status line."
723 { .name
= "status-right-length",
724 .type
= OPTIONS_TABLE_NUMBER
,
725 .scope
= OPTIONS_TABLE_SESSION
,
729 .text
= "Maximum width of the right side of the status line."
732 { .name
= "status-right-style",
733 .type
= OPTIONS_TABLE_STRING
,
734 .scope
= OPTIONS_TABLE_SESSION
,
735 .default_str
= "default",
736 .flags
= OPTIONS_TABLE_IS_STYLE
,
738 .text
= "Style of the right side of the status line."
741 { .name
= "status-style",
742 .type
= OPTIONS_TABLE_STRING
,
743 .scope
= OPTIONS_TABLE_SESSION
,
744 .default_str
= "bg=green,fg=black",
745 .flags
= OPTIONS_TABLE_IS_STYLE
,
747 .text
= "Style of the status line."
750 { .name
= "update-environment",
751 .type
= OPTIONS_TABLE_STRING
,
752 .scope
= OPTIONS_TABLE_SESSION
,
753 .flags
= OPTIONS_TABLE_IS_ARRAY
,
754 .default_str
= "DISPLAY KRB5CCNAME SSH_ASKPASS SSH_AUTH_SOCK "
755 "SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY",
756 .text
= "List of environment variables to update in the session "
757 "environment when a client is attached."
760 { .name
= "visual-activity",
761 .type
= OPTIONS_TABLE_CHOICE
,
762 .scope
= OPTIONS_TABLE_SESSION
,
763 .choices
= options_table_visual_bell_list
,
764 .default_num
= VISUAL_OFF
,
765 .text
= "How activity alerts should be shown: a message ('on'), "
766 "a message and a bell ('both') or nothing ('off')."
769 { .name
= "visual-bell",
770 .type
= OPTIONS_TABLE_CHOICE
,
771 .scope
= OPTIONS_TABLE_SESSION
,
772 .choices
= options_table_visual_bell_list
,
773 .default_num
= VISUAL_OFF
,
774 .text
= "How bell alerts should be shown: a message ('on'), "
775 "a message and a bell ('both') or nothing ('off')."
778 { .name
= "visual-silence",
779 .type
= OPTIONS_TABLE_CHOICE
,
780 .scope
= OPTIONS_TABLE_SESSION
,
781 .choices
= options_table_visual_bell_list
,
782 .default_num
= VISUAL_OFF
,
783 .text
= "How silence alerts should be shown: a message ('on'), "
784 "a message and a bell ('both') or nothing ('off')."
787 { .name
= "word-separators",
788 .type
= OPTIONS_TABLE_STRING
,
789 .scope
= OPTIONS_TABLE_SESSION
,
791 * The set of non-alphanumeric printable ASCII characters minus the
794 .default_str
= "!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~",
795 .text
= "Characters considered to separate words."
798 /* Window options. */
799 { .name
= "aggressive-resize",
800 .type
= OPTIONS_TABLE_FLAG
,
801 .scope
= OPTIONS_TABLE_WINDOW
,
803 .text
= "When 'window-size' is 'smallest', whether the maximum size "
804 "of a window is the smallest attached session where it is "
805 "the current window ('on') or the smallest session it is "
809 { .name
= "allow-passthrough",
810 .type
= OPTIONS_TABLE_CHOICE
,
811 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
812 .choices
= options_table_allow_passthrough_list
,
814 .text
= "Whether applications are allowed to use the escape sequence "
815 "to bypass tmux. Can be 'off' (disallowed), 'on' (allowed "
816 "if the pane is visible), or 'all' (allowed even if the pane "
820 { .name
= "allow-rename",
821 .type
= OPTIONS_TABLE_FLAG
,
822 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
824 .text
= "Whether applications are allowed to use the escape sequence "
828 { .name
= "alternate-screen",
829 .type
= OPTIONS_TABLE_FLAG
,
830 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
832 .text
= "Whether applications are allowed to use the alternate "
836 { .name
= "automatic-rename",
837 .type
= OPTIONS_TABLE_FLAG
,
838 .scope
= OPTIONS_TABLE_WINDOW
,
840 .text
= "Whether windows are automatically renamed."
843 { .name
= "automatic-rename-format",
844 .type
= OPTIONS_TABLE_STRING
,
845 .scope
= OPTIONS_TABLE_WINDOW
,
846 .default_str
= "#{?pane_in_mode,[tmux],#{pane_current_command}}"
847 "#{?pane_dead,[dead],}",
848 .text
= "Format used to automatically rename windows."
851 { .name
= "clock-mode-colour",
852 .type
= OPTIONS_TABLE_COLOUR
,
853 .scope
= OPTIONS_TABLE_WINDOW
,
855 .text
= "Colour of the clock in clock mode."
858 { .name
= "clock-mode-style",
859 .type
= OPTIONS_TABLE_CHOICE
,
860 .scope
= OPTIONS_TABLE_WINDOW
,
861 .choices
= options_table_clock_mode_style_list
,
863 .text
= "Time format of the clock in clock mode."
866 { .name
= "copy-mode-match-style",
867 .type
= OPTIONS_TABLE_STRING
,
868 .scope
= OPTIONS_TABLE_WINDOW
,
869 .default_str
= "bg=cyan,fg=black",
870 .flags
= OPTIONS_TABLE_IS_STYLE
,
872 .text
= "Style of search matches in copy mode."
875 { .name
= "copy-mode-current-match-style",
876 .type
= OPTIONS_TABLE_STRING
,
877 .scope
= OPTIONS_TABLE_WINDOW
,
878 .default_str
= "bg=magenta,fg=black",
879 .flags
= OPTIONS_TABLE_IS_STYLE
,
881 .text
= "Style of the current search match in copy mode."
884 { .name
= "copy-mode-mark-style",
885 .type
= OPTIONS_TABLE_STRING
,
886 .scope
= OPTIONS_TABLE_WINDOW
,
887 .default_str
= "bg=red,fg=black",
888 .flags
= OPTIONS_TABLE_IS_STYLE
,
890 .text
= "Style of the marked line in copy mode."
893 { .name
= "fill-character",
894 .type
= OPTIONS_TABLE_STRING
,
895 .scope
= OPTIONS_TABLE_WINDOW
,
897 .text
= "Character used to fill unused parts of window."
900 { .name
= "main-pane-height",
901 .type
= OPTIONS_TABLE_STRING
,
902 .scope
= OPTIONS_TABLE_WINDOW
,
904 .text
= "Height of the main pane in the 'main-horizontal' layout. "
905 "This may be a percentage, for example '10%'."
908 { .name
= "main-pane-width",
909 .type
= OPTIONS_TABLE_STRING
,
910 .scope
= OPTIONS_TABLE_WINDOW
,
912 .text
= "Width of the main pane in the 'main-vertical' layout. "
913 "This may be a percentage, for example '10%'."
916 { .name
= "mode-keys",
917 .type
= OPTIONS_TABLE_CHOICE
,
918 .scope
= OPTIONS_TABLE_WINDOW
,
919 .choices
= options_table_mode_keys_list
,
920 .default_num
= MODEKEY_EMACS
,
921 .text
= "Key set used in copy mode."
924 { .name
= "mode-style",
925 .type
= OPTIONS_TABLE_STRING
,
926 .scope
= OPTIONS_TABLE_WINDOW
,
927 .default_str
= "bg=yellow,fg=black",
928 .flags
= OPTIONS_TABLE_IS_STYLE
,
930 .text
= "Style of indicators and highlighting in modes."
933 { .name
= "monitor-activity",
934 .type
= OPTIONS_TABLE_FLAG
,
935 .scope
= OPTIONS_TABLE_WINDOW
,
937 .text
= "Whether an alert is triggered by activity."
940 { .name
= "monitor-bell",
941 .type
= OPTIONS_TABLE_FLAG
,
942 .scope
= OPTIONS_TABLE_WINDOW
,
944 .text
= "Whether an alert is triggered by a bell."
947 { .name
= "monitor-silence",
948 .type
= OPTIONS_TABLE_NUMBER
,
949 .scope
= OPTIONS_TABLE_WINDOW
,
953 .text
= "Time after which an alert is triggered by silence. "
954 "Zero means no alert."
958 { .name
= "other-pane-height",
959 .type
= OPTIONS_TABLE_STRING
,
960 .scope
= OPTIONS_TABLE_WINDOW
,
962 .text
= "Height of the other panes in the 'main-horizontal' layout. "
963 "This may be a percentage, for example '10%'."
966 { .name
= "other-pane-width",
967 .type
= OPTIONS_TABLE_STRING
,
968 .scope
= OPTIONS_TABLE_WINDOW
,
970 .text
= "Height of the other panes in the 'main-vertical' layout. "
971 "This may be a percentage, for example '10%'."
974 { .name
= "pane-active-border-style",
975 .type
= OPTIONS_TABLE_STRING
,
976 .scope
= OPTIONS_TABLE_WINDOW
,
977 .default_str
= "#{?pane_in_mode,fg=yellow,#{?synchronize-panes,fg=red,fg=green}}",
978 .flags
= OPTIONS_TABLE_IS_STYLE
,
980 .text
= "Style of the active pane border."
983 { .name
= "pane-base-index",
984 .type
= OPTIONS_TABLE_NUMBER
,
985 .scope
= OPTIONS_TABLE_WINDOW
,
987 .maximum
= USHRT_MAX
,
989 .text
= "Index of the first pane in each window."
992 { .name
= "pane-border-format",
993 .type
= OPTIONS_TABLE_STRING
,
994 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
995 .default_str
= "#{?pane_active,#[reverse],}#{pane_index}#[default] "
997 .text
= "Format of text in the pane status lines."
1000 { .name
= "pane-border-indicators",
1001 .type
= OPTIONS_TABLE_CHOICE
,
1002 .scope
= OPTIONS_TABLE_WINDOW
,
1003 .choices
= options_table_pane_border_indicators_list
,
1004 .default_num
= PANE_BORDER_COLOUR
,
1005 .text
= "Whether to indicate the active pane by colouring border or "
1006 "displaying arrow markers."
1009 { .name
= "pane-border-lines",
1010 .type
= OPTIONS_TABLE_CHOICE
,
1011 .scope
= OPTIONS_TABLE_WINDOW
,
1012 .choices
= options_table_pane_border_lines_list
,
1013 .default_num
= PANE_LINES_SINGLE
,
1014 .text
= "Type of characters used to draw pane border lines. Some of "
1015 "these are only supported on terminals with UTF-8 support."
1018 { .name
= "pane-border-status",
1019 .type
= OPTIONS_TABLE_CHOICE
,
1020 .scope
= OPTIONS_TABLE_WINDOW
,
1021 .choices
= options_table_pane_status_list
,
1022 .default_num
= PANE_STATUS_OFF
,
1023 .text
= "Position of the pane status lines."
1026 { .name
= "pane-border-style",
1027 .type
= OPTIONS_TABLE_STRING
,
1028 .scope
= OPTIONS_TABLE_WINDOW
,
1029 .default_str
= "default",
1030 .flags
= OPTIONS_TABLE_IS_STYLE
,
1032 .text
= "Style of the pane status lines."
1035 { .name
= "pane-colours",
1036 .type
= OPTIONS_TABLE_COLOUR
,
1037 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
1039 .flags
= OPTIONS_TABLE_IS_ARRAY
,
1040 .text
= "The default colour palette for colours zero to 255."
1043 { .name
= "popup-style",
1044 .type
= OPTIONS_TABLE_STRING
,
1045 .scope
= OPTIONS_TABLE_WINDOW
,
1046 .default_str
= "default",
1047 .flags
= OPTIONS_TABLE_IS_STYLE
,
1049 .text
= "Default style of popups."
1052 { .name
= "popup-border-style",
1053 .type
= OPTIONS_TABLE_STRING
,
1054 .scope
= OPTIONS_TABLE_WINDOW
,
1055 .default_str
= "default",
1056 .flags
= OPTIONS_TABLE_IS_STYLE
,
1058 .text
= "Default style of popup borders."
1061 { .name
= "popup-border-lines",
1062 .type
= OPTIONS_TABLE_CHOICE
,
1063 .scope
= OPTIONS_TABLE_WINDOW
,
1064 .choices
= options_table_popup_border_lines_list
,
1065 .default_num
= BOX_LINES_SINGLE
,
1066 .text
= "Type of characters used to draw popup border lines. Some of "
1067 "these are only supported on terminals with UTF-8 support."
1070 { .name
= "remain-on-exit",
1071 .type
= OPTIONS_TABLE_CHOICE
,
1072 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
1073 .choices
= options_table_remain_on_exit_list
,
1075 .text
= "Whether panes should remain ('on') or be automatically "
1076 "killed ('off' or 'failed') when the program inside exits."
1079 { .name
= "remain-on-exit-format",
1080 .type
= OPTIONS_TABLE_STRING
,
1081 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
1082 .default_str
= "Pane is dead ("
1083 "#{?#{!=:#{pane_dead_status},},"
1084 "status #{pane_dead_status},}"
1085 "#{?#{!=:#{pane_dead_signal},},"
1086 "signal #{pane_dead_signal},}, "
1087 "#{t:pane_dead_time})",
1088 .text
= "Message shown after the program in a pane has exited, if "
1089 "remain-on-exit is enabled."
1092 { .name
= "scroll-on-clear",
1093 .type
= OPTIONS_TABLE_FLAG
,
1094 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
1096 .text
= "Whether the contents of the screen should be scrolled into"
1097 "history when clearing the whole screen."
1100 { .name
= "synchronize-panes",
1101 .type
= OPTIONS_TABLE_FLAG
,
1102 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
1104 .text
= "Whether typing should be sent to all panes simultaneously."
1107 { .name
= "window-active-style",
1108 .type
= OPTIONS_TABLE_STRING
,
1109 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
1110 .default_str
= "default",
1111 .flags
= OPTIONS_TABLE_IS_STYLE
,
1113 .text
= "Default style of the active pane."
1116 { .name
= "window-size",
1117 .type
= OPTIONS_TABLE_CHOICE
,
1118 .scope
= OPTIONS_TABLE_WINDOW
,
1119 .choices
= options_table_window_size_list
,
1120 .default_num
= WINDOW_SIZE_LATEST
,
1121 .text
= "How window size is calculated. "
1122 "'latest' uses the size of the most recently used client, "
1123 "'largest' the largest client, 'smallest' the smallest "
1124 "client and 'manual' a size set by the 'resize-window' "
1128 { .name
= "window-style",
1129 .type
= OPTIONS_TABLE_STRING
,
1130 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
1131 .default_str
= "default",
1132 .flags
= OPTIONS_TABLE_IS_STYLE
,
1134 .text
= "Default style of panes that are not the active pane."
1137 { .name
= "window-status-activity-style",
1138 .type
= OPTIONS_TABLE_STRING
,
1139 .scope
= OPTIONS_TABLE_WINDOW
,
1140 .default_str
= "reverse",
1141 .flags
= OPTIONS_TABLE_IS_STYLE
,
1143 .text
= "Style of windows in the status line with an activity alert."
1146 { .name
= "window-status-bell-style",
1147 .type
= OPTIONS_TABLE_STRING
,
1148 .scope
= OPTIONS_TABLE_WINDOW
,
1149 .default_str
= "reverse",
1150 .flags
= OPTIONS_TABLE_IS_STYLE
,
1152 .text
= "Style of windows in the status line with a bell alert."
1155 { .name
= "window-status-current-format",
1156 .type
= OPTIONS_TABLE_STRING
,
1157 .scope
= OPTIONS_TABLE_WINDOW
,
1158 .default_str
= "#I:#W#{?window_flags,#{window_flags}, }",
1159 .text
= "Format of the current window in the status line."
1162 { .name
= "window-status-current-style",
1163 .type
= OPTIONS_TABLE_STRING
,
1164 .scope
= OPTIONS_TABLE_WINDOW
,
1165 .default_str
= "default",
1166 .flags
= OPTIONS_TABLE_IS_STYLE
,
1168 .text
= "Style of the current window in the status line."
1171 { .name
= "window-status-format",
1172 .type
= OPTIONS_TABLE_STRING
,
1173 .scope
= OPTIONS_TABLE_WINDOW
,
1174 .default_str
= "#I:#W#{?window_flags,#{window_flags}, }",
1175 .text
= "Format of windows in the status line, except the current "
1179 { .name
= "window-status-last-style",
1180 .type
= OPTIONS_TABLE_STRING
,
1181 .scope
= OPTIONS_TABLE_WINDOW
,
1182 .default_str
= "default",
1183 .flags
= OPTIONS_TABLE_IS_STYLE
,
1185 .text
= "Style of the last window in the status line."
1188 { .name
= "window-status-separator",
1189 .type
= OPTIONS_TABLE_STRING
,
1190 .scope
= OPTIONS_TABLE_WINDOW
,
1192 .text
= "Separator between windows in the status line."
1195 { .name
= "window-status-style",
1196 .type
= OPTIONS_TABLE_STRING
,
1197 .scope
= OPTIONS_TABLE_WINDOW
,
1198 .default_str
= "default",
1199 .flags
= OPTIONS_TABLE_IS_STYLE
,
1201 .text
= "Style of windows in the status line, except the current and "
1205 { .name
= "wrap-search",
1206 .type
= OPTIONS_TABLE_FLAG
,
1207 .scope
= OPTIONS_TABLE_WINDOW
,
1209 .text
= "Whether searching in copy mode should wrap at the top or "
1213 { .name
= "xterm-keys", /* no longer used */
1214 .type
= OPTIONS_TABLE_FLAG
,
1215 .scope
= OPTIONS_TABLE_WINDOW
,
1217 .text
= "Whether xterm-style function key sequences should be sent. "
1218 "This option is no longer used."
1222 OPTIONS_TABLE_HOOK("after-bind-key", ""),
1223 OPTIONS_TABLE_HOOK("after-capture-pane", ""),
1224 OPTIONS_TABLE_HOOK("after-copy-mode", ""),
1225 OPTIONS_TABLE_HOOK("after-display-message", ""),
1226 OPTIONS_TABLE_HOOK("after-display-panes", ""),
1227 OPTIONS_TABLE_HOOK("after-kill-pane", ""),
1228 OPTIONS_TABLE_HOOK("after-list-buffers", ""),
1229 OPTIONS_TABLE_HOOK("after-list-clients", ""),
1230 OPTIONS_TABLE_HOOK("after-list-keys", ""),
1231 OPTIONS_TABLE_HOOK("after-list-panes", ""),
1232 OPTIONS_TABLE_HOOK("after-list-sessions", ""),
1233 OPTIONS_TABLE_HOOK("after-list-windows", ""),
1234 OPTIONS_TABLE_HOOK("after-load-buffer", ""),
1235 OPTIONS_TABLE_HOOK("after-lock-server", ""),
1236 OPTIONS_TABLE_HOOK("after-new-session", ""),
1237 OPTIONS_TABLE_HOOK("after-new-window", ""),
1238 OPTIONS_TABLE_HOOK("after-paste-buffer", ""),
1239 OPTIONS_TABLE_HOOK("after-pipe-pane", ""),
1240 OPTIONS_TABLE_HOOK("after-queue", ""),
1241 OPTIONS_TABLE_HOOK("after-refresh-client", ""),
1242 OPTIONS_TABLE_HOOK("after-rename-session", ""),
1243 OPTIONS_TABLE_HOOK("after-rename-window", ""),
1244 OPTIONS_TABLE_HOOK("after-resize-pane", ""),
1245 OPTIONS_TABLE_HOOK("after-resize-window", ""),
1246 OPTIONS_TABLE_HOOK("after-save-buffer", ""),
1247 OPTIONS_TABLE_HOOK("after-select-layout", ""),
1248 OPTIONS_TABLE_HOOK("after-select-pane", ""),
1249 OPTIONS_TABLE_HOOK("after-select-window", ""),
1250 OPTIONS_TABLE_HOOK("after-send-keys", ""),
1251 OPTIONS_TABLE_HOOK("after-set-buffer", ""),
1252 OPTIONS_TABLE_HOOK("after-set-environment", ""),
1253 OPTIONS_TABLE_HOOK("after-set-hook", ""),
1254 OPTIONS_TABLE_HOOK("after-set-option", ""),
1255 OPTIONS_TABLE_HOOK("after-show-environment", ""),
1256 OPTIONS_TABLE_HOOK("after-show-messages", ""),
1257 OPTIONS_TABLE_HOOK("after-show-options", ""),
1258 OPTIONS_TABLE_HOOK("after-split-window", ""),
1259 OPTIONS_TABLE_HOOK("after-unbind-key", ""),
1260 OPTIONS_TABLE_HOOK("alert-activity", ""),
1261 OPTIONS_TABLE_HOOK("alert-bell", ""),
1262 OPTIONS_TABLE_HOOK("alert-silence", ""),
1263 OPTIONS_TABLE_HOOK("client-active", ""),
1264 OPTIONS_TABLE_HOOK("client-attached", ""),
1265 OPTIONS_TABLE_HOOK("client-detached", ""),
1266 OPTIONS_TABLE_HOOK("client-focus-in", ""),
1267 OPTIONS_TABLE_HOOK("client-focus-out", ""),
1268 OPTIONS_TABLE_HOOK("client-resized", ""),
1269 OPTIONS_TABLE_HOOK("client-session-changed", ""),
1270 OPTIONS_TABLE_PANE_HOOK("pane-died", ""),
1271 OPTIONS_TABLE_PANE_HOOK("pane-exited", ""),
1272 OPTIONS_TABLE_PANE_HOOK("pane-focus-in", ""),
1273 OPTIONS_TABLE_PANE_HOOK("pane-focus-out", ""),
1274 OPTIONS_TABLE_PANE_HOOK("pane-mode-changed", ""),
1275 OPTIONS_TABLE_PANE_HOOK("pane-set-clipboard", ""),
1276 OPTIONS_TABLE_PANE_HOOK("pane-title-changed", ""),
1277 OPTIONS_TABLE_HOOK("session-closed", ""),
1278 OPTIONS_TABLE_HOOK("session-created", ""),
1279 OPTIONS_TABLE_HOOK("session-renamed", ""),
1280 OPTIONS_TABLE_HOOK("session-window-changed", ""),
1281 OPTIONS_TABLE_WINDOW_HOOK("window-layout-changed", ""),
1282 OPTIONS_TABLE_HOOK("window-linked", ""),
1283 OPTIONS_TABLE_WINDOW_HOOK("window-pane-changed", ""),
1284 OPTIONS_TABLE_WINDOW_HOOK("window-renamed", ""),
1285 OPTIONS_TABLE_WINDOW_HOOK("window-resized", ""),
1286 OPTIONS_TABLE_HOOK("window-unlinked", ""),