[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.141

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