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