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

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