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 .unit
= "milliseconds",
282 .text
= "Time to wait before assuming a key is Escape."
285 { .name
= "exit-empty",
286 .type
= OPTIONS_TABLE_FLAG
,
287 .scope
= OPTIONS_TABLE_SERVER
,
289 .text
= "Whether the server should exit if there are no sessions."
292 { .name
= "exit-unattached",
293 .type
= OPTIONS_TABLE_FLAG
,
294 .scope
= OPTIONS_TABLE_SERVER
,
296 .text
= "Whether the server should exit if there are no attached "
300 { .name
= "extended-keys",
301 .type
= OPTIONS_TABLE_CHOICE
,
302 .scope
= OPTIONS_TABLE_SERVER
,
303 .choices
= options_table_extended_keys_list
,
305 .text
= "Whether to request extended key sequences from terminals "
309 { .name
= "focus-events",
310 .type
= OPTIONS_TABLE_FLAG
,
311 .scope
= OPTIONS_TABLE_SERVER
,
313 .text
= "Whether to send focus events to applications."
316 { .name
= "history-file",
317 .type
= OPTIONS_TABLE_STRING
,
318 .scope
= OPTIONS_TABLE_SERVER
,
320 .text
= "Location of the command prompt history file. "
321 "Empty does not write a history file."
324 { .name
= "message-limit",
325 .type
= OPTIONS_TABLE_NUMBER
,
326 .scope
= OPTIONS_TABLE_SERVER
,
330 .text
= "Maximum number of server messages to keep."
333 { .name
= "prompt-history-limit",
334 .type
= OPTIONS_TABLE_NUMBER
,
335 .scope
= OPTIONS_TABLE_SERVER
,
339 .text
= "Maximum number of commands to keep in history."
342 { .name
= "set-clipboard",
343 .type
= OPTIONS_TABLE_CHOICE
,
344 .scope
= OPTIONS_TABLE_SERVER
,
345 .choices
= options_table_set_clipboard_list
,
347 .text
= "Whether to attempt to set the system clipboard ('on' or "
348 "'external') and whether to allow applications to create "
349 "paste buffers with an escape sequence ('on' only)."
352 { .name
= "terminal-overrides",
353 .type
= OPTIONS_TABLE_STRING
,
354 .scope
= OPTIONS_TABLE_SERVER
,
355 .flags
= OPTIONS_TABLE_IS_ARRAY
,
358 .text
= "List of terminal capabilities overrides."
361 { .name
= "terminal-features",
362 .type
= OPTIONS_TABLE_STRING
,
363 .scope
= OPTIONS_TABLE_SERVER
,
364 .flags
= OPTIONS_TABLE_IS_ARRAY
,
365 .default_str
= "xterm*:clipboard:ccolour:cstyle:focus:title,"
369 .text
= "List of terminal features, used if they cannot be "
370 "automatically detected."
373 { .name
= "user-keys",
374 .type
= OPTIONS_TABLE_STRING
,
375 .scope
= OPTIONS_TABLE_SERVER
,
376 .flags
= OPTIONS_TABLE_IS_ARRAY
,
379 .text
= "User key assignments. "
380 "Each sequence in the list is translated into a key: "
381 "'User0', 'User1' and so on."
384 /* Session options. */
385 { .name
= "activity-action",
386 .type
= OPTIONS_TABLE_CHOICE
,
387 .scope
= OPTIONS_TABLE_SESSION
,
388 .choices
= options_table_bell_action_list
,
389 .default_num
= ALERT_OTHER
,
390 .text
= "Action to take on an activity alert."
393 { .name
= "assume-paste-time",
394 .type
= OPTIONS_TABLE_NUMBER
,
395 .scope
= OPTIONS_TABLE_SESSION
,
399 .unit
= "milliseconds",
400 .text
= "Maximum time between input to assume it is pasting rather "
404 { .name
= "base-index",
405 .type
= OPTIONS_TABLE_NUMBER
,
406 .scope
= OPTIONS_TABLE_SESSION
,
410 .text
= "Default index of the first window in each session."
413 { .name
= "bell-action",
414 .type
= OPTIONS_TABLE_CHOICE
,
415 .scope
= OPTIONS_TABLE_SESSION
,
416 .choices
= options_table_bell_action_list
,
417 .default_num
= ALERT_ANY
,
418 .text
= "Action to take on a bell alert."
421 { .name
= "default-command",
422 .type
= OPTIONS_TABLE_STRING
,
423 .scope
= OPTIONS_TABLE_SESSION
,
425 .text
= "Default command to run in new panes. If empty, a shell is "
429 { .name
= "default-shell",
430 .type
= OPTIONS_TABLE_STRING
,
431 .scope
= OPTIONS_TABLE_SESSION
,
432 .default_str
= _PATH_BSHELL
,
433 .text
= "Location of default shell."
436 { .name
= "default-size",
437 .type
= OPTIONS_TABLE_STRING
,
438 .scope
= OPTIONS_TABLE_SESSION
,
439 .pattern
= "[0-9]*x[0-9]*",
440 .default_str
= "80x24",
441 .text
= "Initial size of new sessions."
444 { .name
= "destroy-unattached",
445 .type
= OPTIONS_TABLE_FLAG
,
446 .scope
= OPTIONS_TABLE_SESSION
,
448 .text
= "Whether to destroy sessions when they have no attached "
452 { .name
= "detach-on-destroy",
453 .type
= OPTIONS_TABLE_CHOICE
,
454 .scope
= OPTIONS_TABLE_SESSION
,
455 .choices
= options_table_detach_on_destroy_list
,
457 .text
= "Whether to detach when a session is destroyed, or switch "
458 "the client to another session if any exist."
461 { .name
= "display-panes-active-colour",
462 .type
= OPTIONS_TABLE_COLOUR
,
463 .scope
= OPTIONS_TABLE_SESSION
,
465 .text
= "Colour of the active pane for 'display-panes'."
468 { .name
= "display-panes-colour",
469 .type
= OPTIONS_TABLE_COLOUR
,
470 .scope
= OPTIONS_TABLE_SESSION
,
472 .text
= "Colour of not active panes for 'display-panes'."
475 { .name
= "display-panes-time",
476 .type
= OPTIONS_TABLE_NUMBER
,
477 .scope
= OPTIONS_TABLE_SESSION
,
481 .unit
= "milliseconds",
482 .text
= "Time for which 'display-panes' should show pane numbers."
485 { .name
= "display-time",
486 .type
= OPTIONS_TABLE_NUMBER
,
487 .scope
= OPTIONS_TABLE_SESSION
,
491 .unit
= "milliseconds",
492 .text
= "Time for which status line messages should appear."
495 { .name
= "history-limit",
496 .type
= OPTIONS_TABLE_NUMBER
,
497 .scope
= OPTIONS_TABLE_SESSION
,
502 .text
= "Maximum number of lines to keep in the history for each "
504 "If changed, the new value applies only to new panes."
507 { .name
= "key-table",
508 .type
= OPTIONS_TABLE_STRING
,
509 .scope
= OPTIONS_TABLE_SESSION
,
510 .default_str
= "root",
511 .text
= "Default key table. "
512 "Key presses are first looked up in this table."
515 { .name
= "lock-after-time",
516 .type
= OPTIONS_TABLE_NUMBER
,
517 .scope
= OPTIONS_TABLE_SESSION
,
522 .text
= "Time after which a client is locked if not used."
525 { .name
= "lock-command",
526 .type
= OPTIONS_TABLE_STRING
,
527 .scope
= OPTIONS_TABLE_SESSION
,
528 .default_str
= "lock -np",
529 .text
= "Shell command to run to lock a client."
532 { .name
= "message-command-style",
533 .type
= OPTIONS_TABLE_STRING
,
534 .scope
= OPTIONS_TABLE_SESSION
,
535 .default_str
= "bg=black,fg=yellow",
536 .flags
= OPTIONS_TABLE_IS_STYLE
,
538 .text
= "Style of the command prompt when in command mode, if "
539 "'mode-keys' is set to 'vi'."
542 { .name
= "message-style",
543 .type
= OPTIONS_TABLE_STRING
,
544 .scope
= OPTIONS_TABLE_SESSION
,
545 .default_str
= "bg=yellow,fg=black",
546 .flags
= OPTIONS_TABLE_IS_STYLE
,
548 .text
= "Style of the command prompt."
552 .type
= OPTIONS_TABLE_FLAG
,
553 .scope
= OPTIONS_TABLE_SESSION
,
555 .text
= "Whether the mouse is recognised and mouse key bindings are "
557 "Applications inside panes can use the mouse even when 'off'."
561 .type
= OPTIONS_TABLE_KEY
,
562 .scope
= OPTIONS_TABLE_SESSION
,
563 .default_num
= '\002',
564 .text
= "The prefix key."
568 .type
= OPTIONS_TABLE_KEY
,
569 .scope
= OPTIONS_TABLE_SESSION
,
570 .default_num
= KEYC_NONE
,
571 .text
= "A second prefix key."
574 { .name
= "renumber-windows",
575 .type
= OPTIONS_TABLE_FLAG
,
576 .scope
= OPTIONS_TABLE_SESSION
,
578 .text
= "Whether windows are automatically renumbered rather than "
582 { .name
= "repeat-time",
583 .type
= OPTIONS_TABLE_NUMBER
,
584 .scope
= OPTIONS_TABLE_SESSION
,
588 .unit
= "milliseconds",
589 .text
= "Time to wait for a key binding to repeat, if it is bound "
590 "with the '-r' flag."
593 { .name
= "set-titles",
594 .type
= OPTIONS_TABLE_FLAG
,
595 .scope
= OPTIONS_TABLE_SESSION
,
597 .text
= "Whether to set the terminal title, if supported."
600 { .name
= "set-titles-string",
601 .type
= OPTIONS_TABLE_STRING
,
602 .scope
= OPTIONS_TABLE_SESSION
,
603 .default_str
= "#S:#I:#W - \"#T\" #{session_alerts}",
604 .text
= "Format of the terminal title to set."
607 { .name
= "silence-action",
608 .type
= OPTIONS_TABLE_CHOICE
,
609 .scope
= OPTIONS_TABLE_SESSION
,
610 .choices
= options_table_bell_action_list
,
611 .default_num
= ALERT_OTHER
,
612 .text
= "Action to take on a silence alert."
616 .type
= OPTIONS_TABLE_CHOICE
,
617 .scope
= OPTIONS_TABLE_SESSION
,
618 .choices
= options_table_status_list
,
620 .text
= "Number of lines in the status line."
623 { .name
= "status-bg",
624 .type
= OPTIONS_TABLE_COLOUR
,
625 .scope
= OPTIONS_TABLE_SESSION
,
627 .text
= "Background colour of the status line. This option is "
628 "deprecated, use 'status-style' instead."
631 { .name
= "status-fg",
632 .type
= OPTIONS_TABLE_COLOUR
,
633 .scope
= OPTIONS_TABLE_SESSION
,
635 .text
= "Foreground colour of the status line. This option is "
636 "deprecated, use 'status-style' instead."
639 { .name
= "status-format",
640 .type
= OPTIONS_TABLE_STRING
,
641 .scope
= OPTIONS_TABLE_SESSION
,
642 .flags
= OPTIONS_TABLE_IS_ARRAY
,
643 .default_arr
= options_table_status_format_default
,
644 .text
= "Formats for the status lines. "
645 "Each array member is the format for one status line. "
646 "The default status line is made up of several components "
647 "which may be configured individually with other options such "
651 { .name
= "status-interval",
652 .type
= OPTIONS_TABLE_NUMBER
,
653 .scope
= OPTIONS_TABLE_SESSION
,
658 .text
= "Number of seconds between status line updates."
661 { .name
= "status-justify",
662 .type
= OPTIONS_TABLE_CHOICE
,
663 .scope
= OPTIONS_TABLE_SESSION
,
664 .choices
= options_table_status_justify_list
,
666 .text
= "Position of the window list in the status line."
669 { .name
= "status-keys",
670 .type
= OPTIONS_TABLE_CHOICE
,
671 .scope
= OPTIONS_TABLE_SESSION
,
672 .choices
= options_table_status_keys_list
,
673 .default_num
= MODEKEY_EMACS
,
674 .text
= "Key set to use at the command prompt."
677 { .name
= "status-left",
678 .type
= OPTIONS_TABLE_STRING
,
679 .scope
= OPTIONS_TABLE_SESSION
,
680 .default_str
= "[#{session_name}] ",
681 .text
= "Contents of the left side of the status line."
684 { .name
= "status-left-length",
685 .type
= OPTIONS_TABLE_NUMBER
,
686 .scope
= OPTIONS_TABLE_SESSION
,
690 .text
= "Maximum width of the left side of the status line."
693 { .name
= "status-left-style",
694 .type
= OPTIONS_TABLE_STRING
,
695 .scope
= OPTIONS_TABLE_SESSION
,
696 .default_str
= "default",
697 .flags
= OPTIONS_TABLE_IS_STYLE
,
699 .text
= "Style of the left side of the status line."
702 { .name
= "status-position",
703 .type
= OPTIONS_TABLE_CHOICE
,
704 .scope
= OPTIONS_TABLE_SESSION
,
705 .choices
= options_table_status_position_list
,
707 .text
= "Position of the status line."
710 { .name
= "status-right",
711 .type
= OPTIONS_TABLE_STRING
,
712 .scope
= OPTIONS_TABLE_SESSION
,
713 .default_str
= "#{?window_bigger,"
714 "[#{window_offset_x}#,#{window_offset_y}] ,}"
715 "\"#{=21:pane_title}\" %H:%M %d-%b-%y",
716 .text
= "Contents of the right side of the status line."
720 { .name
= "status-right-length",
721 .type
= OPTIONS_TABLE_NUMBER
,
722 .scope
= OPTIONS_TABLE_SESSION
,
726 .text
= "Maximum width of the right side of the status line."
729 { .name
= "status-right-style",
730 .type
= OPTIONS_TABLE_STRING
,
731 .scope
= OPTIONS_TABLE_SESSION
,
732 .default_str
= "default",
733 .flags
= OPTIONS_TABLE_IS_STYLE
,
735 .text
= "Style of the right side of the status line."
738 { .name
= "status-style",
739 .type
= OPTIONS_TABLE_STRING
,
740 .scope
= OPTIONS_TABLE_SESSION
,
741 .default_str
= "bg=green,fg=black",
742 .flags
= OPTIONS_TABLE_IS_STYLE
,
744 .text
= "Style of the status line."
747 { .name
= "update-environment",
748 .type
= OPTIONS_TABLE_STRING
,
749 .scope
= OPTIONS_TABLE_SESSION
,
750 .flags
= OPTIONS_TABLE_IS_ARRAY
,
751 .default_str
= "DISPLAY KRB5CCNAME SSH_ASKPASS SSH_AUTH_SOCK "
752 "SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY",
753 .text
= "List of environment variables to update in the session "
754 "environment when a client is attached."
757 { .name
= "visual-activity",
758 .type
= OPTIONS_TABLE_CHOICE
,
759 .scope
= OPTIONS_TABLE_SESSION
,
760 .choices
= options_table_visual_bell_list
,
761 .default_num
= VISUAL_OFF
,
762 .text
= "How activity alerts should be shown: a message ('on'), "
763 "a message and a bell ('both') or nothing ('off')."
766 { .name
= "visual-bell",
767 .type
= OPTIONS_TABLE_CHOICE
,
768 .scope
= OPTIONS_TABLE_SESSION
,
769 .choices
= options_table_visual_bell_list
,
770 .default_num
= VISUAL_OFF
,
771 .text
= "How bell alerts should be shown: a message ('on'), "
772 "a message and a bell ('both') or nothing ('off')."
775 { .name
= "visual-silence",
776 .type
= OPTIONS_TABLE_CHOICE
,
777 .scope
= OPTIONS_TABLE_SESSION
,
778 .choices
= options_table_visual_bell_list
,
779 .default_num
= VISUAL_OFF
,
780 .text
= "How silence alerts should be shown: a message ('on'), "
781 "a message and a bell ('both') or nothing ('off')."
784 { .name
= "word-separators",
785 .type
= OPTIONS_TABLE_STRING
,
786 .scope
= OPTIONS_TABLE_SESSION
,
788 * The set of non-alphanumeric printable ASCII characters minus the
791 .default_str
= "!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~",
792 .text
= "Characters considered to separate words."
795 /* Window options. */
796 { .name
= "aggressive-resize",
797 .type
= OPTIONS_TABLE_FLAG
,
798 .scope
= OPTIONS_TABLE_WINDOW
,
800 .text
= "When 'window-size' is 'smallest', whether the maximum size "
801 "of a window is the smallest attached session where it is "
802 "the current window ('on') or the smallest session it is "
806 { .name
= "allow-passthrough",
807 .type
= OPTIONS_TABLE_FLAG
,
808 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
810 .text
= "Whether applications are allowed to use the escape sequence "
814 { .name
= "allow-rename",
815 .type
= OPTIONS_TABLE_FLAG
,
816 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
818 .text
= "Whether applications are allowed to use the escape sequence "
822 { .name
= "alternate-screen",
823 .type
= OPTIONS_TABLE_FLAG
,
824 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
826 .text
= "Whether applications are allowed to use the alternate "
830 { .name
= "automatic-rename",
831 .type
= OPTIONS_TABLE_FLAG
,
832 .scope
= OPTIONS_TABLE_WINDOW
,
834 .text
= "Whether windows are automatically renamed."
837 { .name
= "automatic-rename-format",
838 .type
= OPTIONS_TABLE_STRING
,
839 .scope
= OPTIONS_TABLE_WINDOW
,
840 .default_str
= "#{?pane_in_mode,[tmux],#{pane_current_command}}"
841 "#{?pane_dead,[dead],}",
842 .text
= "Format used to automatically rename windows."
845 { .name
= "clock-mode-colour",
846 .type
= OPTIONS_TABLE_COLOUR
,
847 .scope
= OPTIONS_TABLE_WINDOW
,
849 .text
= "Colour of the clock in clock mode."
852 { .name
= "clock-mode-style",
853 .type
= OPTIONS_TABLE_CHOICE
,
854 .scope
= OPTIONS_TABLE_WINDOW
,
855 .choices
= options_table_clock_mode_style_list
,
857 .text
= "Time format of the clock in clock mode."
860 { .name
= "copy-mode-match-style",
861 .type
= OPTIONS_TABLE_STRING
,
862 .scope
= OPTIONS_TABLE_WINDOW
,
863 .default_str
= "bg=cyan,fg=black",
864 .flags
= OPTIONS_TABLE_IS_STYLE
,
866 .text
= "Style of search matches in copy mode."
869 { .name
= "copy-mode-current-match-style",
870 .type
= OPTIONS_TABLE_STRING
,
871 .scope
= OPTIONS_TABLE_WINDOW
,
872 .default_str
= "bg=magenta,fg=black",
873 .flags
= OPTIONS_TABLE_IS_STYLE
,
875 .text
= "Style of the current search match in copy mode."
878 { .name
= "copy-mode-mark-style",
879 .type
= OPTIONS_TABLE_STRING
,
880 .scope
= OPTIONS_TABLE_WINDOW
,
881 .default_str
= "bg=red,fg=black",
882 .flags
= OPTIONS_TABLE_IS_STYLE
,
884 .text
= "Style of the marked line in copy mode."
887 { .name
= "fill-character",
888 .type
= OPTIONS_TABLE_STRING
,
889 .scope
= OPTIONS_TABLE_WINDOW
,
891 .text
= "Character used to fill unused parts of window."
894 { .name
= "main-pane-height",
895 .type
= OPTIONS_TABLE_STRING
,
896 .scope
= OPTIONS_TABLE_WINDOW
,
898 .text
= "Height of the main pane in the 'main-horizontal' layout. "
899 "This may be a percentage, for example '10%'."
902 { .name
= "main-pane-width",
903 .type
= OPTIONS_TABLE_STRING
,
904 .scope
= OPTIONS_TABLE_WINDOW
,
906 .text
= "Width of the main pane in the 'main-vertical' layout. "
907 "This may be a percentage, for example '10%'."
910 { .name
= "mode-keys",
911 .type
= OPTIONS_TABLE_CHOICE
,
912 .scope
= OPTIONS_TABLE_WINDOW
,
913 .choices
= options_table_mode_keys_list
,
914 .default_num
= MODEKEY_EMACS
,
915 .text
= "Key set used in copy mode."
918 { .name
= "mode-style",
919 .type
= OPTIONS_TABLE_STRING
,
920 .scope
= OPTIONS_TABLE_WINDOW
,
921 .default_str
= "bg=yellow,fg=black",
922 .flags
= OPTIONS_TABLE_IS_STYLE
,
924 .text
= "Style of indicators and highlighting in modes."
927 { .name
= "monitor-activity",
928 .type
= OPTIONS_TABLE_FLAG
,
929 .scope
= OPTIONS_TABLE_WINDOW
,
931 .text
= "Whether an alert is triggered by activity."
934 { .name
= "monitor-bell",
935 .type
= OPTIONS_TABLE_FLAG
,
936 .scope
= OPTIONS_TABLE_WINDOW
,
938 .text
= "Whether an alert is triggered by a bell."
941 { .name
= "monitor-silence",
942 .type
= OPTIONS_TABLE_NUMBER
,
943 .scope
= OPTIONS_TABLE_WINDOW
,
947 .text
= "Time after which an alert is triggered by silence. "
948 "Zero means no alert."
952 { .name
= "other-pane-height",
953 .type
= OPTIONS_TABLE_STRING
,
954 .scope
= OPTIONS_TABLE_WINDOW
,
956 .text
= "Height of the other panes in the 'main-horizontal' layout. "
957 "This may be a percentage, for example '10%'."
960 { .name
= "other-pane-width",
961 .type
= OPTIONS_TABLE_STRING
,
962 .scope
= OPTIONS_TABLE_WINDOW
,
964 .text
= "Height of the other panes in the 'main-vertical' layout. "
965 "This may be a percentage, for example '10%'."
968 { .name
= "pane-active-border-style",
969 .type
= OPTIONS_TABLE_STRING
,
970 .scope
= OPTIONS_TABLE_WINDOW
,
971 .default_str
= "#{?pane_in_mode,fg=yellow,#{?synchronize-panes,fg=red,fg=green}}",
972 .flags
= OPTIONS_TABLE_IS_STYLE
,
974 .text
= "Style of the active pane border."
977 { .name
= "pane-base-index",
978 .type
= OPTIONS_TABLE_NUMBER
,
979 .scope
= OPTIONS_TABLE_WINDOW
,
981 .maximum
= USHRT_MAX
,
983 .text
= "Index of the first pane in each window."
986 { .name
= "pane-border-format",
987 .type
= OPTIONS_TABLE_STRING
,
988 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
989 .default_str
= "#{?pane_active,#[reverse],}#{pane_index}#[default] "
991 .text
= "Format of text in the pane status lines."
994 { .name
= "pane-border-indicators",
995 .type
= OPTIONS_TABLE_CHOICE
,
996 .scope
= OPTIONS_TABLE_WINDOW
,
997 .choices
= options_table_pane_border_indicators_list
,
998 .default_num
= PANE_BORDER_COLOUR
,
999 .text
= "Whether to indicate the active pane by colouring border or "
1000 "displaying arrow markers."
1003 { .name
= "pane-border-lines",
1004 .type
= OPTIONS_TABLE_CHOICE
,
1005 .scope
= OPTIONS_TABLE_WINDOW
,
1006 .choices
= options_table_pane_border_lines_list
,
1007 .default_num
= PANE_LINES_SINGLE
,
1008 .text
= "Type of characters used to draw pane border lines. Some of "
1009 "these are only supported on terminals with UTF-8 support."
1012 { .name
= "pane-border-status",
1013 .type
= OPTIONS_TABLE_CHOICE
,
1014 .scope
= OPTIONS_TABLE_WINDOW
,
1015 .choices
= options_table_pane_status_list
,
1016 .default_num
= PANE_STATUS_OFF
,
1017 .text
= "Position of the pane status lines."
1020 { .name
= "pane-border-style",
1021 .type
= OPTIONS_TABLE_STRING
,
1022 .scope
= OPTIONS_TABLE_WINDOW
,
1023 .default_str
= "default",
1024 .flags
= OPTIONS_TABLE_IS_STYLE
,
1026 .text
= "Style of the pane status lines."
1029 { .name
= "pane-colours",
1030 .type
= OPTIONS_TABLE_COLOUR
,
1031 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
1033 .flags
= OPTIONS_TABLE_IS_ARRAY
,
1034 .text
= "The default colour palette for colours zero to 255."
1037 { .name
= "popup-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 popups."
1046 { .name
= "popup-border-style",
1047 .type
= OPTIONS_TABLE_STRING
,
1048 .scope
= OPTIONS_TABLE_WINDOW
,
1049 .default_str
= "default",
1050 .flags
= OPTIONS_TABLE_IS_STYLE
,
1052 .text
= "Default style of popup borders."
1055 { .name
= "popup-border-lines",
1056 .type
= OPTIONS_TABLE_CHOICE
,
1057 .scope
= OPTIONS_TABLE_WINDOW
,
1058 .choices
= options_table_popup_border_lines_list
,
1059 .default_num
= BOX_LINES_SINGLE
,
1060 .text
= "Type of characters used to draw popup border lines. Some of "
1061 "these are only supported on terminals with UTF-8 support."
1064 { .name
= "remain-on-exit",
1065 .type
= OPTIONS_TABLE_CHOICE
,
1066 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
1067 .choices
= options_table_remain_on_exit_list
,
1069 .text
= "Whether panes should remain ('on') or be automatically "
1070 "killed ('off' or 'failed') when the program inside exits."
1073 { .name
= "remain-on-exit-format",
1074 .type
= OPTIONS_TABLE_STRING
,
1075 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
1076 .default_str
= "Pane is dead ("
1077 "#{?#{!=:#{pane_dead_status},},"
1078 "status #{pane_dead_status},}"
1079 "#{?#{!=:#{pane_dead_signal},},"
1080 "signal #{pane_dead_signal},}, "
1081 "#{t:pane_dead_time})",
1082 .text
= "Message shown after the program in a pane has exited, if "
1083 "remain-on-exit is enabled."
1086 { .name
= "scroll-on-clear",
1087 .type
= OPTIONS_TABLE_FLAG
,
1088 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
1090 .text
= "Whether the contents of the screen should be scrolled into"
1091 "history when clearing the whole screen."
1094 { .name
= "synchronize-panes",
1095 .type
= OPTIONS_TABLE_FLAG
,
1096 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
1098 .text
= "Whether typing should be sent to all panes simultaneously."
1101 { .name
= "window-active-style",
1102 .type
= OPTIONS_TABLE_STRING
,
1103 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
1104 .default_str
= "default",
1105 .flags
= OPTIONS_TABLE_IS_STYLE
,
1107 .text
= "Default style of the active pane."
1110 { .name
= "window-size",
1111 .type
= OPTIONS_TABLE_CHOICE
,
1112 .scope
= OPTIONS_TABLE_WINDOW
,
1113 .choices
= options_table_window_size_list
,
1114 .default_num
= WINDOW_SIZE_LATEST
,
1115 .text
= "How window size is calculated. "
1116 "'latest' uses the size of the most recently used client, "
1117 "'largest' the largest client, 'smallest' the smallest "
1118 "client and 'manual' a size set by the 'resize-window' "
1122 { .name
= "window-style",
1123 .type
= OPTIONS_TABLE_STRING
,
1124 .scope
= OPTIONS_TABLE_WINDOW
|OPTIONS_TABLE_PANE
,
1125 .default_str
= "default",
1126 .flags
= OPTIONS_TABLE_IS_STYLE
,
1128 .text
= "Default style of panes that are not the active pane."
1131 { .name
= "window-status-activity-style",
1132 .type
= OPTIONS_TABLE_STRING
,
1133 .scope
= OPTIONS_TABLE_WINDOW
,
1134 .default_str
= "reverse",
1135 .flags
= OPTIONS_TABLE_IS_STYLE
,
1137 .text
= "Style of windows in the status line with an activity alert."
1140 { .name
= "window-status-bell-style",
1141 .type
= OPTIONS_TABLE_STRING
,
1142 .scope
= OPTIONS_TABLE_WINDOW
,
1143 .default_str
= "reverse",
1144 .flags
= OPTIONS_TABLE_IS_STYLE
,
1146 .text
= "Style of windows in the status line with a bell alert."
1149 { .name
= "window-status-current-format",
1150 .type
= OPTIONS_TABLE_STRING
,
1151 .scope
= OPTIONS_TABLE_WINDOW
,
1152 .default_str
= "#I:#W#{?window_flags,#{window_flags}, }",
1153 .text
= "Format of the current window in the status line."
1156 { .name
= "window-status-current-style",
1157 .type
= OPTIONS_TABLE_STRING
,
1158 .scope
= OPTIONS_TABLE_WINDOW
,
1159 .default_str
= "default",
1160 .flags
= OPTIONS_TABLE_IS_STYLE
,
1162 .text
= "Style of the current window in the status line."
1165 { .name
= "window-status-format",
1166 .type
= OPTIONS_TABLE_STRING
,
1167 .scope
= OPTIONS_TABLE_WINDOW
,
1168 .default_str
= "#I:#W#{?window_flags,#{window_flags}, }",
1169 .text
= "Format of windows in the status line, except the current "
1173 { .name
= "window-status-last-style",
1174 .type
= OPTIONS_TABLE_STRING
,
1175 .scope
= OPTIONS_TABLE_WINDOW
,
1176 .default_str
= "default",
1177 .flags
= OPTIONS_TABLE_IS_STYLE
,
1179 .text
= "Style of the last window in the status line."
1182 { .name
= "window-status-separator",
1183 .type
= OPTIONS_TABLE_STRING
,
1184 .scope
= OPTIONS_TABLE_WINDOW
,
1186 .text
= "Separator between windows in the status line."
1189 { .name
= "window-status-style",
1190 .type
= OPTIONS_TABLE_STRING
,
1191 .scope
= OPTIONS_TABLE_WINDOW
,
1192 .default_str
= "default",
1193 .flags
= OPTIONS_TABLE_IS_STYLE
,
1195 .text
= "Style of windows in the status line, except the current and "
1199 { .name
= "wrap-search",
1200 .type
= OPTIONS_TABLE_FLAG
,
1201 .scope
= OPTIONS_TABLE_WINDOW
,
1203 .text
= "Whether searching in copy mode should wrap at the top or "
1207 { .name
= "xterm-keys", /* no longer used */
1208 .type
= OPTIONS_TABLE_FLAG
,
1209 .scope
= OPTIONS_TABLE_WINDOW
,
1211 .text
= "Whether xterm-style function key sequences should be sent. "
1212 "This option is no longer used."
1216 OPTIONS_TABLE_HOOK("after-bind-key", ""),
1217 OPTIONS_TABLE_HOOK("after-capture-pane", ""),
1218 OPTIONS_TABLE_HOOK("after-copy-mode", ""),
1219 OPTIONS_TABLE_HOOK("after-display-message", ""),
1220 OPTIONS_TABLE_HOOK("after-display-panes", ""),
1221 OPTIONS_TABLE_HOOK("after-kill-pane", ""),
1222 OPTIONS_TABLE_HOOK("after-list-buffers", ""),
1223 OPTIONS_TABLE_HOOK("after-list-clients", ""),
1224 OPTIONS_TABLE_HOOK("after-list-keys", ""),
1225 OPTIONS_TABLE_HOOK("after-list-panes", ""),
1226 OPTIONS_TABLE_HOOK("after-list-sessions", ""),
1227 OPTIONS_TABLE_HOOK("after-list-windows", ""),
1228 OPTIONS_TABLE_HOOK("after-load-buffer", ""),
1229 OPTIONS_TABLE_HOOK("after-lock-server", ""),
1230 OPTIONS_TABLE_HOOK("after-new-session", ""),
1231 OPTIONS_TABLE_HOOK("after-new-window", ""),
1232 OPTIONS_TABLE_HOOK("after-paste-buffer", ""),
1233 OPTIONS_TABLE_HOOK("after-pipe-pane", ""),
1234 OPTIONS_TABLE_HOOK("after-queue", ""),
1235 OPTIONS_TABLE_HOOK("after-refresh-client", ""),
1236 OPTIONS_TABLE_HOOK("after-rename-session", ""),
1237 OPTIONS_TABLE_HOOK("after-rename-window", ""),
1238 OPTIONS_TABLE_HOOK("after-resize-pane", ""),
1239 OPTIONS_TABLE_HOOK("after-resize-window", ""),
1240 OPTIONS_TABLE_HOOK("after-save-buffer", ""),
1241 OPTIONS_TABLE_HOOK("after-select-layout", ""),
1242 OPTIONS_TABLE_HOOK("after-select-pane", ""),
1243 OPTIONS_TABLE_HOOK("after-select-window", ""),
1244 OPTIONS_TABLE_HOOK("after-send-keys", ""),
1245 OPTIONS_TABLE_HOOK("after-set-buffer", ""),
1246 OPTIONS_TABLE_HOOK("after-set-environment", ""),
1247 OPTIONS_TABLE_HOOK("after-set-hook", ""),
1248 OPTIONS_TABLE_HOOK("after-set-option", ""),
1249 OPTIONS_TABLE_HOOK("after-show-environment", ""),
1250 OPTIONS_TABLE_HOOK("after-show-messages", ""),
1251 OPTIONS_TABLE_HOOK("after-show-options", ""),
1252 OPTIONS_TABLE_HOOK("after-split-window", ""),
1253 OPTIONS_TABLE_HOOK("after-unbind-key", ""),
1254 OPTIONS_TABLE_HOOK("alert-activity", ""),
1255 OPTIONS_TABLE_HOOK("alert-bell", ""),
1256 OPTIONS_TABLE_HOOK("alert-silence", ""),
1257 OPTIONS_TABLE_HOOK("client-active", ""),
1258 OPTIONS_TABLE_HOOK("client-attached", ""),
1259 OPTIONS_TABLE_HOOK("client-detached", ""),
1260 OPTIONS_TABLE_HOOK("client-focus-in", ""),
1261 OPTIONS_TABLE_HOOK("client-focus-out", ""),
1262 OPTIONS_TABLE_HOOK("client-resized", ""),
1263 OPTIONS_TABLE_HOOK("client-session-changed", ""),
1264 OPTIONS_TABLE_PANE_HOOK("pane-died", ""),
1265 OPTIONS_TABLE_PANE_HOOK("pane-exited", ""),
1266 OPTIONS_TABLE_PANE_HOOK("pane-focus-in", ""),
1267 OPTIONS_TABLE_PANE_HOOK("pane-focus-out", ""),
1268 OPTIONS_TABLE_PANE_HOOK("pane-mode-changed", ""),
1269 OPTIONS_TABLE_PANE_HOOK("pane-set-clipboard", ""),
1270 OPTIONS_TABLE_PANE_HOOK("pane-title-changed", ""),
1271 OPTIONS_TABLE_HOOK("session-closed", ""),
1272 OPTIONS_TABLE_HOOK("session-created", ""),
1273 OPTIONS_TABLE_HOOK("session-renamed", ""),
1274 OPTIONS_TABLE_HOOK("session-window-changed", ""),
1275 OPTIONS_TABLE_WINDOW_HOOK("window-layout-changed", ""),
1276 OPTIONS_TABLE_HOOK("window-linked", ""),
1277 OPTIONS_TABLE_WINDOW_HOOK("window-pane-changed", ""),
1278 OPTIONS_TABLE_WINDOW_HOOK("window-renamed", ""),
1279 OPTIONS_TABLE_WINDOW_HOOK("window-resized", ""),
1280 OPTIONS_TABLE_HOOK("window-unlinked", ""),