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