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

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