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

1.90    ! nicm        1: /* $OpenBSD: options-table.c,v 1.89 2017/06/03 17:43:01 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.74      nicm       42: static const char *options_table_status_keys_list[] = {
1.1       nicm       43:        "emacs", "vi", NULL
                     44: };
1.74      nicm       45: static const char *options_table_status_justify_list[] = {
1.1       nicm       46:        "left", "centre", "right", NULL
                     47: };
1.74      nicm       48: static const char *options_table_status_position_list[] = {
1.20      nicm       49:        "top", "bottom", NULL
                     50: };
1.74      nicm       51: static const char *options_table_bell_action_list[] = {
1.59      nicm       52:        "none", "any", "current", "other", NULL
1.1       nicm       53: };
1.74      nicm       54: static const char *options_table_pane_status_list[] = {
1.72      nicm       55:        "off", "top", "bottom", NULL
                     56: };
1.89      nicm       57: static const char *options_table_set_clipboard_list[] = {
                     58:        "off", "external", "on", NULL
                     59: };
1.1       nicm       60:
1.80      nicm       61: /* Top-level options. */
1.67      nicm       62: const struct options_table_entry options_table[] = {
1.1       nicm       63:        { .name = "buffer-limit",
                     64:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm       65:          .scope = OPTIONS_TABLE_SERVER,
1.1       nicm       66:          .minimum = 1,
                     67:          .maximum = INT_MAX,
1.88      nicm       68:          .default_num = 50
1.83      nicm       69:        },
                     70:
                     71:        { .name = "command-alias",
                     72:          .type = OPTIONS_TABLE_ARRAY,
                     73:          .scope = OPTIONS_TABLE_SERVER,
                     74:          .default_str = "split-pane=split-window,"
1.84      nicm       75:                         "splitp=split-window,"
                     76:                         "server-info=show-messages -JT,"
1.88      nicm       77:                         "info=show-messages -JT,"
                     78:                         "choose-window=choose-tree -w,"
                     79:                         "choose-session=choose-tree -s",
1.84      nicm       80:          .separator = ","
1.81      nicm       81:        },
                     82:
1.56      nicm       83:        { .name = "default-terminal",
                     84:          .type = OPTIONS_TABLE_STRING,
1.67      nicm       85:          .scope = OPTIONS_TABLE_SERVER,
1.56      nicm       86:          .default_str = "screen"
                     87:        },
                     88:
1.1       nicm       89:        { .name = "escape-time",
                     90:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm       91:          .scope = OPTIONS_TABLE_SERVER,
1.1       nicm       92:          .minimum = 0,
                     93:          .maximum = INT_MAX,
                     94:          .default_num = 500
                     95:        },
                     96:
                     97:        { .name = "exit-unattached",
1.38      nicm       98:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm       99:          .scope = OPTIONS_TABLE_SERVER,
1.38      nicm      100:          .default_num = 0
                    101:        },
                    102:
                    103:        { .name = "focus-events",
1.1       nicm      104:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      105:          .scope = OPTIONS_TABLE_SERVER,
1.1       nicm      106:          .default_num = 0
1.61      nicm      107:        },
                    108:
                    109:        { .name = "history-file",
                    110:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      111:          .scope = OPTIONS_TABLE_SERVER,
1.65      nicm      112:          .default_str = ""
1.1       nicm      113:        },
                    114:
1.46      nicm      115:        { .name = "message-limit",
                    116:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      117:          .scope = OPTIONS_TABLE_SERVER,
1.46      nicm      118:          .minimum = 0,
                    119:          .maximum = INT_MAX,
                    120:          .default_num = 100
1.1       nicm      121:        },
                    122:
1.8       nicm      123:        { .name = "set-clipboard",
1.89      nicm      124:          .type = OPTIONS_TABLE_CHOICE,
1.67      nicm      125:          .scope = OPTIONS_TABLE_SERVER,
1.89      nicm      126:          .choices = options_table_set_clipboard_list,
1.8       nicm      127:          .default_num = 1
                    128:        },
                    129:
1.45      nicm      130:        { .name = "terminal-overrides",
1.85      nicm      131:          .type = OPTIONS_TABLE_ARRAY,
1.67      nicm      132:          .scope = OPTIONS_TABLE_SERVER,
1.63      nicm      133:          .default_str = "xterm*:XT:Ms=\\E]52;%p1%s;%p2%s\\007"
1.87      nicm      134:                         ":Cs=\\E]12;%p1%s\\007:Cr=\\E]112\\007"
1.85      nicm      135:                         ":Ss=\\E[%p1%d q:Se=\\E[2 q,screen*:XT",
1.90    ! nicm      136:          .separator = ","
        !           137:        },
        !           138:
        !           139:        { .name = "user-keys",
        !           140:          .type = OPTIONS_TABLE_ARRAY,
        !           141:          .scope = OPTIONS_TABLE_SERVER,
        !           142:          .default_str = "",
1.85      nicm      143:          .separator = ","
1.45      nicm      144:        },
                    145:
1.31      nicm      146:        { .name = "assume-paste-time",
                    147:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      148:          .scope = OPTIONS_TABLE_SESSION,
1.31      nicm      149:          .minimum = 0,
                    150:          .maximum = INT_MAX,
                    151:          .default_num = 1,
                    152:        },
                    153:
1.1       nicm      154:        { .name = "base-index",
                    155:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      156:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      157:          .minimum = 0,
                    158:          .maximum = INT_MAX,
                    159:          .default_num = 0
                    160:        },
                    161:
                    162:        { .name = "bell-action",
                    163:          .type = OPTIONS_TABLE_CHOICE,
1.67      nicm      164:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      165:          .choices = options_table_bell_action_list,
                    166:          .default_num = BELL_ANY
1.11      nicm      167:        },
                    168:
                    169:        { .name = "bell-on-alert",
                    170:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      171:          .scope = OPTIONS_TABLE_SESSION,
1.11      nicm      172:          .default_num = 0
1.1       nicm      173:        },
                    174:
                    175:        { .name = "default-command",
                    176:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      177:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      178:          .default_str = ""
                    179:        },
                    180:
                    181:        { .name = "default-shell",
                    182:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      183:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      184:          .default_str = _PATH_BSHELL
                    185:        },
                    186:
                    187:        { .name = "destroy-unattached",
                    188:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      189:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      190:          .default_num = 0
                    191:        },
                    192:
                    193:        { .name = "detach-on-destroy",
                    194:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      195:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      196:          .default_num = 1
                    197:        },
                    198:
                    199:        { .name = "display-panes-active-colour",
                    200:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      201:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      202:          .default_num = 1
                    203:        },
                    204:
                    205:        { .name = "display-panes-colour",
                    206:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      207:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      208:          .default_num = 4
                    209:        },
                    210:
                    211:        { .name = "display-panes-time",
                    212:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      213:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      214:          .minimum = 1,
                    215:          .maximum = INT_MAX,
                    216:          .default_num = 1000
                    217:        },
                    218:
                    219:        { .name = "display-time",
                    220:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      221:          .scope = OPTIONS_TABLE_SESSION,
1.68      tim       222:          .minimum = 0,
1.1       nicm      223:          .maximum = INT_MAX,
                    224:          .default_num = 750
                    225:        },
                    226:
                    227:        { .name = "history-limit",
                    228:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      229:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      230:          .minimum = 0,
1.3       nicm      231:          .maximum = INT_MAX,
1.1       nicm      232:          .default_num = 2000
1.70      nicm      233:        },
                    234:
                    235:        { .name = "key-table",
                    236:          .type = OPTIONS_TABLE_STRING,
                    237:          .scope = OPTIONS_TABLE_SESSION,
                    238:          .default_str = "root"
1.1       nicm      239:        },
                    240:
                    241:        { .name = "lock-after-time",
                    242:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      243:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      244:          .minimum = 0,
                    245:          .maximum = INT_MAX,
                    246:          .default_num = 0
                    247:        },
                    248:
                    249:        { .name = "lock-command",
                    250:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      251:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      252:          .default_str = "lock -np"
                    253:        },
                    254:
                    255:        { .name = "message-attr",
                    256:          .type = OPTIONS_TABLE_ATTRIBUTES,
1.67      nicm      257:          .scope = OPTIONS_TABLE_SESSION,
1.43      nicm      258:          .default_num = 0,
                    259:          .style = "message-style"
1.1       nicm      260:        },
                    261:
                    262:        { .name = "message-bg",
1.15      nicm      263:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      264:          .scope = OPTIONS_TABLE_SESSION,
1.43      nicm      265:          .default_num = 3,
                    266:          .style = "message-style"
1.15      nicm      267:        },
                    268:
                    269:        { .name = "message-command-attr",
                    270:          .type = OPTIONS_TABLE_ATTRIBUTES,
1.67      nicm      271:          .scope = OPTIONS_TABLE_SESSION,
1.43      nicm      272:          .default_num = 0,
                    273:          .style = "message-command-style"
1.15      nicm      274:        },
                    275:
                    276:        { .name = "message-command-bg",
                    277:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      278:          .scope = OPTIONS_TABLE_SESSION,
1.43      nicm      279:          .default_num = 0,
                    280:          .style = "message-command-style"
1.15      nicm      281:        },
                    282:
                    283:        { .name = "message-command-fg",
1.1       nicm      284:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      285:          .scope = OPTIONS_TABLE_SESSION,
1.43      nicm      286:          .default_num = 3,
                    287:          .style = "message-command-style"
                    288:        },
                    289:
                    290:        { .name = "message-command-style",
                    291:          .type = OPTIONS_TABLE_STYLE,
1.67      nicm      292:          .scope = OPTIONS_TABLE_SESSION,
1.43      nicm      293:          .default_str = "bg=black,fg=yellow"
1.1       nicm      294:        },
                    295:
                    296:        { .name = "message-fg",
                    297:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      298:          .scope = OPTIONS_TABLE_SESSION,
1.43      nicm      299:          .default_num = 0,
                    300:          .style = "message-style"
1.7       nicm      301:        },
                    302:
1.43      nicm      303:        { .name = "message-style",
                    304:          .type = OPTIONS_TABLE_STYLE,
1.67      nicm      305:          .scope = OPTIONS_TABLE_SESSION,
1.43      nicm      306:          .default_str = "bg=yellow,fg=black"
                    307:        },
                    308:
1.55      nicm      309:        { .name = "mouse",
1.1       nicm      310:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      311:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      312:          .default_num = 0
                    313:        },
                    314:
                    315:        { .name = "prefix",
1.19      nicm      316:          .type = OPTIONS_TABLE_KEY,
1.67      nicm      317:          .scope = OPTIONS_TABLE_SESSION,
1.19      nicm      318:          .default_num = '\002',
                    319:        },
                    320:
                    321:        { .name = "prefix2",
                    322:          .type = OPTIONS_TABLE_KEY,
1.67      nicm      323:          .scope = OPTIONS_TABLE_SESSION,
1.19      nicm      324:          .default_num = KEYC_NONE,
1.29      nicm      325:        },
                    326:
                    327:        { .name = "renumber-windows",
                    328:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      329:          .scope = OPTIONS_TABLE_SESSION,
1.29      nicm      330:          .default_num = 0
1.1       nicm      331:        },
                    332:
                    333:        { .name = "repeat-time",
                    334:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      335:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      336:          .minimum = 0,
                    337:          .maximum = SHRT_MAX,
                    338:          .default_num = 500
                    339:        },
                    340:
                    341:        { .name = "set-titles",
                    342:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      343:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      344:          .default_num = 0
                    345:        },
                    346:
                    347:        { .name = "set-titles-string",
                    348:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      349:          .scope = OPTIONS_TABLE_SESSION,
1.60      nicm      350:          .default_str = "#S:#I:#W - \"#T\" #{session_alerts}"
1.1       nicm      351:        },
                    352:
                    353:        { .name = "status",
                    354:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      355:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      356:          .default_num = 1
                    357:        },
                    358:
                    359:        { .name = "status-attr",
                    360:          .type = OPTIONS_TABLE_ATTRIBUTES,
1.67      nicm      361:          .scope = OPTIONS_TABLE_SESSION,
1.43      nicm      362:          .default_num = 0,
                    363:          .style = "status-style"
1.1       nicm      364:        },
                    365:
                    366:        { .name = "status-bg",
                    367:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      368:          .scope = OPTIONS_TABLE_SESSION,
1.43      nicm      369:          .default_num = 2,
                    370:          .style = "status-style"
1.1       nicm      371:        },
                    372:
                    373:        { .name = "status-fg",
                    374:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      375:          .scope = OPTIONS_TABLE_SESSION,
1.43      nicm      376:          .default_num = 0,
                    377:          .style = "status-style"
1.1       nicm      378:        },
                    379:
                    380:        { .name = "status-interval",
                    381:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      382:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      383:          .minimum = 0,
                    384:          .maximum = INT_MAX,
                    385:          .default_num = 15
                    386:        },
                    387:
                    388:        { .name = "status-justify",
                    389:          .type = OPTIONS_TABLE_CHOICE,
1.67      nicm      390:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      391:          .choices = options_table_status_justify_list,
                    392:          .default_num = 0
                    393:        },
                    394:
                    395:        { .name = "status-keys",
                    396:          .type = OPTIONS_TABLE_CHOICE,
1.67      nicm      397:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      398:          .choices = options_table_status_keys_list,
                    399:          .default_num = MODEKEY_EMACS
                    400:        },
                    401:
                    402:        { .name = "status-left",
                    403:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      404:          .scope = OPTIONS_TABLE_SESSION,
1.51      nicm      405:          .default_str = "[#S] "
1.1       nicm      406:        },
                    407:
                    408:        { .name = "status-left-attr",
                    409:          .type = OPTIONS_TABLE_ATTRIBUTES,
1.67      nicm      410:          .scope = OPTIONS_TABLE_SESSION,
1.43      nicm      411:          .default_num = 0,
                    412:          .style = "status-left-style"
1.1       nicm      413:        },
                    414:
                    415:        { .name = "status-left-bg",
                    416:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      417:          .scope = OPTIONS_TABLE_SESSION,
1.43      nicm      418:          .default_num = 8,
                    419:          .style = "status-left-style"
1.1       nicm      420:        },
                    421:
                    422:        { .name = "status-left-fg",
                    423:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      424:          .scope = OPTIONS_TABLE_SESSION,
1.43      nicm      425:          .default_num = 8,
                    426:          .style = "status-left-style"
1.1       nicm      427:        },
                    428:
                    429:        { .name = "status-left-length",
                    430:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      431:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      432:          .minimum = 0,
                    433:          .maximum = SHRT_MAX,
                    434:          .default_num = 10
1.20      nicm      435:        },
                    436:
1.43      nicm      437:        { .name = "status-left-style",
                    438:          .type = OPTIONS_TABLE_STYLE,
1.67      nicm      439:          .scope = OPTIONS_TABLE_SESSION,
1.43      nicm      440:          .default_str = "default"
                    441:        },
                    442:
1.20      nicm      443:        { .name = "status-position",
                    444:          .type = OPTIONS_TABLE_CHOICE,
1.67      nicm      445:          .scope = OPTIONS_TABLE_SESSION,
1.20      nicm      446:          .choices = options_table_status_position_list,
                    447:          .default_num = 1
1.1       nicm      448:        },
                    449:
                    450:        { .name = "status-right",
                    451:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      452:          .scope = OPTIONS_TABLE_SESSION,
1.52      sthen     453:          .default_str = " \"#{=21:pane_title}\" %H:%M %d-%b-%y"
1.1       nicm      454:        },
                    455:
                    456:        { .name = "status-right-attr",
                    457:          .type = OPTIONS_TABLE_ATTRIBUTES,
1.67      nicm      458:          .scope = OPTIONS_TABLE_SESSION,
1.43      nicm      459:          .default_num = 0,
                    460:          .style = "status-right-style"
1.1       nicm      461:        },
                    462:
                    463:        { .name = "status-right-bg",
                    464:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      465:          .scope = OPTIONS_TABLE_SESSION,
1.43      nicm      466:          .default_num = 8,
                    467:          .style = "status-right-style"
1.1       nicm      468:        },
                    469:
                    470:        { .name = "status-right-fg",
                    471:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      472:          .scope = OPTIONS_TABLE_SESSION,
1.43      nicm      473:          .default_num = 8,
                    474:          .style = "status-right-style"
1.1       nicm      475:        },
                    476:
                    477:        { .name = "status-right-length",
                    478:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      479:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      480:          .minimum = 0,
                    481:          .maximum = SHRT_MAX,
                    482:          .default_num = 40
                    483:        },
                    484:
1.43      nicm      485:        { .name = "status-right-style",
                    486:          .type = OPTIONS_TABLE_STYLE,
1.67      nicm      487:          .scope = OPTIONS_TABLE_SESSION,
1.43      nicm      488:          .default_str = "default"
                    489:        },
                    490:
                    491:        { .name = "status-style",
                    492:          .type = OPTIONS_TABLE_STYLE,
1.67      nicm      493:          .scope = OPTIONS_TABLE_SESSION,
1.43      nicm      494:          .default_str = "bg=green,fg=black"
                    495:        },
                    496:
1.1       nicm      497:        { .name = "update-environment",
1.86      nicm      498:          .type = OPTIONS_TABLE_ARRAY,
1.67      nicm      499:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      500:          .default_str = "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID "
1.87      nicm      501:                         "SSH_CONNECTION WINDOWID XAUTHORITY"
1.1       nicm      502:        },
                    503:
                    504:        { .name = "visual-activity",
                    505:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      506:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      507:          .default_num = 0
                    508:        },
                    509:
                    510:        { .name = "visual-bell",
                    511:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      512:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      513:          .default_num = 0
                    514:        },
                    515:
                    516:        { .name = "visual-silence",
                    517:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      518:          .scope = OPTIONS_TABLE_SESSION,
1.1       nicm      519:          .default_num = 0
                    520:        },
                    521:
1.16      nicm      522:        { .name = "word-separators",
                    523:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      524:          .scope = OPTIONS_TABLE_SESSION,
1.16      nicm      525:          .default_str = " -_@"
                    526:        },
                    527:
1.1       nicm      528:        { .name = "aggressive-resize",
                    529:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      530:          .scope = OPTIONS_TABLE_WINDOW,
1.1       nicm      531:          .default_num = 0
1.17      nicm      532:        },
                    533:
                    534:        { .name = "allow-rename",
                    535:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      536:          .scope = OPTIONS_TABLE_WINDOW,
1.17      nicm      537:          .default_num = 1
1.1       nicm      538:        },
                    539:
                    540:        { .name = "alternate-screen",
                    541:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      542:          .scope = OPTIONS_TABLE_WINDOW,
1.1       nicm      543:          .default_num = 1
                    544:        },
                    545:
                    546:        { .name = "automatic-rename",
                    547:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      548:          .scope = OPTIONS_TABLE_WINDOW,
1.1       nicm      549:          .default_num = 1
1.41      nicm      550:        },
                    551:
                    552:        { .name = "automatic-rename-format",
                    553:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      554:          .scope = OPTIONS_TABLE_WINDOW,
1.50      nicm      555:          .default_str = "#{?pane_in_mode,[tmux],#{pane_current_command}}"
1.87      nicm      556:                         "#{?pane_dead,[dead],}"
1.1       nicm      557:        },
                    558:
                    559:        { .name = "clock-mode-colour",
                    560:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      561:          .scope = OPTIONS_TABLE_WINDOW,
1.1       nicm      562:          .default_num = 4
                    563:        },
                    564:
                    565:        { .name = "clock-mode-style",
                    566:          .type = OPTIONS_TABLE_CHOICE,
1.67      nicm      567:          .scope = OPTIONS_TABLE_WINDOW,
1.1       nicm      568:          .choices = options_table_clock_mode_style_list,
                    569:          .default_num = 1
                    570:        },
                    571:
                    572:        { .name = "force-height",
                    573:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      574:          .scope = OPTIONS_TABLE_WINDOW,
1.1       nicm      575:          .minimum = 0,
                    576:          .maximum = INT_MAX,
                    577:          .default_num = 0
                    578:        },
                    579:
                    580:        { .name = "force-width",
                    581:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      582:          .scope = OPTIONS_TABLE_WINDOW,
1.1       nicm      583:          .minimum = 0,
                    584:          .maximum = INT_MAX,
                    585:          .default_num = 0
                    586:        },
                    587:
                    588:        { .name = "main-pane-height",
                    589:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      590:          .scope = OPTIONS_TABLE_WINDOW,
1.1       nicm      591:          .minimum = 1,
                    592:          .maximum = INT_MAX,
                    593:          .default_num = 24
                    594:        },
                    595:
                    596:        { .name = "main-pane-width",
                    597:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      598:          .scope = OPTIONS_TABLE_WINDOW,
1.1       nicm      599:          .minimum = 1,
                    600:          .maximum = INT_MAX,
                    601:          .default_num = 80
                    602:        },
                    603:
                    604:        { .name = "mode-attr",
                    605:          .type = OPTIONS_TABLE_ATTRIBUTES,
1.67      nicm      606:          .scope = OPTIONS_TABLE_WINDOW,
1.43      nicm      607:          .default_num = 0,
                    608:          .style = "mode-style"
1.1       nicm      609:        },
                    610:
                    611:        { .name = "mode-bg",
                    612:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      613:          .scope = OPTIONS_TABLE_WINDOW,
1.43      nicm      614:          .default_num = 3,
                    615:          .style = "mode-style"
1.1       nicm      616:        },
                    617:
                    618:        { .name = "mode-fg",
                    619:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      620:          .scope = OPTIONS_TABLE_WINDOW,
1.43      nicm      621:          .default_num = 0,
                    622:          .style = "mode-style"
1.1       nicm      623:        },
                    624:
                    625:        { .name = "mode-keys",
                    626:          .type = OPTIONS_TABLE_CHOICE,
1.67      nicm      627:          .scope = OPTIONS_TABLE_WINDOW,
1.1       nicm      628:          .choices = options_table_mode_keys_list,
                    629:          .default_num = MODEKEY_EMACS
                    630:        },
                    631:
1.43      nicm      632:        { .name = "mode-style",
                    633:          .type = OPTIONS_TABLE_STYLE,
1.67      nicm      634:          .scope = OPTIONS_TABLE_WINDOW,
1.43      nicm      635:          .default_str = "bg=yellow,fg=black"
                    636:        },
                    637:
1.1       nicm      638:        { .name = "monitor-activity",
                    639:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      640:          .scope = OPTIONS_TABLE_WINDOW,
1.1       nicm      641:          .default_num = 0
                    642:        },
                    643:
                    644:        { .name = "monitor-silence",
                    645:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      646:          .scope = OPTIONS_TABLE_WINDOW,
1.1       nicm      647:          .minimum = 0,
                    648:          .maximum = INT_MAX,
                    649:          .default_num = 0
                    650:        },
                    651:
                    652:        { .name = "other-pane-height",
                    653:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      654:          .scope = OPTIONS_TABLE_WINDOW,
1.1       nicm      655:          .minimum = 0,
                    656:          .maximum = INT_MAX,
                    657:          .default_num = 0
                    658:        },
                    659:
                    660:        { .name = "other-pane-width",
                    661:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      662:          .scope = OPTIONS_TABLE_WINDOW,
1.1       nicm      663:          .minimum = 0,
                    664:          .maximum = INT_MAX,
1.13      nicm      665:          .default_num = 0
                    666:        },
                    667:
1.53      nicm      668:        { .name = "pane-active-border-bg",
                    669:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      670:          .scope = OPTIONS_TABLE_WINDOW,
1.53      nicm      671:          .default_num = 8,
                    672:          .style = "pane-active-border-style"
                    673:        },
                    674:
                    675:        { .name = "pane-active-border-fg",
                    676:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      677:          .scope = OPTIONS_TABLE_WINDOW,
1.53      nicm      678:          .default_num = 2,
                    679:          .style = "pane-active-border-style"
                    680:        },
                    681:
                    682:        { .name = "pane-active-border-style",
                    683:          .type = OPTIONS_TABLE_STYLE,
1.67      nicm      684:          .scope = OPTIONS_TABLE_WINDOW,
1.53      nicm      685:          .default_str = "fg=green"
                    686:        },
                    687:
1.13      nicm      688:        { .name = "pane-base-index",
                    689:          .type = OPTIONS_TABLE_NUMBER,
1.67      nicm      690:          .scope = OPTIONS_TABLE_WINDOW,
1.13      nicm      691:          .minimum = 0,
                    692:          .maximum = USHRT_MAX,
1.22      nicm      693:          .default_num = 0
1.53      nicm      694:        },
                    695:
                    696:        { .name = "pane-border-bg",
                    697:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      698:          .scope = OPTIONS_TABLE_WINDOW,
1.53      nicm      699:          .default_num = 8,
                    700:          .style = "pane-border-style"
                    701:        },
                    702:
                    703:        { .name = "pane-border-fg",
                    704:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      705:          .scope = OPTIONS_TABLE_WINDOW,
1.53      nicm      706:          .default_num = 8,
                    707:          .style = "pane-border-style"
1.72      nicm      708:        },
                    709:
                    710:        { .name = "pane-border-format",
                    711:          .type = OPTIONS_TABLE_STRING,
                    712:          .scope = OPTIONS_TABLE_WINDOW,
1.73      nicm      713:          .default_str = "#{?pane_active,#[reverse],}#{pane_index}#[default] "
1.87      nicm      714:                         "\"#{pane_title}\""
1.72      nicm      715:        },
                    716:
                    717:        { .name = "pane-border-status",
                    718:          .type = OPTIONS_TABLE_CHOICE,
                    719:          .scope = OPTIONS_TABLE_WINDOW,
                    720:          .choices = options_table_pane_status_list,
                    721:          .default_num = 0
1.53      nicm      722:        },
                    723:
                    724:        { .name = "pane-border-style",
                    725:          .type = OPTIONS_TABLE_STYLE,
1.67      nicm      726:          .scope = OPTIONS_TABLE_WINDOW,
1.53      nicm      727:          .default_str = "default"
1.22      nicm      728:        },
                    729:
1.1       nicm      730:        { .name = "remain-on-exit",
                    731:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      732:          .scope = OPTIONS_TABLE_WINDOW,
1.1       nicm      733:          .default_num = 0
                    734:        },
                    735:
                    736:        { .name = "synchronize-panes",
                    737:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      738:          .scope = OPTIONS_TABLE_WINDOW,
1.1       nicm      739:          .default_num = 0
1.54      nicm      740:        },
                    741:
                    742:        { .name = "window-active-style",
                    743:          .type = OPTIONS_TABLE_STYLE,
1.67      nicm      744:          .scope = OPTIONS_TABLE_WINDOW,
1.54      nicm      745:          .default_str = "default"
                    746:        },
                    747:
                    748:        { .name = "window-style",
                    749:          .type = OPTIONS_TABLE_STYLE,
1.67      nicm      750:          .scope = OPTIONS_TABLE_WINDOW,
1.54      nicm      751:          .default_str = "default"
1.1       nicm      752:        },
                    753:
1.21      nicm      754:        { .name = "window-status-activity-attr",
1.1       nicm      755:          .type = OPTIONS_TABLE_ATTRIBUTES,
1.67      nicm      756:          .scope = OPTIONS_TABLE_WINDOW,
1.43      nicm      757:          .default_num = GRID_ATTR_REVERSE,
                    758:          .style = "window-status-activity-style"
1.1       nicm      759:        },
                    760:
1.21      nicm      761:        { .name = "window-status-activity-bg",
1.1       nicm      762:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      763:          .scope = OPTIONS_TABLE_WINDOW,
1.43      nicm      764:          .default_num = 8,
                    765:          .style = "window-status-activity-style"
1.1       nicm      766:        },
                    767:
1.21      nicm      768:        { .name = "window-status-activity-fg",
1.18      nicm      769:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      770:          .scope = OPTIONS_TABLE_WINDOW,
1.43      nicm      771:          .default_num = 8,
                    772:          .style = "window-status-activity-style"
                    773:        },
                    774:
                    775:        { .name = "window-status-activity-style",
                    776:          .type = OPTIONS_TABLE_STYLE,
1.67      nicm      777:          .scope = OPTIONS_TABLE_WINDOW,
1.43      nicm      778:          .default_str = "reverse"
                    779:        },
                    780:
                    781:        { .name = "window-status-attr",
                    782:          .type = OPTIONS_TABLE_ATTRIBUTES,
1.67      nicm      783:          .scope = OPTIONS_TABLE_WINDOW,
1.43      nicm      784:          .default_num = 0,
                    785:          .style = "window-status-style"
1.18      nicm      786:        },
                    787:
1.21      nicm      788:        { .name = "window-status-bell-attr",
1.18      nicm      789:          .type = OPTIONS_TABLE_ATTRIBUTES,
1.67      nicm      790:          .scope = OPTIONS_TABLE_WINDOW,
1.43      nicm      791:          .default_num = GRID_ATTR_REVERSE,
                    792:          .style = "window-status-bell-style"
1.18      nicm      793:        },
                    794:
1.21      nicm      795:        { .name = "window-status-bell-bg",
1.18      nicm      796:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      797:          .scope = OPTIONS_TABLE_WINDOW,
1.43      nicm      798:          .default_num = 8,
                    799:          .style = "window-status-bell-style"
1.18      nicm      800:        },
                    801:
1.21      nicm      802:        { .name = "window-status-bell-fg",
1.18      nicm      803:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      804:          .scope = OPTIONS_TABLE_WINDOW,
1.43      nicm      805:          .default_num = 8,
                    806:          .style = "window-status-bell-style"
                    807:        },
                    808:
                    809:        { .name = "window-status-bell-style",
                    810:          .type = OPTIONS_TABLE_STYLE,
1.67      nicm      811:          .scope = OPTIONS_TABLE_WINDOW,
1.43      nicm      812:          .default_str = "reverse"
                    813:        },
                    814:
                    815:        { .name = "window-status-bg",
                    816:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      817:          .scope = OPTIONS_TABLE_WINDOW,
1.43      nicm      818:          .default_num = 8,
                    819:          .style = "window-status-style"
1.1       nicm      820:        },
                    821:
                    822:        { .name = "window-status-current-attr",
                    823:          .type = OPTIONS_TABLE_ATTRIBUTES,
1.67      nicm      824:          .scope = OPTIONS_TABLE_WINDOW,
1.43      nicm      825:          .default_num = 0,
                    826:          .style = "window-status-current-style"
1.1       nicm      827:        },
                    828:
                    829:        { .name = "window-status-current-bg",
                    830:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      831:          .scope = OPTIONS_TABLE_WINDOW,
1.43      nicm      832:          .default_num = 8,
                    833:          .style = "window-status-current-style"
1.1       nicm      834:        },
                    835:
                    836:        { .name = "window-status-current-fg",
                    837:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      838:          .scope = OPTIONS_TABLE_WINDOW,
1.43      nicm      839:          .default_num = 8,
                    840:          .style = "window-status-current-style"
1.1       nicm      841:        },
                    842:
                    843:        { .name = "window-status-current-format",
                    844:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      845:          .scope = OPTIONS_TABLE_WINDOW,
1.57      nicm      846:          .default_str = "#I:#W#{?window_flags,#{window_flags}, }"
1.30      nicm      847:        },
                    848:
1.43      nicm      849:        { .name = "window-status-current-style",
                    850:          .type = OPTIONS_TABLE_STYLE,
1.67      nicm      851:          .scope = OPTIONS_TABLE_WINDOW,
1.43      nicm      852:          .default_str = "default"
                    853:        },
                    854:
                    855:        { .name = "window-status-fg",
                    856:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      857:          .scope = OPTIONS_TABLE_WINDOW,
1.43      nicm      858:          .default_num = 8,
                    859:          .style = "window-status-style"
                    860:        },
                    861:
                    862:        { .name = "window-status-format",
                    863:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      864:          .scope = OPTIONS_TABLE_WINDOW,
1.57      nicm      865:          .default_str = "#I:#W#{?window_flags,#{window_flags}, }"
1.43      nicm      866:        },
                    867:
1.30      nicm      868:        { .name = "window-status-last-attr",
                    869:          .type = OPTIONS_TABLE_ATTRIBUTES,
1.67      nicm      870:          .scope = OPTIONS_TABLE_WINDOW,
1.43      nicm      871:          .default_num = 0,
                    872:          .style = "window-status-last-style"
1.30      nicm      873:        },
                    874:
                    875:        { .name = "window-status-last-bg",
                    876:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      877:          .scope = OPTIONS_TABLE_WINDOW,
1.43      nicm      878:          .default_num = 8,
                    879:          .style = "window-status-last-style"
1.30      nicm      880:        },
                    881:
                    882:        { .name = "window-status-last-fg",
                    883:          .type = OPTIONS_TABLE_COLOUR,
1.67      nicm      884:          .scope = OPTIONS_TABLE_WINDOW,
1.43      nicm      885:          .default_num = 8,
                    886:          .style = "window-status-last-style"
1.1       nicm      887:        },
                    888:
1.43      nicm      889:        { .name = "window-status-last-style",
                    890:          .type = OPTIONS_TABLE_STYLE,
1.67      nicm      891:          .scope = OPTIONS_TABLE_WINDOW,
1.43      nicm      892:          .default_str = "default"
1.1       nicm      893:        },
                    894:
1.43      nicm      895:        { .name = "window-status-separator",
1.1       nicm      896:          .type = OPTIONS_TABLE_STRING,
1.67      nicm      897:          .scope = OPTIONS_TABLE_WINDOW,
1.43      nicm      898:          .default_str = " "
1.28      nicm      899:        },
                    900:
1.43      nicm      901:        { .name = "window-status-style",
                    902:          .type = OPTIONS_TABLE_STYLE,
1.67      nicm      903:          .scope = OPTIONS_TABLE_WINDOW,
1.43      nicm      904:          .default_str = "default"
1.24      nicm      905:        },
                    906:
                    907:        { .name = "wrap-search",
                    908:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      909:          .scope = OPTIONS_TABLE_WINDOW,
1.24      nicm      910:          .default_num = 1
1.1       nicm      911:        },
                    912:
                    913:        { .name = "xterm-keys",
                    914:          .type = OPTIONS_TABLE_FLAG,
1.67      nicm      915:          .scope = OPTIONS_TABLE_WINDOW,
1.76      nicm      916:          .default_num = 1
1.1       nicm      917:        },
                    918:
                    919:        { .name = NULL }
                    920: };