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

1.103   ! nicm        1: /* $OpenBSD: options-table.c,v 1.102 2019/04/02 18:41:24 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.89      nicm       63: static const char *options_table_set_clipboard_list[] = {
                     64:        "off", "external", "on", NULL
                     65: };
1.97      nicm       66: static const char *options_table_window_size_list[] = {
                     67:        "largest", "smallest", "manual", NULL
                     68: };
1.1       nicm       69:
1.99      nicm       70: /* Status line format. */
                     71: #define OPTIONS_TABLE_STATUS_FORMAT1 \
                     72:        "#[align=left range=left #{status-left-style}]" \
                     73:        "#{T;=/#{status-left-length}:status-left}#[norange default]" \
                     74:        "#[list=on align=#{status-justify}]" \
                     75:        "#[list=left-marker]<#[list=right-marker]>#[list=on]" \
                     76:        "#{W:" \
1.101     nicm       77:                "#[range=window|#{window_index} " \
                     78:                        "#{window-status-style}" \
                     79:                        "#{?#{&&:#{window_last_flag}," \
                     80:                                "#{!=:#{window-status-last-style},default}}, " \
                     81:                                "#{window-status-last-style}," \
                     82:                        "}" \
                     83:                        "#{?#{&&:#{window_bell_flag}," \
                     84:                                "#{!=:#{window-status-bell-style},default}}, " \
                     85:                                "#{window-status-bell-style}," \
1.102     nicm       86:                                "#{?#{&&:#{||:#{window_activity_flag}," \
                     87:                                             "#{window_silence_flag}}," \
1.101     nicm       88:                                        "#{!=:" \
                     89:                                        "#{window-status-activity-style}," \
                     90:                                        "default}}, " \
                     91:                                        "#{window-status-activity-style}," \
1.99      nicm       92:                                "}" \
1.101     nicm       93:                        "}" \
1.99      nicm       94:                "]" \
                     95:                "#{T:window-status-format}" \
                     96:                "#[norange default]" \
                     97:                "#{?window_end_flag,,#{window-status-separator}}" \
                     98:        "," \
1.101     nicm       99:                "#[range=window|#{window_index} list=focus " \
1.103   ! nicm      100:                        "#{?#{!=:#{window-status-current-style},default}," \
        !           101:                                "#{window-status-current-style}," \
        !           102:                                "#{window-status-style}" \
        !           103:                        "}" \
1.101     nicm      104:                        "#{?#{&&:#{window_last_flag}," \
                    105:                                "#{!=:#{window-status-last-style},default}}, " \
                    106:                                "#{window-status-last-style}," \
                    107:                        "}" \
                    108:                        "#{?#{&&:#{window_bell_flag}," \
                    109:                                "#{!=:#{window-status-bell-style},default}}, " \
                    110:                                "#{window-status-bell-style}," \
1.102     nicm      111:                                "#{?#{&&:#{||:#{window_activity_flag}," \
                    112:                                             "#{window_silence_flag}}," \
1.101     nicm      113:                                        "#{!=:" \
                    114:                                        "#{window-status-activity-style}," \
                    115:                                        "default}}, " \
                    116:                                        "#{window-status-activity-style}," \
1.99      nicm      117:                                "}" \
1.101     nicm      118:                        "}" \
1.99      nicm      119:                "]" \
                    120:                "#{T:window-status-current-format}" \
                    121:                "#[norange list=on default]" \
                    122:                "#{?window_end_flag,,#{window-status-separator}}" \
                    123:        "}" \
                    124:        "#[nolist align=right range=right #{status-right-style}]" \
                    125:        "#{T;=/#{status-right-length}:status-right}#[norange default]"
                    126: #define OPTIONS_TABLE_STATUS_FORMAT2 \
                    127:        "#[align=centre]#{P:#{?pane_active,#[reverse],}" \
                    128:        "#{pane_index}[#{pane_width}x#{pane_height}]#[default] }"
                    129: static const char *options_table_status_format_default[] = {
                    130:        OPTIONS_TABLE_STATUS_FORMAT1, OPTIONS_TABLE_STATUS_FORMAT2, NULL
                    131: };
                    132:
1.80      nicm      133: /* Top-level options. */
1.67      nicm      134: const struct options_table_entry options_table[] = {
1.1       nicm      135:        { .name = "buffer-limit",
                    136:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      137:          .scope = OPTIONS_TABLE_SERVER,
1.1       nicm      138:          .minimum = 1,
                    139:          .maximum = INT_MAX,
1.88      nicm      140:          .default_num = 50
1.83      nicm      141:        },
                    142:
                    143:        { .name = "command-alias",
                    144:          .type = OPTIONS_TABLE_ARRAY,
                    145:          .scope = OPTIONS_TABLE_SERVER,
                    146:          .default_str = "split-pane=split-window,"
1.84      nicm      147:                         "splitp=split-window,"
                    148:                         "server-info=show-messages -JT,"
1.88      nicm      149:                         "info=show-messages -JT,"
                    150:                         "choose-window=choose-tree -w,"
                    151:                         "choose-session=choose-tree -s",
1.84      nicm      152:          .separator = ","
1.81      nicm      153:        },
                    154:
1.56      nicm      155:        { .name = "default-terminal",
                    156:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      157:          .scope = OPTIONS_TABLE_SERVER,
1.56      nicm      158:          .default_str = "screen"
                    159:        },
                    160:
1.1       nicm      161:        { .name = "escape-time",
                    162:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      163:          .scope = OPTIONS_TABLE_SERVER,
1.1       nicm      164:          .minimum = 0,
                    165:          .maximum = INT_MAX,
                    166:          .default_num = 500
1.95      nicm      167:        },
                    168:
                    169:        { .name = "exit-empty",
                    170:          .type = OPTIONS_TABLE_FLAG,
                    171:          .scope = OPTIONS_TABLE_SERVER,
                    172:          .default_num = 1
1.1       nicm      173:        },
                    174:
                    175:        { .name = "exit-unattached",
1.38      nicm      176:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      177:          .scope = OPTIONS_TABLE_SERVER,
1.38      nicm      178:          .default_num = 0
                    179:        },
                    180:
                    181:        { .name = "focus-events",
1.1       nicm      182:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      183:          .scope = OPTIONS_TABLE_SERVER,
1.1       nicm      184:          .default_num = 0
1.61      nicm      185:        },
                    186:
                    187:        { .name = "history-file",
                    188:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      189:          .scope = OPTIONS_TABLE_SERVER,
1.65      nicm      190:          .default_str = ""
1.1       nicm      191:        },
                    192:
1.46      nicm      193:        { .name = "message-limit",
                    194:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      195:          .scope = OPTIONS_TABLE_SERVER,
1.46      nicm      196:          .minimum = 0,
                    197:          .maximum = INT_MAX,
                    198:          .default_num = 100
1.1       nicm      199:        },
                    200:
1.8       nicm      201:        { .name = "set-clipboard",
1.89      nicm      202:          .type = OPTIONS_TABLE_CHOICE,
1.67      nicm      203:          .scope = OPTIONS_TABLE_SERVER,
1.89      nicm      204:          .choices = options_table_set_clipboard_list,
1.8       nicm      205:          .default_num = 1
                    206:        },
                    207:
1.45      nicm      208:        { .name = "terminal-overrides",
1.85      nicm      209:          .type = OPTIONS_TABLE_ARRAY,
1.67      nicm      210:          .scope = OPTIONS_TABLE_SERVER,
1.63      nicm      211:          .default_str = "xterm*:XT:Ms=\\E]52;%p1%s;%p2%s\\007"
1.87      nicm      212:                         ":Cs=\\E]12;%p1%s\\007:Cr=\\E]112\\007"
1.85      nicm      213:                         ":Ss=\\E[%p1%d q:Se=\\E[2 q,screen*:XT",
1.90      nicm      214:          .separator = ","
                    215:        },
                    216:
                    217:        { .name = "user-keys",
                    218:          .type = OPTIONS_TABLE_ARRAY,
                    219:          .scope = OPTIONS_TABLE_SERVER,
                    220:          .default_str = "",
1.85      nicm      221:          .separator = ","
1.45      nicm      222:        },
                    223:
1.91      nicm      224:        { .name = "activity-action",
                    225:          .type = OPTIONS_TABLE_CHOICE,
                    226:          .scope = OPTIONS_TABLE_SESSION,
                    227:          .choices = options_table_bell_action_list,
1.92      nicm      228:          .default_num = ALERT_OTHER
1.91      nicm      229:        },
                    230:
1.31      nicm      231:        { .name = "assume-paste-time",
                    232:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      233:          .scope = OPTIONS_TABLE_SESSION,
1.31      nicm      234:          .minimum = 0,
                    235:          .maximum = INT_MAX,
                    236:          .default_num = 1,
                    237:        },
                    238:
1.1       nicm      239:        { .name = "base-index",
                    240:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      241:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      242:          .minimum = 0,
                    243:          .maximum = INT_MAX,
                    244:          .default_num = 0
                    245:        },
                    246:
                    247:        { .name = "bell-action",
                    248:          .type = OPTIONS_TABLE_CHOICE,
1.67      nicm      249:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      250:          .choices = options_table_bell_action_list,
1.92      nicm      251:          .default_num = ALERT_ANY
1.11      nicm      252:        },
                    253:
1.1       nicm      254:        { .name = "default-command",
                    255:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      256:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      257:          .default_str = ""
                    258:        },
                    259:
                    260:        { .name = "default-shell",
                    261:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      262:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      263:          .default_str = _PATH_BSHELL
                    264:        },
                    265:
1.97      nicm      266:        { .name = "default-size",
                    267:          .type = OPTIONS_TABLE_STRING,
                    268:          .scope = OPTIONS_TABLE_SESSION,
                    269:          .pattern = "[0-9]*x[0-9]*",
                    270:          .default_str = "80x24"
                    271:        },
                    272:
1.1       nicm      273:        { .name = "destroy-unattached",
                    274:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      275:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      276:          .default_num = 0
                    277:        },
                    278:
                    279:        { .name = "detach-on-destroy",
                    280:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      281:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      282:          .default_num = 1
                    283:        },
                    284:
                    285:        { .name = "display-panes-active-colour",
                    286:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      287:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      288:          .default_num = 1
                    289:        },
                    290:
                    291:        { .name = "display-panes-colour",
                    292:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      293:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      294:          .default_num = 4
                    295:        },
                    296:
                    297:        { .name = "display-panes-time",
                    298:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      299:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      300:          .minimum = 1,
                    301:          .maximum = INT_MAX,
                    302:          .default_num = 1000
                    303:        },
                    304:
                    305:        { .name = "display-time",
                    306:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      307:          .scope = OPTIONS_TABLE_SESSION,
1.68      tim       308:          .minimum = 0,
1.1       nicm      309:          .maximum = INT_MAX,
                    310:          .default_num = 750
                    311:        },
                    312:
                    313:        { .name = "history-limit",
                    314:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      315:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      316:          .minimum = 0,
1.3       nicm      317:          .maximum = INT_MAX,
1.1       nicm      318:          .default_num = 2000
1.70      nicm      319:        },
                    320:
                    321:        { .name = "key-table",
                    322:          .type = OPTIONS_TABLE_STRING,
                    323:          .scope = OPTIONS_TABLE_SESSION,
                    324:          .default_str = "root"
1.1       nicm      325:        },
                    326:
                    327:        { .name = "lock-after-time",
                    328:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      329:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      330:          .minimum = 0,
                    331:          .maximum = INT_MAX,
                    332:          .default_num = 0
                    333:        },
                    334:
                    335:        { .name = "lock-command",
                    336:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      337:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      338:          .default_str = "lock -np"
                    339:        },
                    340:
1.43      nicm      341:        { .name = "message-command-style",
                    342:          .type = OPTIONS_TABLE_STYLE,
1.67      nicm      343:          .scope = OPTIONS_TABLE_SESSION,
1.43      nicm      344:          .default_str = "bg=black,fg=yellow"
1.1       nicm      345:        },
                    346:
1.43      nicm      347:        { .name = "message-style",
                    348:          .type = OPTIONS_TABLE_STYLE,
1.67      nicm      349:          .scope = OPTIONS_TABLE_SESSION,
1.43      nicm      350:          .default_str = "bg=yellow,fg=black"
                    351:        },
                    352:
1.55      nicm      353:        { .name = "mouse",
1.1       nicm      354:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      355:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      356:          .default_num = 0
                    357:        },
                    358:
                    359:        { .name = "prefix",
1.19      nicm      360:          .type = OPTIONS_TABLE_KEY,
1.67      nicm      361:          .scope = OPTIONS_TABLE_SESSION,
1.19      nicm      362:          .default_num = '\002',
                    363:        },
                    364:
                    365:        { .name = "prefix2",
                    366:          .type = OPTIONS_TABLE_KEY,
1.67      nicm      367:          .scope = OPTIONS_TABLE_SESSION,
1.19      nicm      368:          .default_num = KEYC_NONE,
1.29      nicm      369:        },
                    370:
                    371:        { .name = "renumber-windows",
                    372:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      373:          .scope = OPTIONS_TABLE_SESSION,
1.29      nicm      374:          .default_num = 0
1.1       nicm      375:        },
                    376:
                    377:        { .name = "repeat-time",
                    378:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      379:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      380:          .minimum = 0,
                    381:          .maximum = SHRT_MAX,
                    382:          .default_num = 500
                    383:        },
                    384:
                    385:        { .name = "set-titles",
                    386:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      387:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      388:          .default_num = 0
                    389:        },
                    390:
                    391:        { .name = "set-titles-string",
                    392:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      393:          .scope = OPTIONS_TABLE_SESSION,
1.60      nicm      394:          .default_str = "#S:#I:#W - \"#T\" #{session_alerts}"
1.1       nicm      395:        },
                    396:
1.91      nicm      397:        { .name = "silence-action",
                    398:          .type = OPTIONS_TABLE_CHOICE,
                    399:          .scope = OPTIONS_TABLE_SESSION,
                    400:          .choices = options_table_bell_action_list,
1.92      nicm      401:          .default_num = ALERT_OTHER
1.91      nicm      402:        },
                    403:
1.1       nicm      404:        { .name = "status",
1.99      nicm      405:          .type = OPTIONS_TABLE_CHOICE,
1.67      nicm      406:          .scope = OPTIONS_TABLE_SESSION,
1.99      nicm      407:          .choices = options_table_status_list,
1.1       nicm      408:          .default_num = 1
                    409:        },
                    410:
                    411:        { .name = "status-bg",
                    412:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      413:          .scope = OPTIONS_TABLE_SESSION,
1.43      nicm      414:          .default_num = 2,
1.1       nicm      415:        },
                    416:
                    417:        { .name = "status-fg",
                    418:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      419:          .scope = OPTIONS_TABLE_SESSION,
1.43      nicm      420:          .default_num = 0,
1.99      nicm      421:        },
                    422:
                    423:        { .name = "status-format",
                    424:          .type = OPTIONS_TABLE_ARRAY,
                    425:          .scope = OPTIONS_TABLE_SESSION,
                    426:          .default_arr = options_table_status_format_default,
1.1       nicm      427:        },
                    428:
                    429:        { .name = "status-interval",
                    430:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      431:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      432:          .minimum = 0,
                    433:          .maximum = INT_MAX,
                    434:          .default_num = 15
                    435:        },
                    436:
                    437:        { .name = "status-justify",
                    438:          .type = OPTIONS_TABLE_CHOICE,
1.67      nicm      439:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      440:          .choices = options_table_status_justify_list,
                    441:          .default_num = 0
                    442:        },
                    443:
                    444:        { .name = "status-keys",
                    445:          .type = OPTIONS_TABLE_CHOICE,
1.67      nicm      446:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      447:          .choices = options_table_status_keys_list,
                    448:          .default_num = MODEKEY_EMACS
                    449:        },
                    450:
                    451:        { .name = "status-left",
                    452:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      453:          .scope = OPTIONS_TABLE_SESSION,
1.51      nicm      454:          .default_str = "[#S] "
1.1       nicm      455:        },
                    456:
                    457:        { .name = "status-left-length",
                    458:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      459:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      460:          .minimum = 0,
                    461:          .maximum = SHRT_MAX,
                    462:          .default_num = 10
1.20      nicm      463:        },
                    464:
1.43      nicm      465:        { .name = "status-left-style",
                    466:          .type = OPTIONS_TABLE_STYLE,
1.67      nicm      467:          .scope = OPTIONS_TABLE_SESSION,
1.43      nicm      468:          .default_str = "default"
                    469:        },
                    470:
1.20      nicm      471:        { .name = "status-position",
                    472:          .type = OPTIONS_TABLE_CHOICE,
1.67      nicm      473:          .scope = OPTIONS_TABLE_SESSION,
1.20      nicm      474:          .choices = options_table_status_position_list,
                    475:          .default_num = 1
1.1       nicm      476:        },
                    477:
                    478:        { .name = "status-right",
                    479:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      480:          .scope = OPTIONS_TABLE_SESSION,
1.97      nicm      481:          .default_str = "#{?window_bigger,"
                    482:                         "[#{window_offset_x}#,#{window_offset_y}] ,}"
                    483:                         "\"#{=21:pane_title}\" %H:%M %d-%b-%y"
1.1       nicm      484:        },
                    485:
                    486:        { .name = "status-right-length",
                    487:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      488:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      489:          .minimum = 0,
                    490:          .maximum = SHRT_MAX,
                    491:          .default_num = 40
                    492:        },
                    493:
1.43      nicm      494:        { .name = "status-right-style",
                    495:          .type = OPTIONS_TABLE_STYLE,
1.67      nicm      496:          .scope = OPTIONS_TABLE_SESSION,
1.43      nicm      497:          .default_str = "default"
                    498:        },
                    499:
                    500:        { .name = "status-style",
                    501:          .type = OPTIONS_TABLE_STYLE,
1.67      nicm      502:          .scope = OPTIONS_TABLE_SESSION,
1.43      nicm      503:          .default_str = "bg=green,fg=black"
                    504:        },
                    505:
1.1       nicm      506:        { .name = "update-environment",
1.86      nicm      507:          .type = OPTIONS_TABLE_ARRAY,
1.67      nicm      508:          .scope = OPTIONS_TABLE_SESSION,
1.96      nicm      509:          .default_str = "DISPLAY KRB5CCNAME SSH_ASKPASS SSH_AUTH_SOCK "
                    510:                         "SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY"
1.1       nicm      511:        },
                    512:
                    513:        { .name = "visual-activity",
1.91      nicm      514:          .type = OPTIONS_TABLE_CHOICE,
1.67      nicm      515:          .scope = OPTIONS_TABLE_SESSION,
1.91      nicm      516:          .choices = options_table_visual_bell_list,
                    517:          .default_num = VISUAL_OFF
1.1       nicm      518:        },
                    519:
                    520:        { .name = "visual-bell",
1.91      nicm      521:          .type = OPTIONS_TABLE_CHOICE,
1.67      nicm      522:          .scope = OPTIONS_TABLE_SESSION,
1.91      nicm      523:          .choices = options_table_visual_bell_list,
                    524:          .default_num = VISUAL_OFF
1.1       nicm      525:        },
                    526:
                    527:        { .name = "visual-silence",
1.91      nicm      528:          .type = OPTIONS_TABLE_CHOICE,
1.67      nicm      529:          .scope = OPTIONS_TABLE_SESSION,
1.91      nicm      530:          .choices = options_table_visual_bell_list,
                    531:          .default_num = VISUAL_OFF
1.1       nicm      532:        },
                    533:
1.16      nicm      534:        { .name = "word-separators",
                    535:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      536:          .scope = OPTIONS_TABLE_SESSION,
1.16      nicm      537:          .default_str = " -_@"
                    538:        },
                    539:
1.1       nicm      540:        { .name = "aggressive-resize",
                    541:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      542:          .scope = OPTIONS_TABLE_WINDOW,
1.1       nicm      543:          .default_num = 0
1.17      nicm      544:        },
                    545:
                    546:        { .name = "allow-rename",
                    547:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      548:          .scope = OPTIONS_TABLE_WINDOW,
1.94      nicm      549:          .default_num = 0
1.1       nicm      550:        },
                    551:
                    552:        { .name = "alternate-screen",
                    553:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      554:          .scope = OPTIONS_TABLE_WINDOW,
1.1       nicm      555:          .default_num = 1
                    556:        },
                    557:
                    558:        { .name = "automatic-rename",
                    559:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      560:          .scope = OPTIONS_TABLE_WINDOW,
1.1       nicm      561:          .default_num = 1
1.41      nicm      562:        },
                    563:
                    564:        { .name = "automatic-rename-format",
                    565:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      566:          .scope = OPTIONS_TABLE_WINDOW,
1.50      nicm      567:          .default_str = "#{?pane_in_mode,[tmux],#{pane_current_command}}"
1.87      nicm      568:                         "#{?pane_dead,[dead],}"
1.1       nicm      569:        },
                    570:
                    571:        { .name = "clock-mode-colour",
                    572:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      573:          .scope = OPTIONS_TABLE_WINDOW,
1.1       nicm      574:          .default_num = 4
                    575:        },
                    576:
                    577:        { .name = "clock-mode-style",
                    578:          .type = OPTIONS_TABLE_CHOICE,
1.67      nicm      579:          .scope = OPTIONS_TABLE_WINDOW,
1.1       nicm      580:          .choices = options_table_clock_mode_style_list,
                    581:          .default_num = 1
                    582:        },
                    583:
                    584:        { .name = "main-pane-height",
                    585:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      586:          .scope = OPTIONS_TABLE_WINDOW,
1.1       nicm      587:          .minimum = 1,
                    588:          .maximum = INT_MAX,
                    589:          .default_num = 24
                    590:        },
                    591:
                    592:        { .name = "main-pane-width",
                    593:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      594:          .scope = OPTIONS_TABLE_WINDOW,
1.1       nicm      595:          .minimum = 1,
                    596:          .maximum = INT_MAX,
                    597:          .default_num = 80
                    598:        },
                    599:
                    600:        { .name = "mode-keys",
                    601:          .type = OPTIONS_TABLE_CHOICE,
1.67      nicm      602:          .scope = OPTIONS_TABLE_WINDOW,
1.1       nicm      603:          .choices = options_table_mode_keys_list,
                    604:          .default_num = MODEKEY_EMACS
                    605:        },
                    606:
1.43      nicm      607:        { .name = "mode-style",
                    608:          .type = OPTIONS_TABLE_STYLE,
1.67      nicm      609:          .scope = OPTIONS_TABLE_WINDOW,
1.43      nicm      610:          .default_str = "bg=yellow,fg=black"
                    611:        },
                    612:
1.1       nicm      613:        { .name = "monitor-activity",
                    614:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      615:          .scope = OPTIONS_TABLE_WINDOW,
1.1       nicm      616:          .default_num = 0
1.93      nicm      617:        },
                    618:
                    619:        { .name = "monitor-bell",
                    620:          .type = OPTIONS_TABLE_FLAG,
                    621:          .scope = OPTIONS_TABLE_WINDOW,
                    622:          .default_num = 1
1.1       nicm      623:        },
                    624:
                    625:        { .name = "monitor-silence",
                    626:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      627:          .scope = OPTIONS_TABLE_WINDOW,
1.1       nicm      628:          .minimum = 0,
                    629:          .maximum = INT_MAX,
                    630:          .default_num = 0
                    631:        },
                    632:
                    633:        { .name = "other-pane-height",
                    634:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      635:          .scope = OPTIONS_TABLE_WINDOW,
1.1       nicm      636:          .minimum = 0,
                    637:          .maximum = INT_MAX,
                    638:          .default_num = 0
                    639:        },
                    640:
                    641:        { .name = "other-pane-width",
                    642:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      643:          .scope = OPTIONS_TABLE_WINDOW,
1.1       nicm      644:          .minimum = 0,
                    645:          .maximum = INT_MAX,
1.13      nicm      646:          .default_num = 0
                    647:        },
                    648:
1.53      nicm      649:        { .name = "pane-active-border-style",
                    650:          .type = OPTIONS_TABLE_STYLE,
1.67      nicm      651:          .scope = OPTIONS_TABLE_WINDOW,
1.53      nicm      652:          .default_str = "fg=green"
                    653:        },
                    654:
1.13      nicm      655:        { .name = "pane-base-index",
                    656:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      657:          .scope = OPTIONS_TABLE_WINDOW,
1.13      nicm      658:          .minimum = 0,
                    659:          .maximum = USHRT_MAX,
1.22      nicm      660:          .default_num = 0
1.53      nicm      661:        },
                    662:
1.72      nicm      663:        { .name = "pane-border-format",
                    664:          .type = OPTIONS_TABLE_STRING,
                    665:          .scope = OPTIONS_TABLE_WINDOW,
1.73      nicm      666:          .default_str = "#{?pane_active,#[reverse],}#{pane_index}#[default] "
1.87      nicm      667:                         "\"#{pane_title}\""
1.72      nicm      668:        },
                    669:
                    670:        { .name = "pane-border-status",
                    671:          .type = OPTIONS_TABLE_CHOICE,
                    672:          .scope = OPTIONS_TABLE_WINDOW,
                    673:          .choices = options_table_pane_status_list,
                    674:          .default_num = 0
1.53      nicm      675:        },
                    676:
                    677:        { .name = "pane-border-style",
                    678:          .type = OPTIONS_TABLE_STYLE,
1.67      nicm      679:          .scope = OPTIONS_TABLE_WINDOW,
1.53      nicm      680:          .default_str = "default"
1.22      nicm      681:        },
                    682:
1.1       nicm      683:        { .name = "remain-on-exit",
                    684:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      685:          .scope = OPTIONS_TABLE_WINDOW,
1.1       nicm      686:          .default_num = 0
                    687:        },
                    688:
                    689:        { .name = "synchronize-panes",
                    690:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      691:          .scope = OPTIONS_TABLE_WINDOW,
1.1       nicm      692:          .default_num = 0
1.54      nicm      693:        },
                    694:
                    695:        { .name = "window-active-style",
                    696:          .type = OPTIONS_TABLE_STYLE,
1.67      nicm      697:          .scope = OPTIONS_TABLE_WINDOW,
1.54      nicm      698:          .default_str = "default"
1.97      nicm      699:        },
                    700:
                    701:        { .name = "window-size",
                    702:          .type = OPTIONS_TABLE_CHOICE,
                    703:          .scope = OPTIONS_TABLE_WINDOW,
                    704:          .choices = options_table_window_size_list,
1.98      nicm      705:          .default_num = WINDOW_SIZE_SMALLEST
1.54      nicm      706:        },
                    707:
                    708:        { .name = "window-style",
                    709:          .type = OPTIONS_TABLE_STYLE,
1.67      nicm      710:          .scope = OPTIONS_TABLE_WINDOW,
1.54      nicm      711:          .default_str = "default"
1.1       nicm      712:        },
                    713:
1.43      nicm      714:        { .name = "window-status-activity-style",
                    715:          .type = OPTIONS_TABLE_STYLE,
1.67      nicm      716:          .scope = OPTIONS_TABLE_WINDOW,
1.43      nicm      717:          .default_str = "reverse"
                    718:        },
                    719:
                    720:        { .name = "window-status-bell-style",
                    721:          .type = OPTIONS_TABLE_STYLE,
1.67      nicm      722:          .scope = OPTIONS_TABLE_WINDOW,
1.43      nicm      723:          .default_str = "reverse"
                    724:        },
                    725:
1.1       nicm      726:        { .name = "window-status-current-format",
                    727:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      728:          .scope = OPTIONS_TABLE_WINDOW,
1.57      nicm      729:          .default_str = "#I:#W#{?window_flags,#{window_flags}, }"
1.30      nicm      730:        },
                    731:
1.43      nicm      732:        { .name = "window-status-current-style",
                    733:          .type = OPTIONS_TABLE_STYLE,
1.67      nicm      734:          .scope = OPTIONS_TABLE_WINDOW,
1.43      nicm      735:          .default_str = "default"
                    736:        },
                    737:
                    738:        { .name = "window-status-format",
                    739:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      740:          .scope = OPTIONS_TABLE_WINDOW,
1.57      nicm      741:          .default_str = "#I:#W#{?window_flags,#{window_flags}, }"
1.1       nicm      742:        },
                    743:
1.43      nicm      744:        { .name = "window-status-last-style",
                    745:          .type = OPTIONS_TABLE_STYLE,
1.67      nicm      746:          .scope = OPTIONS_TABLE_WINDOW,
1.43      nicm      747:          .default_str = "default"
1.1       nicm      748:        },
                    749:
1.43      nicm      750:        { .name = "window-status-separator",
1.1       nicm      751:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      752:          .scope = OPTIONS_TABLE_WINDOW,
1.43      nicm      753:          .default_str = " "
1.28      nicm      754:        },
                    755:
1.43      nicm      756:        { .name = "window-status-style",
                    757:          .type = OPTIONS_TABLE_STYLE,
1.67      nicm      758:          .scope = OPTIONS_TABLE_WINDOW,
1.43      nicm      759:          .default_str = "default"
1.24      nicm      760:        },
                    761:
                    762:        { .name = "wrap-search",
                    763:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      764:          .scope = OPTIONS_TABLE_WINDOW,
1.24      nicm      765:          .default_num = 1
1.1       nicm      766:        },
                    767:
                    768:        { .name = "xterm-keys",
                    769:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      770:          .scope = OPTIONS_TABLE_WINDOW,
1.76      nicm      771:          .default_num = 1
1.1       nicm      772:        },
                    773:
                    774:        { .name = NULL }
                    775: };