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