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
92 /* Status line format. */
93 #define OPTIONS_TABLE_STATUS_FORMAT1 \
94 "#[align=left range=left #{E:status-left-style}]" \
96 "#{T;=/#{status-left-length}:status-left}" \
98 "#[norange default]" \
99 "#[list=on align=#{status-justify}]" \
100 "#[list=left-marker]<#[list=right-marker]>#[list=on]" \
102 "#[range=window|#{window_index} " \
103 "#{E:window-status-style}" \
104 "#{?#{&&:#{window_last_flag}," \
105 "#{!=:#{E:window-status-last-style},default}}, " \
106 "#{E:window-status-last-style}," \
108 "#{?#{&&:#{window_bell_flag}," \
109 "#{!=:#{E:window-status-bell-style},default}}, " \
110 "#{E:window-status-bell-style}," \
111 "#{?#{&&:#{||:#{window_activity_flag}," \
112 "#{window_silence_flag}}," \
114 "#{E:window-status-activity-style}," \
116 "#{E:window-status-activity-style}," \
121 "#{T:window-status-format}" \
123 "#[norange default]" \
124 "#{?window_end_flag,,#{window-status-separator}}" \
126 "#[range=window|#{window_index} list=focus " \
127 "#{?#{!=:#{E:window-status-current-style},default}," \
128 "#{E:window-status-current-style}," \
129 "#{E:window-status-style}" \
131 "#{?#{&&:#{window_last_flag}," \
132 "#{!=:#{E:window-status-last-style},default}}, " \
133 "#{E:window-status-last-style}," \
135 "#{?#{&&:#{window_bell_flag}," \
136 "#{!=:#{E:window-status-bell-style},default}}, " \
137 "#{E:window-status-bell-style}," \
138 "#{?#{&&:#{||:#{window_activity_flag}," \
139 "#{window_silence_flag}}," \
141 "#{E:window-status-activity-style}," \
143 "#{E:window-status-activity-style}," \
148 "#{T:window-status-current-format}" \
150 "#[norange list=on default]" \
151 "#{?window_end_flag,,#{window-status-separator}}" \
153 "#[nolist align=right range=right #{E:status-right-style}]" \
155 "#{T;=/#{status-right-length}:status-right}" \
158 #define OPTIONS_TABLE_STATUS_FORMAT2 \
159 "#[align=centre]#{P:#{?pane_active,#[reverse],}" \
160 "#{pane_index}[#{pane_width}x#{pane_height}]#[default] }"
161 static const char *options_table_status_format_default
[] = {
162 OPTIONS_TABLE_STATUS_FORMAT1
, OPTIONS_TABLE_STATUS_FORMAT2
, NULL
165 /* Helpers for hook options. */
166 #define OPTIONS_TABLE_HOOK(hook_name, default_value) \
167 { .name = hook_name, \
168 .type = OPTIONS_TABLE_COMMAND, \
169 .scope = OPTIONS_TABLE_SESSION, \
170 .flags = OPTIONS_TABLE_IS_ARRAY|OPTIONS_TABLE_IS_HOOK, \
171 .default_str = default_value, \
175 #define OPTIONS_TABLE_PANE_HOOK(hook_name, default_value) \
176 { .name = hook_name, \
177 .type = OPTIONS_TABLE_COMMAND, \
178 .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE, \
179 .flags = OPTIONS_TABLE_IS_ARRAY|OPTIONS_TABLE_IS_HOOK, \
180 .default_str = default_value, \
184 #define OPTIONS_TABLE_WINDOW_HOOK(hook_name, default_value) \
185 { .name = hook_name, \
186 .type = OPTIONS_TABLE_COMMAND, \
187 .scope = OPTIONS_TABLE_WINDOW, \
188 .flags = OPTIONS_TABLE_IS_ARRAY|OPTIONS_TABLE_IS_HOOK, \
189 .default_str = default_value, \
193 /* Map of name conversions. */
194 const struct options_name_map options_other_names
[] = {
195 { "display-panes-color", "display-panes-colour" },
196 { "display-panes-active-color", "display-panes-active-colour" },
197 { "clock-mode-color", "clock-mode-colour" },
198 { "cursor-color", "cursor-colour" },
199 { "pane-colors", "pane-colours" },
203 /* Top-level options. */
204 const struct options_table_entry options_table
[] = {
205 /* Server options. */
206 { .name
= "backspace",
207 .type
= OPTIONS_TABLE_KEY
,
208 .scope
= OPTIONS_TABLE_SERVER
,
209 .default_num
= '\177',
210 .text
= "The key to send for backspace."
213 { .name
= "buffer-limit",
214 .type
= OPTIONS_TABLE_NUMBER
,
215 .scope
= OPTIONS_TABLE_SERVER
,
219 .text
= "The maximum number of automatic buffers. "
220 "When this is reached, the oldest buffer is deleted."
223 { .name
= "command-alias",
224 .type
= OPTIONS_TABLE_STRING
,
225 .scope
= OPTIONS_TABLE_SERVER
,
226 .flags
= OPTIONS_TABLE_IS_ARRAY
,
227 .default_str
= "split-pane=split-window,"
228 "splitp=split-window,"
229 "server-info=show-messages -JT,"
230 "info=show-messages -JT,"
231 "choose-window=choose-tree -w,"
232 "choose-session=choose-tree -s",
234 .text
= "Array of command aliases. "
235 "Each entry is an alias and a command separated by '='."
238 { .name
= "copy-command",
239 .type
= OPTIONS_TABLE_STRING
,
240 .scope
= OPTIONS_TABLE_SERVER
,
242 .text
= "Shell command run when text is copied. "
243 "If empty, no command is run."
246 { .name
= "cursor-colour",
247 .type
= OPTIONS_TABLE_COLOUR
,
248 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
250 .text
= "Colour of the cursor."
253 { .name
= "cursor-style",
254 .type
= OPTIONS_TABLE_CHOICE
,
255 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
256 .choices
= options_table_cursor_style_list
,
258 .text
= "Style of the cursor."
261 { .name
= "default-terminal",
262 .type
= OPTIONS_TABLE_STRING
,
263 .scope
= OPTIONS_TABLE_SERVER
,
264 .default_str
= TMUX_TERM
,
265 .text
= "Default for the 'TERM' environment variable."
269 .type
= OPTIONS_TABLE_STRING
,
270 .scope
= OPTIONS_TABLE_SERVER
,
271 .default_str
= _PATH_VI
,
272 .text
= "Editor run to edit files."
275 { .name
= "escape-time",
276 .type
= OPTIONS_TABLE_NUMBER
,
277 .scope
= OPTIONS_TABLE_SERVER
,
281 .text
= "Time to wait before assuming a key is Escape."
284 { .name
= "exit-empty",
285 .type
= OPTIONS_TABLE_FLAG
,
286 .scope
= OPTIONS_TABLE_SERVER
,
288 .text
= "Whether the server should exit if there are no sessions."
291 { .name
= "exit-unattached",
292 .type
= OPTIONS_TABLE_FLAG
,
293 .scope
= OPTIONS_TABLE_SERVER
,
295 .text
= "Whether the server should exit if there are no attached "
299 { .name
= "extended-keys",
300 .type
= OPTIONS_TABLE_CHOICE
,
301 .scope
= OPTIONS_TABLE_SERVER
,
302 .choices
= options_table_extended_keys_list
,
304 .text
= "Whether to request extended key sequences from terminals "
308 { .name
= "focus-events",
309 .type
= OPTIONS_TABLE_FLAG
,
310 .scope
= OPTIONS_TABLE_SERVER
,
312 .text
= "Whether to send focus events to applications."
315 { .name
= "history-file",
316 .type
= OPTIONS_TABLE_STRING
,
317 .scope
= OPTIONS_TABLE_SERVER
,
319 .text
= "Location of the command prompt history file. "
320 "Empty does not write a history file."
323 { .name
= "message-limit",
324 .type
= OPTIONS_TABLE_NUMBER
,
325 .scope
= OPTIONS_TABLE_SERVER
,
329 .text
= "Maximum number of server messages to keep."
332 { .name
= "prompt-history-limit",
333 .type
= OPTIONS_TABLE_NUMBER
,
334 .scope
= OPTIONS_TABLE_SERVER
,
338 .text
= "Maximum number of commands to keep in history."
341 { .name
= "set-clipboard",
342 .type
= OPTIONS_TABLE_CHOICE
,
343 .scope
= OPTIONS_TABLE_SERVER
,
344 .choices
= options_table_set_clipboard_list
,
346 .text
= "Whether to attempt to set the system clipboard ('on' or "
347 "'external') and whether to allow applications to create "
348 "paste buffers with an escape sequence ('on' only)."
351 { .name
= "terminal-overrides",
352 .type
= OPTIONS_TABLE_STRING
,
353 .scope
= OPTIONS_TABLE_SERVER
,
354 .flags
= OPTIONS_TABLE_IS_ARRAY
,
357 .text
= "List of terminal capabilities overrides."
360 { .name
= "terminal-features",
361 .type
= OPTIONS_TABLE_STRING
,
362 .scope
= OPTIONS_TABLE_SERVER
,
363 .flags
= OPTIONS_TABLE_IS_ARRAY
,
364 .default_str
= "xterm*:clipboard:ccolour:cstyle:focus:title,"
367 .text
= "List of terminal features, used if they cannot be "
368 "automatically detected."
371 { .name
= "user-keys",
372 .type
= OPTIONS_TABLE_STRING
,
373 .scope
= OPTIONS_TABLE_SERVER
,
374 .flags
= OPTIONS_TABLE_IS_ARRAY
,
377 .text
= "User key assignments. "
378 "Each sequence in the list is translated into a key: "
379 "'User0', 'User1' and so on."
382 /* Session options. */
383 { .name
= "activity-action",
384 .type
= OPTIONS_TABLE_CHOICE
,
385 .scope
= OPTIONS_TABLE_SESSION
,
386 .choices
= options_table_bell_action_list
,
387 .default_num
= ALERT_OTHER
,
388 .text
= "Action to take on an activity alert."
391 { .name
= "assume-paste-time",
392 .type
= OPTIONS_TABLE_NUMBER
,
393 .scope
= OPTIONS_TABLE_SESSION
,
397 .unit
= "milliseconds",
398 .text
= "Maximum time between input to assume it is pasting rather "
402 { .name
= "base-index",
403 .type
= OPTIONS_TABLE_NUMBER
,
404 .scope
= OPTIONS_TABLE_SESSION
,
408 .text
= "Default index of the first window in each session."
411 { .name
= "bell-action",
412 .type
= OPTIONS_TABLE_CHOICE
,
413 .scope
= OPTIONS_TABLE_SESSION
,
414 .choices
= options_table_bell_action_list
,
415 .default_num
= ALERT_ANY
,
416 .text
= "Action to take on a bell alert."
419 { .name
= "default-command",
420 .type
= OPTIONS_TABLE_STRING
,
421 .scope
= OPTIONS_TABLE_SESSION
,
423 .text
= "Default command to run in new panes. If empty, a shell is "
427 { .name
= "default-shell",
428 .type
= OPTIONS_TABLE_STRING
,
429 .scope
= OPTIONS_TABLE_SESSION
,
430 .default_str
= _PATH_BSHELL
,
431 .text
= "Location of default shell."
434 { .name
= "default-size",
435 .type
= OPTIONS_TABLE_STRING
,
436 .scope
= OPTIONS_TABLE_SESSION
,
437 .pattern
= "[0-9]*x[0-9]*",
438 .default_str
= "80x24",
439 .text
= "Initial size of new sessions."
442 { .name
= "destroy-unattached",
443 .type
= OPTIONS_TABLE_FLAG
,
444 .scope
= OPTIONS_TABLE_SESSION
,
446 .text
= "Whether to destroy sessions when they have no attached "
450 { .name
= "detach-on-destroy",
451 .type
= OPTIONS_TABLE_CHOICE
,
452 .scope
= OPTIONS_TABLE_SESSION
,
453 .choices
= options_table_detach_on_destroy_list
,
455 .text
= "Whether to detach when a session is destroyed, or switch "
456 "the client to another session if any exist."
459 { .name
= "display-panes-active-colour",
460 .type
= OPTIONS_TABLE_COLOUR
,
461 .scope
= OPTIONS_TABLE_SESSION
,
463 .text
= "Colour of the active pane for 'display-panes'."
466 { .name
= "display-panes-colour",
467 .type
= OPTIONS_TABLE_COLOUR
,
468 .scope
= OPTIONS_TABLE_SESSION
,
470 .text
= "Colour of not active panes for 'display-panes'."
473 { .name
= "display-panes-time",
474 .type
= OPTIONS_TABLE_NUMBER
,
475 .scope
= OPTIONS_TABLE_SESSION
,
479 .unit
= "milliseconds",
480 .text
= "Time for which 'display-panes' should show pane numbers."
483 { .name
= "display-time",
484 .type
= OPTIONS_TABLE_NUMBER
,
485 .scope
= OPTIONS_TABLE_SESSION
,
489 .unit
= "milliseconds",
490 .text
= "Time for which status line messages should appear."
493 { .name
= "history-limit",
494 .type
= OPTIONS_TABLE_NUMBER
,
495 .scope
= OPTIONS_TABLE_SESSION
,
500 .text
= "Maximum number of lines to keep in the history for each "
502 "If changed, the new value applies only to new panes."
505 { .name
= "key-table",
506 .type
= OPTIONS_TABLE_STRING
,
507 .scope
= OPTIONS_TABLE_SESSION
,
508 .default_str
= "root",
509 .text
= "Default key table. "
510 "Key presses are first looked up in this table."
513 { .name
= "lock-after-time",
514 .type
= OPTIONS_TABLE_NUMBER
,
515 .scope
= OPTIONS_TABLE_SESSION
,
520 .text
= "Time after which a client is locked if not used."
523 { .name
= "lock-command",
524 .type
= OPTIONS_TABLE_STRING
,
525 .scope
= OPTIONS_TABLE_SESSION
,
526 .default_str
= "lock -np",
527 .text
= "Shell command to run to lock a client."
530 { .name
= "message-command-style",
531 .type
= OPTIONS_TABLE_STRING
,
532 .scope
= OPTIONS_TABLE_SESSION
,
533 .default_str
= "bg=black,fg=yellow",
534 .flags
= OPTIONS_TABLE_IS_STYLE
,
536 .text
= "Style of the command prompt when in command mode, if "
537 "'mode-keys' is set to 'vi'."
540 { .name
= "message-style",
541 .type
= OPTIONS_TABLE_STRING
,
542 .scope
= OPTIONS_TABLE_SESSION
,
543 .default_str
= "bg=yellow,fg=black",
544 .flags
= OPTIONS_TABLE_IS_STYLE
,
546 .text
= "Style of the command prompt."
550 .type
= OPTIONS_TABLE_FLAG
,
551 .scope
= OPTIONS_TABLE_SESSION
,
553 .text
= "Whether the mouse is recognised and mouse key bindings are "
555 "Applications inside panes can use the mouse even when 'off'."
559 .type
= OPTIONS_TABLE_KEY
,
560 .scope
= OPTIONS_TABLE_SESSION
,
561 .default_num
= '\002',
562 .text
= "The prefix key."
566 .type
= OPTIONS_TABLE_KEY
,
567 .scope
= OPTIONS_TABLE_SESSION
,
568 .default_num
= KEYC_NONE
,
569 .text
= "A second prefix key."
572 { .name
= "renumber-windows",
573 .type
= OPTIONS_TABLE_FLAG
,
574 .scope
= OPTIONS_TABLE_SESSION
,
576 .text
= "Whether windows are automatically renumbered rather than "
580 { .name
= "repeat-time",
581 .type
= OPTIONS_TABLE_NUMBER
,
582 .scope
= OPTIONS_TABLE_SESSION
,
586 .unit
= "milliseconds",
587 .text
= "Time to wait for a key binding to repeat, if it is bound "
588 "with the '-r' flag."
591 { .name
= "set-titles",
592 .type
= OPTIONS_TABLE_FLAG
,
593 .scope
= OPTIONS_TABLE_SESSION
,
595 .text
= "Whether to set the terminal title, if supported."
598 { .name
= "set-titles-string",
599 .type
= OPTIONS_TABLE_STRING
,
600 .scope
= OPTIONS_TABLE_SESSION
,
601 .default_str
= "#S:#I:#W - \"#T\" #{session_alerts}",
602 .text
= "Format of the terminal title to set."
605 { .name
= "silence-action",
606 .type
= OPTIONS_TABLE_CHOICE
,
607 .scope
= OPTIONS_TABLE_SESSION
,
608 .choices
= options_table_bell_action_list
,
609 .default_num
= ALERT_OTHER
,
610 .text
= "Action to take on a silence alert."
614 .type
= OPTIONS_TABLE_CHOICE
,
615 .scope
= OPTIONS_TABLE_SESSION
,
616 .choices
= options_table_status_list
,
618 .text
= "Number of lines in the status line."
621 { .name
= "status-bg",
622 .type
= OPTIONS_TABLE_COLOUR
,
623 .scope
= OPTIONS_TABLE_SESSION
,
625 .text
= "Background colour of the status line. This option is "
626 "deprecated, use 'status-style' instead."
629 { .name
= "status-fg",
630 .type
= OPTIONS_TABLE_COLOUR
,
631 .scope
= OPTIONS_TABLE_SESSION
,
633 .text
= "Foreground colour of the status line. This option is "
634 "deprecated, use 'status-style' instead."
637 { .name
= "status-format",
638 .type
= OPTIONS_TABLE_STRING
,
639 .scope
= OPTIONS_TABLE_SESSION
,
640 .flags
= OPTIONS_TABLE_IS_ARRAY
,
641 .default_arr
= options_table_status_format_default
,
642 .text
= "Formats for the status lines. "
643 "Each array member is the format for one status line. "
644 "The default status line is made up of several components "
645 "which may be configured individually with other options such "
649 { .name
= "status-interval",
650 .type
= OPTIONS_TABLE_NUMBER
,
651 .scope
= OPTIONS_TABLE_SESSION
,
656 .text
= "Number of seconds between status line updates."
659 { .name
= "status-justify",
660 .type
= OPTIONS_TABLE_CHOICE
,
661 .scope
= OPTIONS_TABLE_SESSION
,
662 .choices
= options_table_status_justify_list
,
664 .text
= "Position of the window list in the status line."
667 { .name
= "status-keys",
668 .type
= OPTIONS_TABLE_CHOICE
,
669 .scope
= OPTIONS_TABLE_SESSION
,
670 .choices
= options_table_status_keys_list
,
671 .default_num
= MODEKEY_EMACS
,
672 .text
= "Key set to use at the command prompt."
675 { .name
= "status-left",
676 .type
= OPTIONS_TABLE_STRING
,
677 .scope
= OPTIONS_TABLE_SESSION
,
678 .default_str
= "[#{session_name}] ",
679 .text
= "Contents of the left side of the status line."
682 { .name
= "status-left-length",
683 .type
= OPTIONS_TABLE_NUMBER
,
684 .scope
= OPTIONS_TABLE_SESSION
,
688 .text
= "Maximum width of the left side of the status line."
691 { .name
= "status-left-style",
692 .type
= OPTIONS_TABLE_STRING
,
693 .scope
= OPTIONS_TABLE_SESSION
,
694 .default_str
= "default",
695 .flags
= OPTIONS_TABLE_IS_STYLE
,
697 .text
= "Style of the left side of the status line."
700 { .name
= "status-position",
701 .type
= OPTIONS_TABLE_CHOICE
,
702 .scope
= OPTIONS_TABLE_SESSION
,
703 .choices
= options_table_status_position_list
,
705 .text
= "Position of the status line."
708 { .name
= "status-right",
709 .type
= OPTIONS_TABLE_STRING
,
710 .scope
= OPTIONS_TABLE_SESSION
,
711 .default_str
= "#{?window_bigger,"
712 "[#{window_offset_x}#,#{window_offset_y}] ,}"
713 "\"#{=21:pane_title}\" %H:%M %d-%b-%y",
714 .text
= "Contents of the right side of the status line."
718 { .name
= "status-right-length",
719 .type
= OPTIONS_TABLE_NUMBER
,
720 .scope
= OPTIONS_TABLE_SESSION
,
724 .text
= "Maximum width of the right side of the status line."
727 { .name
= "status-right-style",
728 .type
= OPTIONS_TABLE_STRING
,
729 .scope
= OPTIONS_TABLE_SESSION
,
730 .default_str
= "default",
731 .flags
= OPTIONS_TABLE_IS_STYLE
,
733 .text
= "Style of the right side of the status line."
736 { .name
= "status-style",
737 .type
= OPTIONS_TABLE_STRING
,
738 .scope
= OPTIONS_TABLE_SESSION
,
739 .default_str
= "bg=green,fg=black",
740 .flags
= OPTIONS_TABLE_IS_STYLE
,
742 .text
= "Style of the status line."
745 { .name
= "update-environment",
746 .type
= OPTIONS_TABLE_STRING
,
747 .scope
= OPTIONS_TABLE_SESSION
,
748 .flags
= OPTIONS_TABLE_IS_ARRAY
,
749 .default_str
= "DISPLAY KRB5CCNAME SSH_ASKPASS SSH_AUTH_SOCK "
750 "SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY",
751 .text
= "List of environment variables to update in the session "
752 "environment when a client is attached."
755 { .name
= "visual-activity",
756 .type
= OPTIONS_TABLE_CHOICE
,
757 .scope
= OPTIONS_TABLE_SESSION
,
758 .choices
= options_table_visual_bell_list
,
759 .default_num
= VISUAL_OFF
,
760 .text
= "How activity alerts should be shown: a message ('on'), "
761 "a message and a bell ('both') or nothing ('off')."
764 { .name
= "visual-bell",
765 .type
= OPTIONS_TABLE_CHOICE
,
766 .scope
= OPTIONS_TABLE_SESSION
,
767 .choices
= options_table_visual_bell_list
,
768 .default_num
= VISUAL_OFF
,
769 .text
= "How bell alerts should be shown: a message ('on'), "
770 "a message and a bell ('both') or nothing ('off')."
773 { .name
= "visual-silence",
774 .type
= OPTIONS_TABLE_CHOICE
,
775 .scope
= OPTIONS_TABLE_SESSION
,
776 .choices
= options_table_visual_bell_list
,
777 .default_num
= VISUAL_OFF
,
778 .text
= "How silence alerts should be shown: a message ('on'), "
779 "a message and a bell ('both') or nothing ('off')."
782 { .name
= "word-separators",
783 .type
= OPTIONS_TABLE_STRING
,
784 .scope
= OPTIONS_TABLE_SESSION
,
786 * The set of non-alphanumeric printable ASCII characters minus the
789 .default_str
= "!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~",
790 .text
= "Characters considered to separate words."
793 /* Window options. */
794 { .name
= "aggressive-resize",
795 .type
= OPTIONS_TABLE_FLAG
,
796 .scope
= OPTIONS_TABLE_WINDOW
,
798 .text
= "When 'window-size' is 'smallest', whether the maximum size "
799 "of a window is the smallest attached session where it is "
800 "the current window ('on') or the smallest session it is "
804 { .name
= "allow-passthrough",
805 .type
= OPTIONS_TABLE_FLAG
,
806 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
808 .text
= "Whether applications are allowed to use the escape sequence "
812 { .name
= "allow-rename",
813 .type
= OPTIONS_TABLE_FLAG
,
814 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
816 .text
= "Whether applications are allowed to use the escape sequence "
820 { .name
= "alternate-screen",
821 .type
= OPTIONS_TABLE_FLAG
,
822 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
824 .text
= "Whether applications are allowed to use the alternate "
828 { .name
= "automatic-rename",
829 .type
= OPTIONS_TABLE_FLAG
,
830 .scope
= OPTIONS_TABLE_WINDOW
,
832 .text
= "Whether windows are automatically renamed."
835 { .name
= "automatic-rename-format",
836 .type
= OPTIONS_TABLE_STRING
,
837 .scope
= OPTIONS_TABLE_WINDOW
,
838 .default_str
= "#{?pane_in_mode,[tmux],#{pane_current_command}}"
839 "#{?pane_dead,[dead],}",
840 .text
= "Format used to automatically rename windows."
843 { .name
= "clock-mode-colour",
844 .type
= OPTIONS_TABLE_COLOUR
,
845 .scope
= OPTIONS_TABLE_WINDOW
,
847 .text
= "Colour of the clock in clock mode."
850 { .name
= "clock-mode-style",
851 .type
= OPTIONS_TABLE_CHOICE
,
852 .scope
= OPTIONS_TABLE_WINDOW
,
853 .choices
= options_table_clock_mode_style_list
,
855 .text
= "Time format of the clock in clock mode."
858 { .name
= "copy-mode-match-style",
859 .type
= OPTIONS_TABLE_STRING
,
860 .scope
= OPTIONS_TABLE_WINDOW
,
861 .default_str
= "bg=cyan,fg=black",
862 .flags
= OPTIONS_TABLE_IS_STYLE
,
864 .text
= "Style of search matches in copy mode."
867 { .name
= "copy-mode-current-match-style",
868 .type
= OPTIONS_TABLE_STRING
,
869 .scope
= OPTIONS_TABLE_WINDOW
,
870 .default_str
= "bg=magenta,fg=black",
871 .flags
= OPTIONS_TABLE_IS_STYLE
,
873 .text
= "Style of the current search match in copy mode."
876 { .name
= "copy-mode-mark-style",
877 .type
= OPTIONS_TABLE_STRING
,
878 .scope
= OPTIONS_TABLE_WINDOW
,
879 .default_str
= "bg=red,fg=black",
880 .flags
= OPTIONS_TABLE_IS_STYLE
,
882 .text
= "Style of the marked line in copy mode."
885 { .name
= "main-pane-height",
886 .type
= OPTIONS_TABLE_STRING
,
887 .scope
= OPTIONS_TABLE_WINDOW
,
889 .text
= "Height of the main pane in the 'main-horizontal' layout. "
890 "This may be a percentage, for example '10%'."
893 { .name
= "main-pane-width",
894 .type
= OPTIONS_TABLE_STRING
,
895 .scope
= OPTIONS_TABLE_WINDOW
,
897 .text
= "Width of the main pane in the 'main-vertical' layout. "
898 "This may be a percentage, for example '10%'."
901 { .name
= "mode-keys",
902 .type
= OPTIONS_TABLE_CHOICE
,
903 .scope
= OPTIONS_TABLE_WINDOW
,
904 .choices
= options_table_mode_keys_list
,
905 .default_num
= MODEKEY_EMACS
,
906 .text
= "Key set used in copy mode."
909 { .name
= "mode-style",
910 .type
= OPTIONS_TABLE_STRING
,
911 .scope
= OPTIONS_TABLE_WINDOW
,
912 .default_str
= "bg=yellow,fg=black",
913 .flags
= OPTIONS_TABLE_IS_STYLE
,
915 .text
= "Style of indicators and highlighting in modes."
918 { .name
= "monitor-activity",
919 .type
= OPTIONS_TABLE_FLAG
,
920 .scope
= OPTIONS_TABLE_WINDOW
,
922 .text
= "Whether an alert is triggered by activity."
925 { .name
= "monitor-bell",
926 .type
= OPTIONS_TABLE_FLAG
,
927 .scope
= OPTIONS_TABLE_WINDOW
,
929 .text
= "Whether an alert is triggered by a bell."
932 { .name
= "monitor-silence",
933 .type
= OPTIONS_TABLE_NUMBER
,
934 .scope
= OPTIONS_TABLE_WINDOW
,
938 .text
= "Time after which an alert is triggered by silence. "
939 "Zero means no alert."
943 { .name
= "other-pane-height",
944 .type
= OPTIONS_TABLE_STRING
,
945 .scope
= OPTIONS_TABLE_WINDOW
,
947 .text
= "Height of the other panes in the 'main-horizontal' layout. "
948 "This may be a percentage, for example '10%'."
951 { .name
= "other-pane-width",
952 .type
= OPTIONS_TABLE_STRING
,
953 .scope
= OPTIONS_TABLE_WINDOW
,
955 .text
= "Height of the other panes in the 'main-vertical' layout. "
956 "This may be a percentage, for example '10%'."
959 { .name
= "pane-active-border-style",
960 .type
= OPTIONS_TABLE_STRING
,
961 .scope
= OPTIONS_TABLE_WINDOW
,
962 .default_str
= "#{?pane_in_mode,fg=yellow,#{?synchronize-panes,fg=red,fg=green}}",
963 .flags
= OPTIONS_TABLE_IS_STYLE
,
965 .text
= "Style of the active pane border."
968 { .name
= "pane-base-index",
969 .type
= OPTIONS_TABLE_NUMBER
,
970 .scope
= OPTIONS_TABLE_WINDOW
,
972 .maximum
= USHRT_MAX
,
974 .text
= "Index of the first pane in each window."
977 { .name
= "pane-border-format",
978 .type
= OPTIONS_TABLE_STRING
,
979 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
980 .default_str
= "#{?pane_active,#[reverse],}#{pane_index}#[default] "
982 .text
= "Format of text in the pane status lines."
985 { .name
= "pane-border-indicators",
986 .type
= OPTIONS_TABLE_CHOICE
,
987 .scope
= OPTIONS_TABLE_WINDOW
,
988 .choices
= options_table_pane_border_indicators_list
,
989 .default_num
= PANE_BORDER_COLOUR
,
990 .text
= "Whether to indicate the active pane by colouring border or "
991 "displaying arrow markers."
994 { .name
= "pane-border-lines",
995 .type
= OPTIONS_TABLE_CHOICE
,
996 .scope
= OPTIONS_TABLE_WINDOW
,
997 .choices
= options_table_pane_border_lines_list
,
998 .default_num
= PANE_LINES_SINGLE
,
999 .text
= "Type of characters used to draw pane border lines. Some of "
1000 "these are only supported on terminals with UTF-8 support."
1003 { .name
= "pane-border-status",
1004 .type
= OPTIONS_TABLE_CHOICE
,
1005 .scope
= OPTIONS_TABLE_WINDOW
,
1006 .choices
= options_table_pane_status_list
,
1007 .default_num
= PANE_STATUS_OFF
,
1008 .text
= "Position of the pane status lines."
1011 { .name
= "pane-border-style",
1012 .type
= OPTIONS_TABLE_STRING
,
1013 .scope
= OPTIONS_TABLE_WINDOW
,
1014 .default_str
= "default",
1015 .flags
= OPTIONS_TABLE_IS_STYLE
,
1017 .text
= "Style of the pane status lines."
1020 { .name
= "pane-colours",
1021 .type
= OPTIONS_TABLE_COLOUR
,
1022 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
1024 .flags
= OPTIONS_TABLE_IS_ARRAY
,
1025 .text
= "The default colour palette for colours zero to 255."
1028 { .name
= "popup-style",
1029 .type
= OPTIONS_TABLE_STRING
,
1030 .scope
= OPTIONS_TABLE_WINDOW
,
1031 .default_str
= "default",
1032 .flags
= OPTIONS_TABLE_IS_STYLE
,
1034 .text
= "Default style of popups."
1037 { .name
= "popup-border-style",
1038 .type
= OPTIONS_TABLE_STRING
,
1039 .scope
= OPTIONS_TABLE_WINDOW
,
1040 .default_str
= "default",
1041 .flags
= OPTIONS_TABLE_IS_STYLE
,
1043 .text
= "Default style of popup borders."
1046 { .name
= "popup-border-lines",
1047 .type
= OPTIONS_TABLE_CHOICE
,
1048 .scope
= OPTIONS_TABLE_WINDOW
,
1049 .choices
= options_table_popup_border_lines_list
,
1050 .default_num
= BOX_LINES_SINGLE
,
1051 .text
= "Type of characters used to draw popup border lines. Some of "
1052 "these are only supported on terminals with UTF-8 support."
1055 { .name
= "remain-on-exit",
1056 .type
= OPTIONS_TABLE_CHOICE
,
1057 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
1058 .choices
= options_table_remain_on_exit_list
,
1060 .text
= "Whether panes should remain ('on') or be automatically "
1061 "killed ('off' or 'failed') when the program inside exits."
1064 { .name
= "synchronize-panes",
1065 .type
= OPTIONS_TABLE_FLAG
,
1066 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
1068 .text
= "Whether typing should be sent to all panes simultaneously."
1071 { .name
= "window-active-style",
1072 .type
= OPTIONS_TABLE_STRING
,
1073 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
1074 .default_str
= "default",
1075 .flags
= OPTIONS_TABLE_IS_STYLE
,
1077 .text
= "Default style of the active pane."
1080 { .name
= "window-size",
1081 .type
= OPTIONS_TABLE_CHOICE
,
1082 .scope
= OPTIONS_TABLE_WINDOW
,
1083 .choices
= options_table_window_size_list
,
1084 .default_num
= WINDOW_SIZE_LATEST
,
1085 .text
= "How window size is calculated. "
1086 "'latest' uses the size of the most recently used client, "
1087 "'largest' the largest client, 'smallest' the smallest "
1088 "client and 'manual' a size set by the 'resize-window' "
1092 { .name
= "window-style",
1093 .type
= OPTIONS_TABLE_STRING
,
1094 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
1095 .default_str
= "default",
1096 .flags
= OPTIONS_TABLE_IS_STYLE
,
1098 .text
= "Default style of panes that are not the active pane."
1101 { .name
= "window-status-activity-style",
1102 .type
= OPTIONS_TABLE_STRING
,
1103 .scope
= OPTIONS_TABLE_WINDOW
,
1104 .default_str
= "reverse",
1105 .flags
= OPTIONS_TABLE_IS_STYLE
,
1107 .text
= "Style of windows in the status line with an activity alert."
1110 { .name
= "window-status-bell-style",
1111 .type
= OPTIONS_TABLE_STRING
,
1112 .scope
= OPTIONS_TABLE_WINDOW
,
1113 .default_str
= "reverse",
1114 .flags
= OPTIONS_TABLE_IS_STYLE
,
1116 .text
= "Style of windows in the status line with a bell alert."
1119 { .name
= "window-status-current-format",
1120 .type
= OPTIONS_TABLE_STRING
,
1121 .scope
= OPTIONS_TABLE_WINDOW
,
1122 .default_str
= "#I:#W#{?window_flags,#{window_flags}, }",
1123 .text
= "Format of the current window in the status line."
1126 { .name
= "window-status-current-style",
1127 .type
= OPTIONS_TABLE_STRING
,
1128 .scope
= OPTIONS_TABLE_WINDOW
,
1129 .default_str
= "default",
1130 .flags
= OPTIONS_TABLE_IS_STYLE
,
1132 .text
= "Style of the current window in the status line."
1135 { .name
= "window-status-format",
1136 .type
= OPTIONS_TABLE_STRING
,
1137 .scope
= OPTIONS_TABLE_WINDOW
,
1138 .default_str
= "#I:#W#{?window_flags,#{window_flags}, }",
1139 .text
= "Format of windows in the status line, except the current "
1143 { .name
= "window-status-last-style",
1144 .type
= OPTIONS_TABLE_STRING
,
1145 .scope
= OPTIONS_TABLE_WINDOW
,
1146 .default_str
= "default",
1147 .flags
= OPTIONS_TABLE_IS_STYLE
,
1149 .text
= "Style of the last window in the status line."
1152 { .name
= "window-status-separator",
1153 .type
= OPTIONS_TABLE_STRING
,
1154 .scope
= OPTIONS_TABLE_WINDOW
,
1156 .text
= "Separator between windows in the status line."
1159 { .name
= "window-status-style",
1160 .type
= OPTIONS_TABLE_STRING
,
1161 .scope
= OPTIONS_TABLE_WINDOW
,
1162 .default_str
= "default",
1163 .flags
= OPTIONS_TABLE_IS_STYLE
,
1165 .text
= "Style of windows in the status line, except the current and "
1169 { .name
= "wrap-search",
1170 .type
= OPTIONS_TABLE_FLAG
,
1171 .scope
= OPTIONS_TABLE_WINDOW
,
1173 .text
= "Whether searching in copy mode should wrap at the top or "
1177 { .name
= "xterm-keys", /* no longer used */
1178 .type
= OPTIONS_TABLE_FLAG
,
1179 .scope
= OPTIONS_TABLE_WINDOW
,
1181 .text
= "Whether xterm-style function key sequences should be sent. "
1182 "This option is no longer used."
1186 OPTIONS_TABLE_HOOK("after-bind-key", ""),
1187 OPTIONS_TABLE_HOOK("after-capture-pane", ""),
1188 OPTIONS_TABLE_HOOK("after-copy-mode", ""),
1189 OPTIONS_TABLE_HOOK("after-display-message", ""),
1190 OPTIONS_TABLE_HOOK("after-display-panes", ""),
1191 OPTIONS_TABLE_HOOK("after-kill-pane", ""),
1192 OPTIONS_TABLE_HOOK("after-list-buffers", ""),
1193 OPTIONS_TABLE_HOOK("after-list-clients", ""),
1194 OPTIONS_TABLE_HOOK("after-list-keys", ""),
1195 OPTIONS_TABLE_HOOK("after-list-panes", ""),
1196 OPTIONS_TABLE_HOOK("after-list-sessions", ""),
1197 OPTIONS_TABLE_HOOK("after-list-windows", ""),
1198 OPTIONS_TABLE_HOOK("after-load-buffer", ""),
1199 OPTIONS_TABLE_HOOK("after-lock-server", ""),
1200 OPTIONS_TABLE_HOOK("after-new-session", ""),
1201 OPTIONS_TABLE_HOOK("after-new-window", ""),
1202 OPTIONS_TABLE_HOOK("after-paste-buffer", ""),
1203 OPTIONS_TABLE_HOOK("after-pipe-pane", ""),
1204 OPTIONS_TABLE_HOOK("after-queue", ""),
1205 OPTIONS_TABLE_HOOK("after-refresh-client", ""),
1206 OPTIONS_TABLE_HOOK("after-rename-session", ""),
1207 OPTIONS_TABLE_HOOK("after-rename-window", ""),
1208 OPTIONS_TABLE_HOOK("after-resize-pane", ""),
1209 OPTIONS_TABLE_HOOK("after-resize-window", ""),
1210 OPTIONS_TABLE_HOOK("after-save-buffer", ""),
1211 OPTIONS_TABLE_HOOK("after-select-layout", ""),
1212 OPTIONS_TABLE_HOOK("after-select-pane", ""),
1213 OPTIONS_TABLE_HOOK("after-select-window", ""),
1214 OPTIONS_TABLE_HOOK("after-send-keys", ""),
1215 OPTIONS_TABLE_HOOK("after-set-buffer", ""),
1216 OPTIONS_TABLE_HOOK("after-set-environment", ""),
1217 OPTIONS_TABLE_HOOK("after-set-hook", ""),
1218 OPTIONS_TABLE_HOOK("after-set-option", ""),
1219 OPTIONS_TABLE_HOOK("after-show-environment", ""),
1220 OPTIONS_TABLE_HOOK("after-show-messages", ""),
1221 OPTIONS_TABLE_HOOK("after-show-options", ""),
1222 OPTIONS_TABLE_HOOK("after-split-window", ""),
1223 OPTIONS_TABLE_HOOK("after-unbind-key", ""),
1224 OPTIONS_TABLE_HOOK("alert-activity", ""),
1225 OPTIONS_TABLE_HOOK("alert-bell", ""),
1226 OPTIONS_TABLE_HOOK("alert-silence", ""),
1227 OPTIONS_TABLE_HOOK("client-active", ""),
1228 OPTIONS_TABLE_HOOK("client-attached", ""),
1229 OPTIONS_TABLE_HOOK("client-detached", ""),
1230 OPTIONS_TABLE_HOOK("client-focus-in", ""),
1231 OPTIONS_TABLE_HOOK("client-focus-out", ""),
1232 OPTIONS_TABLE_HOOK("client-resized", ""),
1233 OPTIONS_TABLE_HOOK("client-session-changed", ""),
1234 OPTIONS_TABLE_PANE_HOOK("pane-died", ""),
1235 OPTIONS_TABLE_PANE_HOOK("pane-exited", ""),
1236 OPTIONS_TABLE_PANE_HOOK("pane-focus-in", ""),
1237 OPTIONS_TABLE_PANE_HOOK("pane-focus-out", ""),
1238 OPTIONS_TABLE_PANE_HOOK("pane-mode-changed", ""),
1239 OPTIONS_TABLE_PANE_HOOK("pane-set-clipboard", ""),
1240 OPTIONS_TABLE_PANE_HOOK("pane-title-changed", ""),
1241 OPTIONS_TABLE_HOOK("session-closed", ""),
1242 OPTIONS_TABLE_HOOK("session-created", ""),
1243 OPTIONS_TABLE_HOOK("session-renamed", ""),
1244 OPTIONS_TABLE_HOOK("session-window-changed", ""),
1245 OPTIONS_TABLE_WINDOW_HOOK("window-layout-changed", ""),
1246 OPTIONS_TABLE_HOOK("window-linked", ""),
1247 OPTIONS_TABLE_WINDOW_HOOK("window-pane-changed", ""),
1248 OPTIONS_TABLE_WINDOW_HOOK("window-renamed", ""),
1249 OPTIONS_TABLE_WINDOW_HOOK("window-resized", ""),
1250 OPTIONS_TABLE_HOOK("window-unlinked", ""),