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

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