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

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