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