[BACK]Return to options-table.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Annotation of src/usr.bin/tmux/options-table.c, Revision 1.168

1.168   ! nicm        1: /* $OpenBSD: options-table.c,v 1.167 2023/08/15 07:01:47 nicm Exp $ */
1.1       nicm        2:
                      3: /*
1.71      nicm        4:  * Copyright (c) 2011 Nicholas Marriott <nicholas.marriott@gmail.com>
1.1       nicm        5:  *
                      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.
                      9:  *
                     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.
                     17:  */
                     18:
                     19: #include <sys/types.h>
                     20:
                     21: #include <string.h>
                     22: #include <paths.h>
                     23:
                     24: #include "tmux.h"
                     25:
                     26: /*
                     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
1.49      nicm       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.
1.1       nicm       33:  */
                     34:
                     35: /* Choice option type lists. */
1.74      nicm       36: static const char *options_table_mode_keys_list[] = {
1.1       nicm       37:        "emacs", "vi", NULL
                     38: };
1.74      nicm       39: static const char *options_table_clock_mode_style_list[] = {
1.1       nicm       40:        "12", "24", NULL
                     41: };
1.99      nicm       42: static const char *options_table_status_list[] = {
                     43:        "off", "on", "2", "3", "4", "5", NULL
                     44: };
1.165     nicm       45: static const char *options_table_message_line_list[] = {
                     46:        "0", "1", "2", "3", "4", NULL
                     47: };
1.74      nicm       48: static const char *options_table_status_keys_list[] = {
1.1       nicm       49:        "emacs", "vi", NULL
                     50: };
1.74      nicm       51: static const char *options_table_status_justify_list[] = {
1.140     nicm       52:        "left", "centre", "right", "absolute-centre", NULL
1.1       nicm       53: };
1.74      nicm       54: static const char *options_table_status_position_list[] = {
1.20      nicm       55:        "top", "bottom", NULL
                     56: };
1.74      nicm       57: static const char *options_table_bell_action_list[] = {
1.59      nicm       58:        "none", "any", "current", "other", NULL
1.1       nicm       59: };
1.91      nicm       60: static const char *options_table_visual_bell_list[] = {
                     61:        "off", "on", "both", NULL
                     62: };
1.154     nicm       63: static const char *options_table_cursor_style_list[] = {
                     64:        "default", "blinking-block", "block", "blinking-underline", "underline",
                     65:        "blinking-bar", "bar", NULL
                     66: };
1.74      nicm       67: static const char *options_table_pane_status_list[] = {
1.72      nicm       68:        "off", "top", "bottom", NULL
                     69: };
1.156     nicm       70: static const char *options_table_pane_border_indicators_list[] = {
                     71:        "off", "colour", "arrows", "both", NULL
                     72: };
1.152     nicm       73: static const char *options_table_pane_border_lines_list[] = {
1.129     nicm       74:        "single", "double", "heavy", "simple", "number", NULL
                     75: };
1.152     nicm       76: static const char *options_table_popup_border_lines_list[] = {
                     77:        "single", "double", "heavy", "simple", "rounded", "padded", "none", NULL
                     78: };
1.89      nicm       79: static const char *options_table_set_clipboard_list[] = {
                     80:        "off", "external", "on", NULL
                     81: };
1.97      nicm       82: static const char *options_table_window_size_list[] = {
1.111     nicm       83:        "largest", "smallest", "manual", "latest", NULL
1.97      nicm       84: };
1.137     nicm       85: static const char *options_table_remain_on_exit_list[] = {
                     86:        "off", "on", "failed", NULL
                     87: };
1.139     nicm       88: static const char *options_table_detach_on_destroy_list[] = {
1.168   ! nicm       89:        "off", "on", "no-detached", "previous", "next", NULL
1.139     nicm       90: };
1.141     nicm       91: static const char *options_table_extended_keys_list[] = {
                     92:        "off", "on", "always", NULL
                     93: };
1.164     nicm       94: static const char *options_table_allow_passthrough_list[] = {
                     95:        "off", "on", "all", NULL
                     96: };
1.1       nicm       97:
1.99      nicm       98: /* Status line format. */
                     99: #define OPTIONS_TABLE_STATUS_FORMAT1 \
1.150     nicm      100:        "#[align=left range=left #{E:status-left-style}]" \
1.114     nicm      101:        "#[push-default]" \
                    102:        "#{T;=/#{status-left-length}:status-left}" \
                    103:        "#[pop-default]" \
                    104:        "#[norange default]" \
1.99      nicm      105:        "#[list=on align=#{status-justify}]" \
                    106:        "#[list=left-marker]<#[list=right-marker]>#[list=on]" \
                    107:        "#{W:" \
1.101     nicm      108:                "#[range=window|#{window_index} " \
1.150     nicm      109:                        "#{E:window-status-style}" \
1.101     nicm      110:                        "#{?#{&&:#{window_last_flag}," \
1.150     nicm      111:                                "#{!=:#{E:window-status-last-style},default}}, " \
                    112:                                "#{E:window-status-last-style}," \
1.101     nicm      113:                        "}" \
                    114:                        "#{?#{&&:#{window_bell_flag}," \
1.150     nicm      115:                                "#{!=:#{E:window-status-bell-style},default}}, " \
                    116:                                "#{E:window-status-bell-style}," \
1.102     nicm      117:                                "#{?#{&&:#{||:#{window_activity_flag}," \
                    118:                                             "#{window_silence_flag}}," \
1.101     nicm      119:                                        "#{!=:" \
1.150     nicm      120:                                        "#{E:window-status-activity-style}," \
1.101     nicm      121:                                        "default}}, " \
1.150     nicm      122:                                        "#{E:window-status-activity-style}," \
1.99      nicm      123:                                "}" \
1.101     nicm      124:                        "}" \
1.99      nicm      125:                "]" \
1.110     nicm      126:                "#[push-default]" \
1.99      nicm      127:                "#{T:window-status-format}" \
1.110     nicm      128:                "#[pop-default]" \
1.99      nicm      129:                "#[norange default]" \
                    130:                "#{?window_end_flag,,#{window-status-separator}}" \
                    131:        "," \
1.101     nicm      132:                "#[range=window|#{window_index} list=focus " \
1.150     nicm      133:                        "#{?#{!=:#{E:window-status-current-style},default}," \
                    134:                                "#{E:window-status-current-style}," \
                    135:                                "#{E:window-status-style}" \
1.127     nicm      136:                        "}" \
1.101     nicm      137:                        "#{?#{&&:#{window_last_flag}," \
1.150     nicm      138:                                "#{!=:#{E:window-status-last-style},default}}, " \
                    139:                                "#{E:window-status-last-style}," \
1.101     nicm      140:                        "}" \
                    141:                        "#{?#{&&:#{window_bell_flag}," \
1.150     nicm      142:                                "#{!=:#{E:window-status-bell-style},default}}, " \
                    143:                                "#{E:window-status-bell-style}," \
1.102     nicm      144:                                "#{?#{&&:#{||:#{window_activity_flag}," \
                    145:                                             "#{window_silence_flag}}," \
1.101     nicm      146:                                        "#{!=:" \
1.150     nicm      147:                                        "#{E:window-status-activity-style}," \
1.101     nicm      148:                                        "default}}, " \
1.150     nicm      149:                                        "#{E:window-status-activity-style}," \
1.99      nicm      150:                                "}" \
1.101     nicm      151:                        "}" \
1.99      nicm      152:                "]" \
1.110     nicm      153:                "#[push-default]" \
1.99      nicm      154:                "#{T:window-status-current-format}" \
1.110     nicm      155:                "#[pop-default]" \
1.99      nicm      156:                "#[norange list=on default]" \
                    157:                "#{?window_end_flag,,#{window-status-separator}}" \
                    158:        "}" \
1.150     nicm      159:        "#[nolist align=right range=right #{E:status-right-style}]" \
1.114     nicm      160:        "#[push-default]" \
                    161:        "#{T;=/#{status-right-length}:status-right}" \
                    162:        "#[pop-default]" \
                    163:        "#[norange default]"
1.99      nicm      164: #define OPTIONS_TABLE_STATUS_FORMAT2 \
                    165:        "#[align=centre]#{P:#{?pane_active,#[reverse],}" \
                    166:        "#{pane_index}[#{pane_width}x#{pane_height}]#[default] }"
                    167: static const char *options_table_status_format_default[] = {
                    168:        OPTIONS_TABLE_STATUS_FORMAT1, OPTIONS_TABLE_STATUS_FORMAT2, NULL
                    169: };
                    170:
1.116     nicm      171: /* Helpers for hook options. */
1.105     nicm      172: #define OPTIONS_TABLE_HOOK(hook_name, default_value) \
                    173:        { .name = hook_name, \
                    174:          .type = OPTIONS_TABLE_COMMAND, \
                    175:          .scope = OPTIONS_TABLE_SESSION, \
                    176:          .flags = OPTIONS_TABLE_IS_ARRAY|OPTIONS_TABLE_IS_HOOK, \
                    177:          .default_str = default_value, \
                    178:          .separator = "" \
                    179:        }
                    180:
1.116     nicm      181: #define OPTIONS_TABLE_PANE_HOOK(hook_name, default_value) \
                    182:        { .name = hook_name, \
                    183:          .type = OPTIONS_TABLE_COMMAND, \
                    184:          .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE, \
                    185:          .flags = OPTIONS_TABLE_IS_ARRAY|OPTIONS_TABLE_IS_HOOK, \
                    186:          .default_str = default_value, \
                    187:          .separator = "" \
                    188:        }
                    189:
                    190: #define OPTIONS_TABLE_WINDOW_HOOK(hook_name, default_value) \
                    191:        { .name = hook_name, \
                    192:          .type = OPTIONS_TABLE_COMMAND, \
                    193:          .scope = OPTIONS_TABLE_WINDOW, \
                    194:          .flags = OPTIONS_TABLE_IS_ARRAY|OPTIONS_TABLE_IS_HOOK, \
                    195:          .default_str = default_value, \
                    196:          .separator = "" \
                    197:        }
1.134     nicm      198:
                    199: /* Map of name conversions. */
                    200: const struct options_name_map options_other_names[] = {
                    201:        { "display-panes-color", "display-panes-colour" },
                    202:        { "display-panes-active-color", "display-panes-active-colour" },
                    203:        { "clock-mode-color", "clock-mode-colour" },
1.153     nicm      204:        { "cursor-color", "cursor-colour" },
1.149     nicm      205:        { "pane-colors", "pane-colours" },
1.134     nicm      206:        { NULL, NULL }
                    207: };
1.116     nicm      208:
1.80      nicm      209: /* Top-level options. */
1.67      nicm      210: const struct options_table_entry options_table[] = {
1.105     nicm      211:        /* Server options. */
1.112     nicm      212:        { .name = "backspace",
                    213:          .type = OPTIONS_TABLE_KEY,
                    214:          .scope = OPTIONS_TABLE_SERVER,
                    215:          .default_num = '\177',
1.127     nicm      216:          .text = "The key to send for backspace."
1.112     nicm      217:        },
                    218:
1.1       nicm      219:        { .name = "buffer-limit",
                    220:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      221:          .scope = OPTIONS_TABLE_SERVER,
1.1       nicm      222:          .minimum = 1,
                    223:          .maximum = INT_MAX,
1.127     nicm      224:          .default_num = 50,
                    225:          .text = "The maximum number of automatic buffers. "
                    226:                  "When this is reached, the oldest buffer is deleted."
1.83      nicm      227:        },
                    228:
                    229:        { .name = "command-alias",
1.104     nicm      230:          .type = OPTIONS_TABLE_STRING,
1.83      nicm      231:          .scope = OPTIONS_TABLE_SERVER,
1.104     nicm      232:          .flags = OPTIONS_TABLE_IS_ARRAY,
1.83      nicm      233:          .default_str = "split-pane=split-window,"
1.84      nicm      234:                         "splitp=split-window,"
                    235:                         "server-info=show-messages -JT,"
1.88      nicm      236:                         "info=show-messages -JT,"
                    237:                         "choose-window=choose-tree -w,"
                    238:                         "choose-session=choose-tree -s",
1.127     nicm      239:          .separator = ",",
                    240:          .text = "Array of command aliases. "
                    241:                  "Each entry is an alias and a command separated by '='."
1.117     nicm      242:        },
                    243:
                    244:        { .name = "copy-command",
                    245:          .type = OPTIONS_TABLE_STRING,
                    246:          .scope = OPTIONS_TABLE_SERVER,
1.127     nicm      247:          .default_str = "",
                    248:          .text = "Shell command run when text is copied. "
                    249:                  "If empty, no command is run."
1.153     nicm      250:        },
                    251:
                    252:        { .name = "cursor-colour",
                    253:          .type = OPTIONS_TABLE_COLOUR,
                    254:          .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
                    255:          .default_num = -1,
                    256:          .text = "Colour of the cursor."
1.154     nicm      257:        },
                    258:
                    259:        { .name = "cursor-style",
                    260:          .type = OPTIONS_TABLE_CHOICE,
                    261:          .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
                    262:          .choices = options_table_cursor_style_list,
                    263:          .default_num = 0,
                    264:          .text = "Style of the cursor."
1.81      nicm      265:        },
                    266:
1.56      nicm      267:        { .name = "default-terminal",
                    268:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      269:          .scope = OPTIONS_TABLE_SERVER,
1.145     nicm      270:          .default_str = TMUX_TERM,
1.127     nicm      271:          .text = "Default for the 'TERM' environment variable."
1.125     nicm      272:        },
                    273:
                    274:        { .name = "editor",
                    275:          .type = OPTIONS_TABLE_STRING,
                    276:          .scope = OPTIONS_TABLE_SERVER,
1.127     nicm      277:          .default_str = _PATH_VI,
                    278:          .text = "Editor run to edit files."
1.56      nicm      279:        },
                    280:
1.1       nicm      281:        { .name = "escape-time",
                    282:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      283:          .scope = OPTIONS_TABLE_SERVER,
1.1       nicm      284:          .minimum = 0,
                    285:          .maximum = INT_MAX,
1.127     nicm      286:          .default_num = 500,
1.162     nicm      287:          .unit = "milliseconds",
1.127     nicm      288:          .text = "Time to wait before assuming a key is Escape."
1.95      nicm      289:        },
                    290:
                    291:        { .name = "exit-empty",
                    292:          .type = OPTIONS_TABLE_FLAG,
                    293:          .scope = OPTIONS_TABLE_SERVER,
1.127     nicm      294:          .default_num = 1,
                    295:          .text = "Whether the server should exit if there are no sessions."
1.1       nicm      296:        },
                    297:
                    298:        { .name = "exit-unattached",
1.38      nicm      299:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      300:          .scope = OPTIONS_TABLE_SERVER,
1.127     nicm      301:          .default_num = 0,
                    302:          .text = "Whether the server should exit if there are no attached "
                    303:                  "clients."
1.131     nicm      304:        },
                    305:
                    306:        { .name = "extended-keys",
1.141     nicm      307:          .type = OPTIONS_TABLE_CHOICE,
1.131     nicm      308:          .scope = OPTIONS_TABLE_SERVER,
1.141     nicm      309:          .choices = options_table_extended_keys_list,
1.131     nicm      310:          .default_num = 0,
                    311:          .text = "Whether to request extended key sequences from terminals "
1.157     nicm      312:                  "that support it."
1.38      nicm      313:        },
                    314:
                    315:        { .name = "focus-events",
1.1       nicm      316:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      317:          .scope = OPTIONS_TABLE_SERVER,
1.127     nicm      318:          .default_num = 0,
                    319:          .text = "Whether to send focus events to applications."
1.61      nicm      320:        },
                    321:
                    322:        { .name = "history-file",
                    323:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      324:          .scope = OPTIONS_TABLE_SERVER,
1.127     nicm      325:          .default_str = "",
                    326:          .text = "Location of the command prompt history file. "
                    327:                  "Empty does not write a history file."
1.166     nicm      328:        },
                    329:
                    330:        { .name = "menu-style",
                    331:          .type = OPTIONS_TABLE_STRING,
                    332:          .scope = OPTIONS_TABLE_WINDOW,
                    333:          .flags = OPTIONS_TABLE_IS_STYLE,
                    334:          .default_str = "default",
                    335:          .separator = ",",
                    336:          .text = "Default style of menu."
                    337:        },
                    338:
1.167     nicm      339:        { .name = "menu-selected-style",
                    340:          .type = OPTIONS_TABLE_STRING,
                    341:          .scope = OPTIONS_TABLE_WINDOW,
                    342:          .flags = OPTIONS_TABLE_IS_STYLE,
                    343:          .default_str = "bg=yellow,fg=black",
                    344:          .separator = ",",
                    345:          .text = "Default style of selected menu item."
                    346:        },
                    347:
1.166     nicm      348:        { .name = "menu-border-style",
                    349:          .type = OPTIONS_TABLE_STRING,
                    350:          .scope = OPTIONS_TABLE_WINDOW,
                    351:          .default_str = "default",
                    352:          .flags = OPTIONS_TABLE_IS_STYLE,
                    353:          .separator = ",",
                    354:          .text = "Default style of menu borders."
                    355:        },
                    356:
                    357:        { .name = "menu-border-lines",
                    358:          .type = OPTIONS_TABLE_CHOICE,
                    359:          .scope = OPTIONS_TABLE_WINDOW,
                    360:          .choices = options_table_popup_border_lines_list,
                    361:          .default_num = BOX_LINES_SINGLE,
                    362:          .text = "Type of characters used to draw menu border lines. Some of "
                    363:                  "these are only supported on terminals with UTF-8 support."
1.1       nicm      364:        },
                    365:
1.46      nicm      366:        { .name = "message-limit",
                    367:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      368:          .scope = OPTIONS_TABLE_SERVER,
1.46      nicm      369:          .minimum = 0,
                    370:          .maximum = INT_MAX,
1.127     nicm      371:          .default_num = 1000,
                    372:          .text = "Maximum number of server messages to keep."
1.142     nicm      373:        },
                    374:
                    375:        { .name = "prompt-history-limit",
                    376:          .type = OPTIONS_TABLE_NUMBER,
                    377:          .scope = OPTIONS_TABLE_SERVER,
                    378:          .minimum = 0,
                    379:          .maximum = INT_MAX,
                    380:          .default_num = 100,
                    381:          .text = "Maximum number of commands to keep in history."
1.1       nicm      382:        },
                    383:
1.8       nicm      384:        { .name = "set-clipboard",
1.89      nicm      385:          .type = OPTIONS_TABLE_CHOICE,
1.67      nicm      386:          .scope = OPTIONS_TABLE_SERVER,
1.89      nicm      387:          .choices = options_table_set_clipboard_list,
1.127     nicm      388:          .default_num = 1,
                    389:          .text = "Whether to attempt to set the system clipboard ('on' or "
                    390:                  "'external') and whether to allow applications to create "
                    391:                  "paste buffers with an escape sequence ('on' only)."
1.8       nicm      392:        },
                    393:
1.45      nicm      394:        { .name = "terminal-overrides",
1.104     nicm      395:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      396:          .scope = OPTIONS_TABLE_SERVER,
1.104     nicm      397:          .flags = OPTIONS_TABLE_IS_ARRAY,
1.122     nicm      398:          .default_str = "",
1.127     nicm      399:          .separator = ",",
                    400:          .text = "List of terminal capabilities overrides."
1.118     nicm      401:        },
                    402:
                    403:        { .name = "terminal-features",
                    404:          .type = OPTIONS_TABLE_STRING,
                    405:          .scope = OPTIONS_TABLE_SERVER,
                    406:          .flags = OPTIONS_TABLE_IS_ARRAY,
1.132     nicm      407:          .default_str = "xterm*:clipboard:ccolour:cstyle:focus:title,"
1.163     nicm      408:                         "screen*:title,"
                    409:                         "rxvt*:ignorefkeys",
1.127     nicm      410:          .separator = ",",
                    411:          .text = "List of terminal features, used if they cannot be "
                    412:                  "automatically detected."
1.90      nicm      413:        },
                    414:
                    415:        { .name = "user-keys",
1.104     nicm      416:          .type = OPTIONS_TABLE_STRING,
1.90      nicm      417:          .scope = OPTIONS_TABLE_SERVER,
1.104     nicm      418:          .flags = OPTIONS_TABLE_IS_ARRAY,
1.90      nicm      419:          .default_str = "",
1.127     nicm      420:          .separator = ",",
                    421:          .text = "User key assignments. "
                    422:                  "Each sequence in the list is translated into a key: "
                    423:                  "'User0', 'User1' and so on."
1.45      nicm      424:        },
                    425:
1.105     nicm      426:        /* Session options. */
1.91      nicm      427:        { .name = "activity-action",
                    428:          .type = OPTIONS_TABLE_CHOICE,
                    429:          .scope = OPTIONS_TABLE_SESSION,
                    430:          .choices = options_table_bell_action_list,
1.127     nicm      431:          .default_num = ALERT_OTHER,
                    432:          .text = "Action to take on an activity alert."
1.91      nicm      433:        },
                    434:
1.31      nicm      435:        { .name = "assume-paste-time",
                    436:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      437:          .scope = OPTIONS_TABLE_SESSION,
1.31      nicm      438:          .minimum = 0,
                    439:          .maximum = INT_MAX,
                    440:          .default_num = 1,
1.127     nicm      441:          .unit = "milliseconds",
1.144     nicm      442:          .text = "Maximum time between input to assume it is pasting rather "
1.127     nicm      443:                  "than typing."
1.31      nicm      444:        },
                    445:
1.1       nicm      446:        { .name = "base-index",
                    447:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      448:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      449:          .minimum = 0,
                    450:          .maximum = INT_MAX,
1.127     nicm      451:          .default_num = 0,
                    452:          .text = "Default index of the first window in each session."
1.1       nicm      453:        },
                    454:
                    455:        { .name = "bell-action",
                    456:          .type = OPTIONS_TABLE_CHOICE,
1.67      nicm      457:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      458:          .choices = options_table_bell_action_list,
1.127     nicm      459:          .default_num = ALERT_ANY,
                    460:          .text = "Action to take on a bell alert."
1.11      nicm      461:        },
                    462:
1.1       nicm      463:        { .name = "default-command",
                    464:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      465:          .scope = OPTIONS_TABLE_SESSION,
1.127     nicm      466:          .default_str = "",
                    467:          .text = "Default command to run in new panes. If empty, a shell is "
                    468:                  "started."
1.1       nicm      469:        },
                    470:
                    471:        { .name = "default-shell",
                    472:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      473:          .scope = OPTIONS_TABLE_SESSION,
1.127     nicm      474:          .default_str = _PATH_BSHELL,
                    475:          .text = "Location of default shell."
1.1       nicm      476:        },
                    477:
1.97      nicm      478:        { .name = "default-size",
                    479:          .type = OPTIONS_TABLE_STRING,
                    480:          .scope = OPTIONS_TABLE_SESSION,
                    481:          .pattern = "[0-9]*x[0-9]*",
1.127     nicm      482:          .default_str = "80x24",
                    483:          .text = "Initial size of new sessions."
1.97      nicm      484:        },
                    485:
1.1       nicm      486:        { .name = "destroy-unattached",
                    487:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      488:          .scope = OPTIONS_TABLE_SESSION,
1.127     nicm      489:          .default_num = 0,
                    490:          .text = "Whether to destroy sessions when they have no attached "
                    491:                  "clients."
1.1       nicm      492:        },
                    493:
                    494:        { .name = "detach-on-destroy",
1.139     nicm      495:          .type = OPTIONS_TABLE_CHOICE,
1.67      nicm      496:          .scope = OPTIONS_TABLE_SESSION,
1.139     nicm      497:          .choices = options_table_detach_on_destroy_list,
1.127     nicm      498:          .default_num = 1,
                    499:          .text = "Whether to detach when a session is destroyed, or switch "
                    500:                  "the client to another session if any exist."
1.1       nicm      501:        },
                    502:
                    503:        { .name = "display-panes-active-colour",
                    504:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      505:          .scope = OPTIONS_TABLE_SESSION,
1.127     nicm      506:          .default_num = 1,
                    507:          .text = "Colour of the active pane for 'display-panes'."
1.1       nicm      508:        },
                    509:
                    510:        { .name = "display-panes-colour",
                    511:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      512:          .scope = OPTIONS_TABLE_SESSION,
1.127     nicm      513:          .default_num = 4,
                    514:          .text = "Colour of not active panes for 'display-panes'."
1.1       nicm      515:        },
                    516:
                    517:        { .name = "display-panes-time",
                    518:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      519:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      520:          .minimum = 1,
                    521:          .maximum = INT_MAX,
1.127     nicm      522:          .default_num = 1000,
                    523:          .unit = "milliseconds",
                    524:          .text = "Time for which 'display-panes' should show pane numbers."
1.1       nicm      525:        },
                    526:
                    527:        { .name = "display-time",
                    528:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      529:          .scope = OPTIONS_TABLE_SESSION,
1.68      tim       530:          .minimum = 0,
1.1       nicm      531:          .maximum = INT_MAX,
1.127     nicm      532:          .default_num = 750,
                    533:          .unit = "milliseconds",
                    534:          .text = "Time for which status line messages should appear."
1.1       nicm      535:        },
                    536:
                    537:        { .name = "history-limit",
                    538:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      539:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      540:          .minimum = 0,
1.3       nicm      541:          .maximum = INT_MAX,
1.127     nicm      542:          .default_num = 2000,
                    543:          .unit = "lines",
                    544:          .text = "Maximum number of lines to keep in the history for each "
                    545:                  "pane. "
                    546:                  "If changed, the new value applies only to new panes."
1.70      nicm      547:        },
                    548:
                    549:        { .name = "key-table",
                    550:          .type = OPTIONS_TABLE_STRING,
                    551:          .scope = OPTIONS_TABLE_SESSION,
1.127     nicm      552:          .default_str = "root",
                    553:          .text = "Default key table. "
                    554:                  "Key presses are first looked up in this table."
1.1       nicm      555:        },
                    556:
                    557:        { .name = "lock-after-time",
                    558:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      559:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      560:          .minimum = 0,
                    561:          .maximum = INT_MAX,
1.127     nicm      562:          .default_num = 0,
                    563:          .unit = "seconds",
                    564:          .text = "Time after which a client is locked if not used."
1.1       nicm      565:        },
                    566:
                    567:        { .name = "lock-command",
                    568:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      569:          .scope = OPTIONS_TABLE_SESSION,
1.127     nicm      570:          .default_str = "lock -np",
                    571:          .text = "Shell command to run to lock a client."
1.1       nicm      572:        },
                    573:
1.43      nicm      574:        { .name = "message-command-style",
1.123     nicm      575:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      576:          .scope = OPTIONS_TABLE_SESSION,
1.123     nicm      577:          .default_str = "bg=black,fg=yellow",
                    578:          .flags = OPTIONS_TABLE_IS_STYLE,
1.127     nicm      579:          .separator = ",",
                    580:          .text = "Style of the command prompt when in command mode, if "
                    581:                  "'mode-keys' is set to 'vi'."
1.1       nicm      582:        },
                    583:
1.165     nicm      584:        { .name = "message-line",
                    585:          .type = OPTIONS_TABLE_CHOICE,
                    586:          .scope = OPTIONS_TABLE_SESSION,
                    587:          .choices = options_table_message_line_list,
                    588:          .default_num = 0,
                    589:          .text = "Position (line) of messages and the command prompt."
                    590:        },
                    591:
1.43      nicm      592:        { .name = "message-style",
1.123     nicm      593:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      594:          .scope = OPTIONS_TABLE_SESSION,
1.123     nicm      595:          .default_str = "bg=yellow,fg=black",
                    596:          .flags = OPTIONS_TABLE_IS_STYLE,
1.127     nicm      597:          .separator = ",",
1.165     nicm      598:          .text = "Style of messages and the command prompt."
1.43      nicm      599:        },
                    600:
1.55      nicm      601:        { .name = "mouse",
1.1       nicm      602:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      603:          .scope = OPTIONS_TABLE_SESSION,
1.127     nicm      604:          .default_num = 0,
                    605:          .text = "Whether the mouse is recognised and mouse key bindings are "
                    606:                  "executed. "
                    607:                  "Applications inside panes can use the mouse even when 'off'."
1.1       nicm      608:        },
                    609:
                    610:        { .name = "prefix",
1.19      nicm      611:          .type = OPTIONS_TABLE_KEY,
1.67      nicm      612:          .scope = OPTIONS_TABLE_SESSION,
1.19      nicm      613:          .default_num = '\002',
1.127     nicm      614:          .text = "The prefix key."
1.19      nicm      615:        },
                    616:
                    617:        { .name = "prefix2",
                    618:          .type = OPTIONS_TABLE_KEY,
1.67      nicm      619:          .scope = OPTIONS_TABLE_SESSION,
1.19      nicm      620:          .default_num = KEYC_NONE,
1.127     nicm      621:          .text = "A second prefix key."
1.29      nicm      622:        },
                    623:
                    624:        { .name = "renumber-windows",
                    625:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      626:          .scope = OPTIONS_TABLE_SESSION,
1.127     nicm      627:          .default_num = 0,
                    628:          .text = "Whether windows are automatically renumbered rather than "
                    629:                  "leaving gaps."
1.1       nicm      630:        },
                    631:
                    632:        { .name = "repeat-time",
                    633:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      634:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      635:          .minimum = 0,
                    636:          .maximum = SHRT_MAX,
1.127     nicm      637:          .default_num = 500,
                    638:          .unit = "milliseconds",
                    639:          .text = "Time to wait for a key binding to repeat, if it is bound "
                    640:                  "with the '-r' flag."
1.1       nicm      641:        },
                    642:
                    643:        { .name = "set-titles",
                    644:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      645:          .scope = OPTIONS_TABLE_SESSION,
1.127     nicm      646:          .default_num = 0,
                    647:          .text = "Whether to set the terminal title, if supported."
1.1       nicm      648:        },
                    649:
                    650:        { .name = "set-titles-string",
                    651:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      652:          .scope = OPTIONS_TABLE_SESSION,
1.127     nicm      653:          .default_str = "#S:#I:#W - \"#T\" #{session_alerts}",
                    654:          .text = "Format of the terminal title to set."
1.1       nicm      655:        },
                    656:
1.91      nicm      657:        { .name = "silence-action",
                    658:          .type = OPTIONS_TABLE_CHOICE,
                    659:          .scope = OPTIONS_TABLE_SESSION,
                    660:          .choices = options_table_bell_action_list,
1.127     nicm      661:          .default_num = ALERT_OTHER,
                    662:          .text = "Action to take on a silence alert."
1.91      nicm      663:        },
                    664:
1.1       nicm      665:        { .name = "status",
1.99      nicm      666:          .type = OPTIONS_TABLE_CHOICE,
1.67      nicm      667:          .scope = OPTIONS_TABLE_SESSION,
1.99      nicm      668:          .choices = options_table_status_list,
1.127     nicm      669:          .default_num = 1,
                    670:          .text = "Number of lines in the status line."
1.1       nicm      671:        },
                    672:
                    673:        { .name = "status-bg",
                    674:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      675:          .scope = OPTIONS_TABLE_SESSION,
1.123     nicm      676:          .default_num = 8,
1.127     nicm      677:          .text = "Background colour of the status line. This option is "
                    678:                  "deprecated, use 'status-style' instead."
1.1       nicm      679:        },
                    680:
                    681:        { .name = "status-fg",
                    682:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      683:          .scope = OPTIONS_TABLE_SESSION,
1.123     nicm      684:          .default_num = 8,
1.127     nicm      685:          .text = "Foreground colour of the status line. This option is "
                    686:                  "deprecated, use 'status-style' instead."
1.99      nicm      687:        },
                    688:
                    689:        { .name = "status-format",
1.104     nicm      690:          .type = OPTIONS_TABLE_STRING,
1.99      nicm      691:          .scope = OPTIONS_TABLE_SESSION,
1.104     nicm      692:          .flags = OPTIONS_TABLE_IS_ARRAY,
1.99      nicm      693:          .default_arr = options_table_status_format_default,
1.127     nicm      694:          .text = "Formats for the status lines. "
                    695:                  "Each array member is the format for one status line. "
                    696:                  "The default status line is made up of several components "
1.144     nicm      697:                  "which may be configured individually with other options such "
1.127     nicm      698:                  "as 'status-left'."
1.1       nicm      699:        },
                    700:
                    701:        { .name = "status-interval",
                    702:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      703:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      704:          .minimum = 0,
                    705:          .maximum = INT_MAX,
1.127     nicm      706:          .default_num = 15,
                    707:          .unit = "seconds",
                    708:          .text = "Number of seconds between status line updates."
1.1       nicm      709:        },
                    710:
                    711:        { .name = "status-justify",
                    712:          .type = OPTIONS_TABLE_CHOICE,
1.67      nicm      713:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      714:          .choices = options_table_status_justify_list,
1.127     nicm      715:          .default_num = 0,
                    716:          .text = "Position of the window list in the status line."
1.1       nicm      717:        },
                    718:
                    719:        { .name = "status-keys",
                    720:          .type = OPTIONS_TABLE_CHOICE,
1.67      nicm      721:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      722:          .choices = options_table_status_keys_list,
1.127     nicm      723:          .default_num = MODEKEY_EMACS,
                    724:          .text = "Key set to use at the command prompt."
1.1       nicm      725:        },
                    726:
                    727:        { .name = "status-left",
                    728:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      729:          .scope = OPTIONS_TABLE_SESSION,
1.127     nicm      730:          .default_str = "[#{session_name}] ",
                    731:          .text = "Contents of the left side of the status line."
1.1       nicm      732:        },
                    733:
                    734:        { .name = "status-left-length",
                    735:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      736:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      737:          .minimum = 0,
                    738:          .maximum = SHRT_MAX,
1.127     nicm      739:          .default_num = 10,
                    740:          .text = "Maximum width of the left side of the status line."
1.20      nicm      741:        },
                    742:
1.43      nicm      743:        { .name = "status-left-style",
1.123     nicm      744:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      745:          .scope = OPTIONS_TABLE_SESSION,
1.123     nicm      746:          .default_str = "default",
                    747:          .flags = OPTIONS_TABLE_IS_STYLE,
1.127     nicm      748:          .separator = ",",
                    749:          .text = "Style of the left side of the status line."
1.43      nicm      750:        },
                    751:
1.20      nicm      752:        { .name = "status-position",
                    753:          .type = OPTIONS_TABLE_CHOICE,
1.67      nicm      754:          .scope = OPTIONS_TABLE_SESSION,
1.20      nicm      755:          .choices = options_table_status_position_list,
1.127     nicm      756:          .default_num = 1,
                    757:          .text = "Position of the status line."
1.1       nicm      758:        },
                    759:
                    760:        { .name = "status-right",
                    761:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      762:          .scope = OPTIONS_TABLE_SESSION,
1.97      nicm      763:          .default_str = "#{?window_bigger,"
1.127     nicm      764:                         "[#{window_offset_x}#,#{window_offset_y}] ,}"
                    765:                         "\"#{=21:pane_title}\" %H:%M %d-%b-%y",
                    766:          .text = "Contents of the right side of the status line."
                    767:
1.1       nicm      768:        },
                    769:
                    770:        { .name = "status-right-length",
                    771:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      772:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      773:          .minimum = 0,
                    774:          .maximum = SHRT_MAX,
1.127     nicm      775:          .default_num = 40,
                    776:          .text = "Maximum width of the right side of the status line."
1.1       nicm      777:        },
                    778:
1.43      nicm      779:        { .name = "status-right-style",
1.123     nicm      780:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      781:          .scope = OPTIONS_TABLE_SESSION,
1.123     nicm      782:          .default_str = "default",
                    783:          .flags = OPTIONS_TABLE_IS_STYLE,
1.127     nicm      784:          .separator = ",",
                    785:          .text = "Style of the right side of the status line."
1.43      nicm      786:        },
                    787:
                    788:        { .name = "status-style",
1.123     nicm      789:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      790:          .scope = OPTIONS_TABLE_SESSION,
1.123     nicm      791:          .default_str = "bg=green,fg=black",
                    792:          .flags = OPTIONS_TABLE_IS_STYLE,
1.127     nicm      793:          .separator = ",",
                    794:          .text = "Style of the status line."
1.43      nicm      795:        },
                    796:
1.1       nicm      797:        { .name = "update-environment",
1.104     nicm      798:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      799:          .scope = OPTIONS_TABLE_SESSION,
1.104     nicm      800:          .flags = OPTIONS_TABLE_IS_ARRAY,
1.96      nicm      801:          .default_str = "DISPLAY KRB5CCNAME SSH_ASKPASS SSH_AUTH_SOCK "
1.127     nicm      802:                         "SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY",
                    803:          .text = "List of environment variables to update in the session "
                    804:                  "environment when a client is attached."
1.1       nicm      805:        },
                    806:
                    807:        { .name = "visual-activity",
1.91      nicm      808:          .type = OPTIONS_TABLE_CHOICE,
1.67      nicm      809:          .scope = OPTIONS_TABLE_SESSION,
1.91      nicm      810:          .choices = options_table_visual_bell_list,
1.127     nicm      811:          .default_num = VISUAL_OFF,
                    812:          .text = "How activity alerts should be shown: a message ('on'), "
                    813:                  "a message and a bell ('both') or nothing ('off')."
1.1       nicm      814:        },
                    815:
                    816:        { .name = "visual-bell",
1.91      nicm      817:          .type = OPTIONS_TABLE_CHOICE,
1.67      nicm      818:          .scope = OPTIONS_TABLE_SESSION,
1.91      nicm      819:          .choices = options_table_visual_bell_list,
1.127     nicm      820:          .default_num = VISUAL_OFF,
                    821:          .text = "How bell alerts should be shown: a message ('on'), "
                    822:                  "a message and a bell ('both') or nothing ('off')."
1.1       nicm      823:        },
                    824:
                    825:        { .name = "visual-silence",
1.91      nicm      826:          .type = OPTIONS_TABLE_CHOICE,
1.67      nicm      827:          .scope = OPTIONS_TABLE_SESSION,
1.91      nicm      828:          .choices = options_table_visual_bell_list,
1.127     nicm      829:          .default_num = VISUAL_OFF,
                    830:          .text = "How silence alerts should be shown: a message ('on'), "
                    831:                  "a message and a bell ('both') or nothing ('off')."
1.1       nicm      832:        },
                    833:
1.16      nicm      834:        { .name = "word-separators",
                    835:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      836:          .scope = OPTIONS_TABLE_SESSION,
1.143     nicm      837:          /*
                    838:           * The set of non-alphanumeric printable ASCII characters minus the
                    839:           * underscore.
                    840:           */
                    841:          .default_str = "!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~",
1.127     nicm      842:          .text = "Characters considered to separate words."
1.16      nicm      843:        },
                    844:
1.105     nicm      845:        /* Window options. */
1.1       nicm      846:        { .name = "aggressive-resize",
                    847:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      848:          .scope = OPTIONS_TABLE_WINDOW,
1.127     nicm      849:          .default_num = 0,
                    850:          .text = "When 'window-size' is 'smallest', whether the maximum size "
                    851:                  "of a window is the smallest attached session where it is "
                    852:                  "the current window ('on') or the smallest session it is "
                    853:                  "linked to ('off')."
1.17      nicm      854:        },
                    855:
1.157     nicm      856:        { .name = "allow-passthrough",
1.164     nicm      857:          .type = OPTIONS_TABLE_CHOICE,
1.157     nicm      858:          .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
1.164     nicm      859:          .choices = options_table_allow_passthrough_list,
1.157     nicm      860:          .default_num = 0,
                    861:          .text = "Whether applications are allowed to use the escape sequence "
1.164     nicm      862:                  "to bypass tmux. Can be 'off' (disallowed), 'on' (allowed "
                    863:                  "if the pane is visible), or 'all' (allowed even if the pane "
                    864:                  "is invisible)."
1.157     nicm      865:        },
                    866:
1.17      nicm      867:        { .name = "allow-rename",
                    868:          .type = OPTIONS_TABLE_FLAG,
1.108     nicm      869:          .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
1.127     nicm      870:          .default_num = 0,
                    871:          .text = "Whether applications are allowed to use the escape sequence "
                    872:                  "to rename windows."
1.1       nicm      873:        },
                    874:
                    875:        { .name = "alternate-screen",
                    876:          .type = OPTIONS_TABLE_FLAG,
1.108     nicm      877:          .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
1.127     nicm      878:          .default_num = 1,
                    879:          .text = "Whether applications are allowed to use the alternate "
                    880:                  "screen."
1.1       nicm      881:        },
                    882:
                    883:        { .name = "automatic-rename",
                    884:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      885:          .scope = OPTIONS_TABLE_WINDOW,
1.127     nicm      886:          .default_num = 1,
                    887:          .text = "Whether windows are automatically renamed."
1.41      nicm      888:        },
                    889:
                    890:        { .name = "automatic-rename-format",
                    891:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      892:          .scope = OPTIONS_TABLE_WINDOW,
1.50      nicm      893:          .default_str = "#{?pane_in_mode,[tmux],#{pane_current_command}}"
1.127     nicm      894:                         "#{?pane_dead,[dead],}",
                    895:          .text = "Format used to automatically rename windows."
1.1       nicm      896:        },
                    897:
                    898:        { .name = "clock-mode-colour",
                    899:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      900:          .scope = OPTIONS_TABLE_WINDOW,
1.127     nicm      901:          .default_num = 4,
                    902:          .text = "Colour of the clock in clock mode."
1.1       nicm      903:        },
                    904:
                    905:        { .name = "clock-mode-style",
                    906:          .type = OPTIONS_TABLE_CHOICE,
1.67      nicm      907:          .scope = OPTIONS_TABLE_WINDOW,
1.1       nicm      908:          .choices = options_table_clock_mode_style_list,
1.127     nicm      909:          .default_num = 1,
                    910:          .text = "Time format of the clock in clock mode."
1.124     nicm      911:        },
                    912:
                    913:        { .name = "copy-mode-match-style",
                    914:          .type = OPTIONS_TABLE_STRING,
                    915:          .scope = OPTIONS_TABLE_WINDOW,
                    916:          .default_str = "bg=cyan,fg=black",
                    917:          .flags = OPTIONS_TABLE_IS_STYLE,
1.127     nicm      918:          .separator = ",",
                    919:          .text = "Style of search matches in copy mode."
1.124     nicm      920:        },
                    921:
                    922:        { .name = "copy-mode-current-match-style",
                    923:          .type = OPTIONS_TABLE_STRING,
                    924:          .scope = OPTIONS_TABLE_WINDOW,
                    925:          .default_str = "bg=magenta,fg=black",
                    926:          .flags = OPTIONS_TABLE_IS_STYLE,
1.127     nicm      927:          .separator = ",",
                    928:          .text = "Style of the current search match in copy mode."
1.128     nicm      929:        },
                    930:
                    931:        { .name = "copy-mode-mark-style",
                    932:          .type = OPTIONS_TABLE_STRING,
                    933:          .scope = OPTIONS_TABLE_WINDOW,
                    934:          .default_str = "bg=red,fg=black",
                    935:          .flags = OPTIONS_TABLE_IS_STYLE,
                    936:          .separator = ",",
                    937:          .text = "Style of the marked line in copy mode."
1.160     nicm      938:        },
                    939:
                    940:        { .name = "fill-character",
                    941:          .type = OPTIONS_TABLE_STRING,
                    942:          .scope = OPTIONS_TABLE_WINDOW,
                    943:          .default_str = "",
                    944:          .text = "Character used to fill unused parts of window."
1.1       nicm      945:        },
                    946:
                    947:        { .name = "main-pane-height",
1.120     nicm      948:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      949:          .scope = OPTIONS_TABLE_WINDOW,
1.127     nicm      950:          .default_str = "24",
                    951:          .text = "Height of the main pane in the 'main-horizontal' layout. "
                    952:                  "This may be a percentage, for example '10%'."
1.1       nicm      953:        },
                    954:
                    955:        { .name = "main-pane-width",
1.120     nicm      956:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      957:          .scope = OPTIONS_TABLE_WINDOW,
1.127     nicm      958:          .default_str = "80",
                    959:          .text = "Width of the main pane in the 'main-vertical' layout. "
                    960:                  "This may be a percentage, for example '10%'."
1.1       nicm      961:        },
                    962:
                    963:        { .name = "mode-keys",
                    964:          .type = OPTIONS_TABLE_CHOICE,
1.67      nicm      965:          .scope = OPTIONS_TABLE_WINDOW,
1.1       nicm      966:          .choices = options_table_mode_keys_list,
1.127     nicm      967:          .default_num = MODEKEY_EMACS,
                    968:          .text = "Key set used in copy mode."
1.1       nicm      969:        },
                    970:
1.43      nicm      971:        { .name = "mode-style",
1.123     nicm      972:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      973:          .scope = OPTIONS_TABLE_WINDOW,
1.167     nicm      974:          .flags = OPTIONS_TABLE_IS_STYLE,
1.123     nicm      975:          .default_str = "bg=yellow,fg=black",
1.127     nicm      976:          .separator = ",",
                    977:          .text = "Style of indicators and highlighting in modes."
1.43      nicm      978:        },
                    979:
1.1       nicm      980:        { .name = "monitor-activity",
                    981:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      982:          .scope = OPTIONS_TABLE_WINDOW,
1.127     nicm      983:          .default_num = 0,
                    984:          .text = "Whether an alert is triggered by activity."
1.93      nicm      985:        },
                    986:
                    987:        { .name = "monitor-bell",
                    988:          .type = OPTIONS_TABLE_FLAG,
                    989:          .scope = OPTIONS_TABLE_WINDOW,
1.127     nicm      990:          .default_num = 1,
                    991:          .text = "Whether an alert is triggered by a bell."
1.1       nicm      992:        },
                    993:
                    994:        { .name = "monitor-silence",
                    995:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      996:          .scope = OPTIONS_TABLE_WINDOW,
1.1       nicm      997:          .minimum = 0,
                    998:          .maximum = INT_MAX,
1.127     nicm      999:          .default_num = 0,
                   1000:          .text = "Time after which an alert is triggered by silence. "
                   1001:                  "Zero means no alert."
                   1002:
1.1       nicm     1003:        },
                   1004:
                   1005:        { .name = "other-pane-height",
1.120     nicm     1006:          .type = OPTIONS_TABLE_STRING,
1.67      nicm     1007:          .scope = OPTIONS_TABLE_WINDOW,
1.127     nicm     1008:          .default_str = "0",
                   1009:          .text = "Height of the other panes in the 'main-horizontal' layout. "
                   1010:                  "This may be a percentage, for example '10%'."
1.1       nicm     1011:        },
                   1012:
                   1013:        { .name = "other-pane-width",
1.120     nicm     1014:          .type = OPTIONS_TABLE_STRING,
1.67      nicm     1015:          .scope = OPTIONS_TABLE_WINDOW,
1.127     nicm     1016:          .default_str = "0",
                   1017:          .text = "Height of the other panes in the 'main-vertical' layout. "
                   1018:                  "This may be a percentage, for example '10%'."
1.13      nicm     1019:        },
                   1020:
1.53      nicm     1021:        { .name = "pane-active-border-style",
1.123     nicm     1022:          .type = OPTIONS_TABLE_STRING,
1.67      nicm     1023:          .scope = OPTIONS_TABLE_WINDOW,
1.123     nicm     1024:          .default_str = "#{?pane_in_mode,fg=yellow,#{?synchronize-panes,fg=red,fg=green}}",
                   1025:          .flags = OPTIONS_TABLE_IS_STYLE,
1.127     nicm     1026:          .separator = ",",
                   1027:          .text = "Style of the active pane border."
1.53      nicm     1028:        },
                   1029:
1.13      nicm     1030:        { .name = "pane-base-index",
                   1031:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm     1032:          .scope = OPTIONS_TABLE_WINDOW,
1.13      nicm     1033:          .minimum = 0,
                   1034:          .maximum = USHRT_MAX,
1.127     nicm     1035:          .default_num = 0,
                   1036:          .text = "Index of the first pane in each window."
1.53      nicm     1037:        },
                   1038:
1.72      nicm     1039:        { .name = "pane-border-format",
                   1040:          .type = OPTIONS_TABLE_STRING,
1.155     nicm     1041:          .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
1.73      nicm     1042:          .default_str = "#{?pane_active,#[reverse],}#{pane_index}#[default] "
1.127     nicm     1043:                         "\"#{pane_title}\"",
                   1044:          .text = "Format of text in the pane status lines."
1.156     nicm     1045:        },
                   1046:
                   1047:        { .name = "pane-border-indicators",
                   1048:          .type = OPTIONS_TABLE_CHOICE,
                   1049:          .scope = OPTIONS_TABLE_WINDOW,
                   1050:          .choices = options_table_pane_border_indicators_list,
                   1051:          .default_num = PANE_BORDER_COLOUR,
                   1052:          .text = "Whether to indicate the active pane by colouring border or "
                   1053:                  "displaying arrow markers."
1.129     nicm     1054:        },
                   1055:
                   1056:        { .name = "pane-border-lines",
                   1057:          .type = OPTIONS_TABLE_CHOICE,
                   1058:          .scope = OPTIONS_TABLE_WINDOW,
1.152     nicm     1059:          .choices = options_table_pane_border_lines_list,
1.129     nicm     1060:          .default_num = PANE_LINES_SINGLE,
1.144     nicm     1061:          .text = "Type of characters used to draw pane border lines. Some of "
1.157     nicm     1062:                  "these are only supported on terminals with UTF-8 support."
1.72      nicm     1063:        },
                   1064:
                   1065:        { .name = "pane-border-status",
                   1066:          .type = OPTIONS_TABLE_CHOICE,
                   1067:          .scope = OPTIONS_TABLE_WINDOW,
                   1068:          .choices = options_table_pane_status_list,
1.127     nicm     1069:          .default_num = PANE_STATUS_OFF,
                   1070:          .text = "Position of the pane status lines."
1.53      nicm     1071:        },
                   1072:
                   1073:        { .name = "pane-border-style",
1.123     nicm     1074:          .type = OPTIONS_TABLE_STRING,
1.67      nicm     1075:          .scope = OPTIONS_TABLE_WINDOW,
1.123     nicm     1076:          .default_str = "default",
                   1077:          .flags = OPTIONS_TABLE_IS_STYLE,
1.127     nicm     1078:          .separator = ",",
                   1079:          .text = "Style of the pane status lines."
1.149     nicm     1080:        },
                   1081:
                   1082:        { .name = "pane-colours",
                   1083:          .type = OPTIONS_TABLE_COLOUR,
                   1084:          .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
                   1085:          .default_str = "",
                   1086:          .flags = OPTIONS_TABLE_IS_ARRAY,
                   1087:          .text = "The default colour palette for colours zero to 255."
1.151     nicm     1088:        },
                   1089:
                   1090:        { .name = "popup-style",
                   1091:          .type = OPTIONS_TABLE_STRING,
                   1092:          .scope = OPTIONS_TABLE_WINDOW,
                   1093:          .default_str = "default",
                   1094:          .flags = OPTIONS_TABLE_IS_STYLE,
                   1095:          .separator = ",",
                   1096:          .text = "Default style of popups."
                   1097:        },
                   1098:
                   1099:        { .name = "popup-border-style",
                   1100:          .type = OPTIONS_TABLE_STRING,
                   1101:          .scope = OPTIONS_TABLE_WINDOW,
                   1102:          .default_str = "default",
                   1103:          .flags = OPTIONS_TABLE_IS_STYLE,
                   1104:          .separator = ",",
                   1105:          .text = "Default style of popup borders."
1.152     nicm     1106:        },
                   1107:
                   1108:        { .name = "popup-border-lines",
                   1109:          .type = OPTIONS_TABLE_CHOICE,
                   1110:          .scope = OPTIONS_TABLE_WINDOW,
                   1111:          .choices = options_table_popup_border_lines_list,
                   1112:          .default_num = BOX_LINES_SINGLE,
                   1113:          .text = "Type of characters used to draw popup border lines. Some of "
1.157     nicm     1114:                  "these are only supported on terminals with UTF-8 support."
1.22      nicm     1115:        },
                   1116:
1.1       nicm     1117:        { .name = "remain-on-exit",
1.137     nicm     1118:          .type = OPTIONS_TABLE_CHOICE,
1.107     nicm     1119:          .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
1.137     nicm     1120:          .choices = options_table_remain_on_exit_list,
1.127     nicm     1121:          .default_num = 0,
                   1122:          .text = "Whether panes should remain ('on') or be automatically "
1.137     nicm     1123:                  "killed ('off' or 'failed') when the program inside exits."
1.159     nicm     1124:        },
                   1125:
                   1126:        { .name = "remain-on-exit-format",
                   1127:          .type = OPTIONS_TABLE_STRING,
                   1128:          .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
                   1129:          .default_str = "Pane is dead ("
                   1130:                         "#{?#{!=:#{pane_dead_status},},"
                   1131:                         "status #{pane_dead_status},}"
                   1132:                         "#{?#{!=:#{pane_dead_signal},},"
                   1133:                         "signal #{pane_dead_signal},}, "
                   1134:                         "#{t:pane_dead_time})",
                   1135:          .text = "Message shown after the program in a pane has exited, if "
                   1136:                  "remain-on-exit is enabled."
1.161     nicm     1137:        },
                   1138:
                   1139:        { .name = "scroll-on-clear",
                   1140:          .type = OPTIONS_TABLE_FLAG,
                   1141:          .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
                   1142:          .default_num = 1,
                   1143:          .text = "Whether the contents of the screen should be scrolled into"
                   1144:                  "history when clearing the whole screen."
1.1       nicm     1145:        },
                   1146:
                   1147:        { .name = "synchronize-panes",
                   1148:          .type = OPTIONS_TABLE_FLAG,
1.136     nicm     1149:          .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
1.127     nicm     1150:          .default_num = 0,
                   1151:          .text = "Whether typing should be sent to all panes simultaneously."
1.54      nicm     1152:        },
                   1153:
                   1154:        { .name = "window-active-style",
1.123     nicm     1155:          .type = OPTIONS_TABLE_STRING,
1.107     nicm     1156:          .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
1.123     nicm     1157:          .default_str = "default",
                   1158:          .flags = OPTIONS_TABLE_IS_STYLE,
1.127     nicm     1159:          .separator = ",",
                   1160:          .text = "Default style of the active pane."
1.97      nicm     1161:        },
                   1162:
                   1163:        { .name = "window-size",
                   1164:          .type = OPTIONS_TABLE_CHOICE,
                   1165:          .scope = OPTIONS_TABLE_WINDOW,
                   1166:          .choices = options_table_window_size_list,
1.127     nicm     1167:          .default_num = WINDOW_SIZE_LATEST,
                   1168:          .text = "How window size is calculated. "
                   1169:                  "'latest' uses the size of the most recently used client, "
                   1170:                  "'largest' the largest client, 'smallest' the smallest "
                   1171:                  "client and 'manual' a size set by the 'resize-window' "
                   1172:                  "command."
1.54      nicm     1173:        },
                   1174:
                   1175:        { .name = "window-style",
1.123     nicm     1176:          .type = OPTIONS_TABLE_STRING,
1.107     nicm     1177:          .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
1.123     nicm     1178:          .default_str = "default",
                   1179:          .flags = OPTIONS_TABLE_IS_STYLE,
1.127     nicm     1180:          .separator = ",",
                   1181:          .text = "Default style of panes that are not the active pane."
1.1       nicm     1182:        },
                   1183:
1.43      nicm     1184:        { .name = "window-status-activity-style",
1.123     nicm     1185:          .type = OPTIONS_TABLE_STRING,
1.67      nicm     1186:          .scope = OPTIONS_TABLE_WINDOW,
1.123     nicm     1187:          .default_str = "reverse",
                   1188:          .flags = OPTIONS_TABLE_IS_STYLE,
1.127     nicm     1189:          .separator = ",",
                   1190:          .text = "Style of windows in the status line with an activity alert."
1.43      nicm     1191:        },
                   1192:
                   1193:        { .name = "window-status-bell-style",
1.123     nicm     1194:          .type = OPTIONS_TABLE_STRING,
1.67      nicm     1195:          .scope = OPTIONS_TABLE_WINDOW,
1.123     nicm     1196:          .default_str = "reverse",
                   1197:          .flags = OPTIONS_TABLE_IS_STYLE,
1.127     nicm     1198:          .separator = ",",
                   1199:          .text = "Style of windows in the status line with a bell alert."
1.43      nicm     1200:        },
                   1201:
1.1       nicm     1202:        { .name = "window-status-current-format",
                   1203:          .type = OPTIONS_TABLE_STRING,
1.67      nicm     1204:          .scope = OPTIONS_TABLE_WINDOW,
1.138     nicm     1205:          .default_str = "#I:#W#{?window_flags,#{window_flags}, }",
1.127     nicm     1206:          .text = "Format of the current window in the status line."
1.30      nicm     1207:        },
                   1208:
1.43      nicm     1209:        { .name = "window-status-current-style",
1.123     nicm     1210:          .type = OPTIONS_TABLE_STRING,
1.67      nicm     1211:          .scope = OPTIONS_TABLE_WINDOW,
1.123     nicm     1212:          .default_str = "default",
                   1213:          .flags = OPTIONS_TABLE_IS_STYLE,
1.127     nicm     1214:          .separator = ",",
                   1215:          .text = "Style of the current window in the status line."
1.43      nicm     1216:        },
                   1217:
                   1218:        { .name = "window-status-format",
                   1219:          .type = OPTIONS_TABLE_STRING,
1.67      nicm     1220:          .scope = OPTIONS_TABLE_WINDOW,
1.138     nicm     1221:          .default_str = "#I:#W#{?window_flags,#{window_flags}, }",
1.127     nicm     1222:          .text = "Format of windows in the status line, except the current "
                   1223:                  "window."
1.1       nicm     1224:        },
                   1225:
1.43      nicm     1226:        { .name = "window-status-last-style",
1.123     nicm     1227:          .type = OPTIONS_TABLE_STRING,
1.67      nicm     1228:          .scope = OPTIONS_TABLE_WINDOW,
1.123     nicm     1229:          .default_str = "default",
                   1230:          .flags = OPTIONS_TABLE_IS_STYLE,
1.127     nicm     1231:          .separator = ",",
                   1232:          .text = "Style of the last window in the status line."
1.1       nicm     1233:        },
                   1234:
1.43      nicm     1235:        { .name = "window-status-separator",
1.1       nicm     1236:          .type = OPTIONS_TABLE_STRING,
1.67      nicm     1237:          .scope = OPTIONS_TABLE_WINDOW,
1.127     nicm     1238:          .default_str = " ",
                   1239:          .text = "Separator between windows in the status line."
1.28      nicm     1240:        },
                   1241:
1.43      nicm     1242:        { .name = "window-status-style",
1.123     nicm     1243:          .type = OPTIONS_TABLE_STRING,
1.67      nicm     1244:          .scope = OPTIONS_TABLE_WINDOW,
1.123     nicm     1245:          .default_str = "default",
                   1246:          .flags = OPTIONS_TABLE_IS_STYLE,
1.127     nicm     1247:          .separator = ",",
                   1248:          .text = "Style of windows in the status line, except the current and "
                   1249:                  "last windows."
1.24      nicm     1250:        },
                   1251:
                   1252:        { .name = "wrap-search",
                   1253:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm     1254:          .scope = OPTIONS_TABLE_WINDOW,
1.127     nicm     1255:          .default_num = 1,
                   1256:          .text = "Whether searching in copy mode should wrap at the top or "
                   1257:                  "bottom."
1.1       nicm     1258:        },
                   1259:
1.130     nicm     1260:        { .name = "xterm-keys", /* no longer used */
1.1       nicm     1261:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm     1262:          .scope = OPTIONS_TABLE_WINDOW,
1.127     nicm     1263:          .default_num = 1,
1.130     nicm     1264:          .text = "Whether xterm-style function key sequences should be sent. "
1.157     nicm     1265:                  "This option is no longer used."
1.1       nicm     1266:        },
1.105     nicm     1267:
                   1268:        /* Hook options. */
                   1269:        OPTIONS_TABLE_HOOK("after-bind-key", ""),
                   1270:        OPTIONS_TABLE_HOOK("after-capture-pane", ""),
                   1271:        OPTIONS_TABLE_HOOK("after-copy-mode", ""),
                   1272:        OPTIONS_TABLE_HOOK("after-display-message", ""),
                   1273:        OPTIONS_TABLE_HOOK("after-display-panes", ""),
1.115     nicm     1274:        OPTIONS_TABLE_HOOK("after-kill-pane", ""),
1.105     nicm     1275:        OPTIONS_TABLE_HOOK("after-list-buffers", ""),
                   1276:        OPTIONS_TABLE_HOOK("after-list-clients", ""),
                   1277:        OPTIONS_TABLE_HOOK("after-list-keys", ""),
                   1278:        OPTIONS_TABLE_HOOK("after-list-panes", ""),
                   1279:        OPTIONS_TABLE_HOOK("after-list-sessions", ""),
                   1280:        OPTIONS_TABLE_HOOK("after-list-windows", ""),
                   1281:        OPTIONS_TABLE_HOOK("after-load-buffer", ""),
                   1282:        OPTIONS_TABLE_HOOK("after-lock-server", ""),
                   1283:        OPTIONS_TABLE_HOOK("after-new-session", ""),
                   1284:        OPTIONS_TABLE_HOOK("after-new-window", ""),
                   1285:        OPTIONS_TABLE_HOOK("after-paste-buffer", ""),
                   1286:        OPTIONS_TABLE_HOOK("after-pipe-pane", ""),
                   1287:        OPTIONS_TABLE_HOOK("after-queue", ""),
                   1288:        OPTIONS_TABLE_HOOK("after-refresh-client", ""),
                   1289:        OPTIONS_TABLE_HOOK("after-rename-session", ""),
                   1290:        OPTIONS_TABLE_HOOK("after-rename-window", ""),
                   1291:        OPTIONS_TABLE_HOOK("after-resize-pane", ""),
                   1292:        OPTIONS_TABLE_HOOK("after-resize-window", ""),
                   1293:        OPTIONS_TABLE_HOOK("after-save-buffer", ""),
                   1294:        OPTIONS_TABLE_HOOK("after-select-layout", ""),
                   1295:        OPTIONS_TABLE_HOOK("after-select-pane", ""),
                   1296:        OPTIONS_TABLE_HOOK("after-select-window", ""),
                   1297:        OPTIONS_TABLE_HOOK("after-send-keys", ""),
                   1298:        OPTIONS_TABLE_HOOK("after-set-buffer", ""),
                   1299:        OPTIONS_TABLE_HOOK("after-set-environment", ""),
                   1300:        OPTIONS_TABLE_HOOK("after-set-hook", ""),
                   1301:        OPTIONS_TABLE_HOOK("after-set-option", ""),
                   1302:        OPTIONS_TABLE_HOOK("after-show-environment", ""),
                   1303:        OPTIONS_TABLE_HOOK("after-show-messages", ""),
                   1304:        OPTIONS_TABLE_HOOK("after-show-options", ""),
                   1305:        OPTIONS_TABLE_HOOK("after-split-window", ""),
                   1306:        OPTIONS_TABLE_HOOK("after-unbind-key", ""),
                   1307:        OPTIONS_TABLE_HOOK("alert-activity", ""),
                   1308:        OPTIONS_TABLE_HOOK("alert-bell", ""),
                   1309:        OPTIONS_TABLE_HOOK("alert-silence", ""),
1.147     nicm     1310:        OPTIONS_TABLE_HOOK("client-active", ""),
1.105     nicm     1311:        OPTIONS_TABLE_HOOK("client-attached", ""),
                   1312:        OPTIONS_TABLE_HOOK("client-detached", ""),
1.157     nicm     1313:        OPTIONS_TABLE_HOOK("client-focus-in", ""),
                   1314:        OPTIONS_TABLE_HOOK("client-focus-out", ""),
1.105     nicm     1315:        OPTIONS_TABLE_HOOK("client-resized", ""),
                   1316:        OPTIONS_TABLE_HOOK("client-session-changed", ""),
1.116     nicm     1317:        OPTIONS_TABLE_PANE_HOOK("pane-died", ""),
                   1318:        OPTIONS_TABLE_PANE_HOOK("pane-exited", ""),
                   1319:        OPTIONS_TABLE_PANE_HOOK("pane-focus-in", ""),
                   1320:        OPTIONS_TABLE_PANE_HOOK("pane-focus-out", ""),
                   1321:        OPTIONS_TABLE_PANE_HOOK("pane-mode-changed", ""),
                   1322:        OPTIONS_TABLE_PANE_HOOK("pane-set-clipboard", ""),
1.133     nicm     1323:        OPTIONS_TABLE_PANE_HOOK("pane-title-changed", ""),
1.105     nicm     1324:        OPTIONS_TABLE_HOOK("session-closed", ""),
                   1325:        OPTIONS_TABLE_HOOK("session-created", ""),
                   1326:        OPTIONS_TABLE_HOOK("session-renamed", ""),
                   1327:        OPTIONS_TABLE_HOOK("session-window-changed", ""),
1.116     nicm     1328:        OPTIONS_TABLE_WINDOW_HOOK("window-layout-changed", ""),
1.146     nicm     1329:        OPTIONS_TABLE_HOOK("window-linked", ""),
1.116     nicm     1330:        OPTIONS_TABLE_WINDOW_HOOK("window-pane-changed", ""),
                   1331:        OPTIONS_TABLE_WINDOW_HOOK("window-renamed", ""),
1.158     nicm     1332:        OPTIONS_TABLE_WINDOW_HOOK("window-resized", ""),
1.146     nicm     1333:        OPTIONS_TABLE_HOOK("window-unlinked", ""),
1.1       nicm     1334:
                   1335:        { .name = NULL }
                   1336: };