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