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

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