options-table.c revision 1.172
1/* $OpenBSD: options-table.c,v 1.172 2024/05/14 07:40:39 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_list[] = {
43	"off", "on", "2", "3", "4", "5", NULL
44};
45static const char *options_table_message_line_list[] = {
46	"0", "1", "2", "3", "4", NULL
47};
48static const char *options_table_status_keys_list[] = {
49	"emacs", "vi", NULL
50};
51static const char *options_table_status_justify_list[] = {
52	"left", "centre", "right", "absolute-centre", NULL
53};
54static const char *options_table_status_position_list[] = {
55	"top", "bottom", NULL
56};
57static const char *options_table_bell_action_list[] = {
58	"none", "any", "current", "other", NULL
59};
60static const char *options_table_visual_bell_list[] = {
61	"off", "on", "both", NULL
62};
63static const char *options_table_cursor_style_list[] = {
64	"default", "blinking-block", "block", "blinking-underline", "underline",
65	"blinking-bar", "bar", NULL
66};
67static const char *options_table_pane_status_list[] = {
68	"off", "top", "bottom", NULL
69};
70static const char *options_table_pane_border_indicators_list[] = {
71	"off", "colour", "arrows", "both", NULL
72};
73static const char *options_table_pane_border_lines_list[] = {
74	"single", "double", "heavy", "simple", "number", NULL
75};
76static const char *options_table_popup_border_lines_list[] = {
77	"single", "double", "heavy", "simple", "rounded", "padded", "none", NULL
78};
79static const char *options_table_set_clipboard_list[] = {
80	"off", "external", "on", NULL
81};
82static const char *options_table_window_size_list[] = {
83	"largest", "smallest", "manual", "latest", NULL
84};
85static const char *options_table_remain_on_exit_list[] = {
86	"off", "on", "failed", NULL
87};
88static const char *options_table_destroy_unattached_list[] = {
89	"off", "on", "keep-last", "keep-group", NULL
90};
91static const char *options_table_detach_on_destroy_list[] = {
92	"off", "on", "no-detached", "previous", "next", NULL
93};
94static const char *options_table_extended_keys_list[] = {
95	"off", "on", "always", NULL
96};
97static const char *options_table_allow_passthrough_list[] = {
98	"off", "on", "all", NULL
99};
100
101/* Status line format. */
102#define OPTIONS_TABLE_STATUS_FORMAT1 \
103	"#[align=left range=left #{E:status-left-style}]" \
104	"#[push-default]" \
105	"#{T;=/#{status-left-length}:status-left}" \
106	"#[pop-default]" \
107	"#[norange default]" \
108	"#[list=on align=#{status-justify}]" \
109	"#[list=left-marker]<#[list=right-marker]>#[list=on]" \
110	"#{W:" \
111		"#[range=window|#{window_index} " \
112			"#{E:window-status-style}" \
113			"#{?#{&&:#{window_last_flag}," \
114				"#{!=:#{E:window-status-last-style},default}}, " \
115				"#{E:window-status-last-style}," \
116			"}" \
117			"#{?#{&&:#{window_bell_flag}," \
118				"#{!=:#{E:window-status-bell-style},default}}, " \
119				"#{E:window-status-bell-style}," \
120				"#{?#{&&:#{||:#{window_activity_flag}," \
121					     "#{window_silence_flag}}," \
122					"#{!=:" \
123					"#{E:window-status-activity-style}," \
124					"default}}, " \
125					"#{E:window-status-activity-style}," \
126				"}" \
127			"}" \
128		"]" \
129		"#[push-default]" \
130		"#{T:window-status-format}" \
131		"#[pop-default]" \
132		"#[norange default]" \
133		"#{?window_end_flag,,#{window-status-separator}}" \
134	"," \
135		"#[range=window|#{window_index} list=focus " \
136			"#{?#{!=:#{E:window-status-current-style},default}," \
137				"#{E:window-status-current-style}," \
138				"#{E:window-status-style}" \
139			"}" \
140			"#{?#{&&:#{window_last_flag}," \
141				"#{!=:#{E:window-status-last-style},default}}, " \
142				"#{E:window-status-last-style}," \
143			"}" \
144			"#{?#{&&:#{window_bell_flag}," \
145				"#{!=:#{E:window-status-bell-style},default}}, " \
146				"#{E:window-status-bell-style}," \
147				"#{?#{&&:#{||:#{window_activity_flag}," \
148					     "#{window_silence_flag}}," \
149					"#{!=:" \
150					"#{E:window-status-activity-style}," \
151					"default}}, " \
152					"#{E:window-status-activity-style}," \
153				"}" \
154			"}" \
155		"]" \
156		"#[push-default]" \
157		"#{T:window-status-current-format}" \
158		"#[pop-default]" \
159		"#[norange list=on default]" \
160		"#{?window_end_flag,,#{window-status-separator}}" \
161	"}" \
162	"#[nolist align=right range=right #{E:status-right-style}]" \
163	"#[push-default]" \
164	"#{T;=/#{status-right-length}:status-right}" \
165	"#[pop-default]" \
166	"#[norange default]"
167#define OPTIONS_TABLE_STATUS_FORMAT2 \
168	"#[align=centre]#{P:#{?pane_active,#[reverse],}" \
169	"#{pane_index}[#{pane_width}x#{pane_height}]#[default] }"
170static const char *options_table_status_format_default[] = {
171	OPTIONS_TABLE_STATUS_FORMAT1, OPTIONS_TABLE_STATUS_FORMAT2, NULL
172};
173
174/* Helpers for hook options. */
175#define OPTIONS_TABLE_HOOK(hook_name, default_value) \
176	{ .name = hook_name, \
177	  .type = OPTIONS_TABLE_COMMAND, \
178	  .scope = OPTIONS_TABLE_SESSION, \
179	  .flags = OPTIONS_TABLE_IS_ARRAY|OPTIONS_TABLE_IS_HOOK, \
180	  .default_str = default_value,	\
181	  .separator = "" \
182	}
183
184#define OPTIONS_TABLE_PANE_HOOK(hook_name, default_value) \
185	{ .name = hook_name, \
186	  .type = OPTIONS_TABLE_COMMAND, \
187	  .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE, \
188	  .flags = OPTIONS_TABLE_IS_ARRAY|OPTIONS_TABLE_IS_HOOK, \
189	  .default_str = default_value,	\
190	  .separator = "" \
191	}
192
193#define OPTIONS_TABLE_WINDOW_HOOK(hook_name, default_value) \
194	{ .name = hook_name, \
195	  .type = OPTIONS_TABLE_COMMAND, \
196	  .scope = OPTIONS_TABLE_WINDOW, \
197	  .flags = OPTIONS_TABLE_IS_ARRAY|OPTIONS_TABLE_IS_HOOK, \
198	  .default_str = default_value,	\
199	  .separator = "" \
200	}
201
202/* Map of name conversions. */
203const struct options_name_map options_other_names[] = {
204	{ "display-panes-color", "display-panes-colour" },
205	{ "display-panes-active-color", "display-panes-active-colour" },
206	{ "clock-mode-color", "clock-mode-colour" },
207	{ "cursor-color", "cursor-colour" },
208	{ "pane-colors", "pane-colours" },
209	{ NULL, NULL }
210};
211
212/* Top-level options. */
213const struct options_table_entry options_table[] = {
214	/* Server options. */
215	{ .name = "backspace",
216	  .type = OPTIONS_TABLE_KEY,
217	  .scope = OPTIONS_TABLE_SERVER,
218	  .default_num = '\177',
219	  .text = "The key to send for backspace."
220	},
221
222	{ .name = "buffer-limit",
223	  .type = OPTIONS_TABLE_NUMBER,
224	  .scope = OPTIONS_TABLE_SERVER,
225	  .minimum = 1,
226	  .maximum = INT_MAX,
227	  .default_num = 50,
228	  .text = "The maximum number of automatic buffers. "
229		  "When this is reached, the oldest buffer is deleted."
230	},
231
232	{ .name = "command-alias",
233	  .type = OPTIONS_TABLE_STRING,
234	  .scope = OPTIONS_TABLE_SERVER,
235	  .flags = OPTIONS_TABLE_IS_ARRAY,
236	  .default_str = "split-pane=split-window,"
237			 "splitp=split-window,"
238			 "server-info=show-messages -JT,"
239			 "info=show-messages -JT,"
240			 "choose-window=choose-tree -w,"
241			 "choose-session=choose-tree -s",
242	  .separator = ",",
243	  .text = "Array of command aliases. "
244		  "Each entry is an alias and a command separated by '='."
245	},
246
247	{ .name = "copy-command",
248	  .type = OPTIONS_TABLE_STRING,
249	  .scope = OPTIONS_TABLE_SERVER,
250	  .default_str = "",
251	  .text = "Shell command run when text is copied. "
252		  "If empty, no command is run."
253	},
254
255	{ .name = "cursor-colour",
256	  .type = OPTIONS_TABLE_COLOUR,
257	  .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
258	  .default_num = -1,
259	  .text = "Colour of the cursor."
260	},
261
262	{ .name = "cursor-style",
263	  .type = OPTIONS_TABLE_CHOICE,
264	  .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
265	  .choices = options_table_cursor_style_list,
266	  .default_num = 0,
267	  .text = "Style of the cursor."
268	},
269
270	{ .name = "default-terminal",
271	  .type = OPTIONS_TABLE_STRING,
272	  .scope = OPTIONS_TABLE_SERVER,
273	  .default_str = TMUX_TERM,
274	  .text = "Default for the 'TERM' environment variable."
275	},
276
277	{ .name = "editor",
278	  .type = OPTIONS_TABLE_STRING,
279	  .scope = OPTIONS_TABLE_SERVER,
280	  .default_str = _PATH_VI,
281	  .text = "Editor run to edit files."
282	},
283
284	{ .name = "escape-time",
285	  .type = OPTIONS_TABLE_NUMBER,
286	  .scope = OPTIONS_TABLE_SERVER,
287	  .minimum = 0,
288	  .maximum = INT_MAX,
289	  .default_num = 10,
290	  .unit = "milliseconds",
291	  .text = "Time to wait before assuming a key is Escape."
292	},
293
294	{ .name = "exit-empty",
295	  .type = OPTIONS_TABLE_FLAG,
296	  .scope = OPTIONS_TABLE_SERVER,
297	  .default_num = 1,
298	  .text = "Whether the server should exit if there are no sessions."
299	},
300
301	{ .name = "exit-unattached",
302	  .type = OPTIONS_TABLE_FLAG,
303	  .scope = OPTIONS_TABLE_SERVER,
304	  .default_num = 0,
305	  .text = "Whether the server should exit if there are no attached "
306		  "clients."
307	},
308
309	{ .name = "extended-keys",
310	  .type = OPTIONS_TABLE_CHOICE,
311	  .scope = OPTIONS_TABLE_SERVER,
312	  .choices = options_table_extended_keys_list,
313	  .default_num = 0,
314	  .text = "Whether to request extended key sequences from terminals "
315		  "that support it."
316	},
317
318	{ .name = "focus-events",
319	  .type = OPTIONS_TABLE_FLAG,
320	  .scope = OPTIONS_TABLE_SERVER,
321	  .default_num = 0,
322	  .text = "Whether to send focus events to applications."
323	},
324
325	{ .name = "history-file",
326	  .type = OPTIONS_TABLE_STRING,
327	  .scope = OPTIONS_TABLE_SERVER,
328	  .default_str = "",
329	  .text = "Location of the command prompt history file. "
330		  "Empty does not write a history file."
331	},
332
333	{ .name = "menu-style",
334	  .type = OPTIONS_TABLE_STRING,
335	  .scope = OPTIONS_TABLE_WINDOW,
336	  .flags = OPTIONS_TABLE_IS_STYLE,
337	  .default_str = "default",
338	  .separator = ",",
339	  .text = "Default style of menu."
340	},
341
342	{ .name = "menu-selected-style",
343	  .type = OPTIONS_TABLE_STRING,
344	  .scope = OPTIONS_TABLE_WINDOW,
345	  .flags = OPTIONS_TABLE_IS_STYLE,
346	  .default_str = "bg=yellow,fg=black",
347	  .separator = ",",
348	  .text = "Default style of selected menu item."
349	},
350
351	{ .name = "menu-border-style",
352	  .type = OPTIONS_TABLE_STRING,
353	  .scope = OPTIONS_TABLE_WINDOW,
354	  .default_str = "default",
355	  .flags = OPTIONS_TABLE_IS_STYLE,
356	  .separator = ",",
357	  .text = "Default style of menu borders."
358	},
359
360	{ .name = "menu-border-lines",
361	  .type = OPTIONS_TABLE_CHOICE,
362	  .scope = OPTIONS_TABLE_WINDOW,
363	  .choices = options_table_popup_border_lines_list,
364	  .default_num = BOX_LINES_SINGLE,
365	  .text = "Type of characters used to draw menu border lines. Some of "
366	          "these are only supported on terminals with UTF-8 support."
367	},
368
369	{ .name = "message-limit",
370	  .type = OPTIONS_TABLE_NUMBER,
371	  .scope = OPTIONS_TABLE_SERVER,
372	  .minimum = 0,
373	  .maximum = INT_MAX,
374	  .default_num = 1000,
375	  .text = "Maximum number of server messages to keep."
376	},
377
378	{ .name = "prompt-history-limit",
379	  .type = OPTIONS_TABLE_NUMBER,
380	  .scope = OPTIONS_TABLE_SERVER,
381	  .minimum = 0,
382	  .maximum = INT_MAX,
383	  .default_num = 100,
384	  .text = "Maximum number of commands to keep in history."
385	},
386
387	{ .name = "search-wrapped-lines",
388	  .type = OPTIONS_TABLE_FLAG,
389	  .scope = OPTIONS_TABLE_SERVER,
390	  .default_num = 1,
391	  .text = "Whether to include full wrapped lines when searching for "
392		  "text in copy mode."
393	},
394
395	{ .name = "set-clipboard",
396	  .type = OPTIONS_TABLE_CHOICE,
397	  .scope = OPTIONS_TABLE_SERVER,
398	  .choices = options_table_set_clipboard_list,
399	  .default_num = 1,
400	  .text = "Whether to attempt to set the system clipboard ('on' or "
401		  "'external') and whether to allow applications to create "
402		  "paste buffers with an escape sequence ('on' only)."
403	},
404
405	{ .name = "terminal-overrides",
406	  .type = OPTIONS_TABLE_STRING,
407	  .scope = OPTIONS_TABLE_SERVER,
408	  .flags = OPTIONS_TABLE_IS_ARRAY,
409	  .default_str = "",
410	  .separator = ",",
411	  .text = "List of terminal capabilities overrides."
412	},
413
414	{ .name = "terminal-features",
415	  .type = OPTIONS_TABLE_STRING,
416	  .scope = OPTIONS_TABLE_SERVER,
417	  .flags = OPTIONS_TABLE_IS_ARRAY,
418	  .default_str = "xterm*:clipboard:ccolour:cstyle:focus:title,"
419			 "screen*:title,"
420	                 "rxvt*:ignorefkeys",
421	  .separator = ",",
422	  .text = "List of terminal features, used if they cannot be "
423		  "automatically detected."
424	},
425
426	{ .name = "user-keys",
427	  .type = OPTIONS_TABLE_STRING,
428	  .scope = OPTIONS_TABLE_SERVER,
429	  .flags = OPTIONS_TABLE_IS_ARRAY,
430	  .default_str = "",
431	  .separator = ",",
432	  .text = "User key assignments. "
433		  "Each sequence in the list is translated into a key: "
434		  "'User0', 'User1' and so on."
435	},
436
437	/* Session options. */
438	{ .name = "activity-action",
439	  .type = OPTIONS_TABLE_CHOICE,
440	  .scope = OPTIONS_TABLE_SESSION,
441	  .choices = options_table_bell_action_list,
442	  .default_num = ALERT_OTHER,
443	  .text = "Action to take on an activity alert."
444	},
445
446	{ .name = "assume-paste-time",
447	  .type = OPTIONS_TABLE_NUMBER,
448	  .scope = OPTIONS_TABLE_SESSION,
449	  .minimum = 0,
450	  .maximum = INT_MAX,
451	  .default_num = 1,
452	  .unit = "milliseconds",
453	  .text = "Maximum time between input to assume it is pasting rather "
454		  "than typing."
455	},
456
457	{ .name = "base-index",
458	  .type = OPTIONS_TABLE_NUMBER,
459	  .scope = OPTIONS_TABLE_SESSION,
460	  .minimum = 0,
461	  .maximum = INT_MAX,
462	  .default_num = 0,
463	  .text = "Default index of the first window in each session."
464	},
465
466	{ .name = "bell-action",
467	  .type = OPTIONS_TABLE_CHOICE,
468	  .scope = OPTIONS_TABLE_SESSION,
469	  .choices = options_table_bell_action_list,
470	  .default_num = ALERT_ANY,
471	  .text = "Action to take on a bell alert."
472	},
473
474	{ .name = "default-command",
475	  .type = OPTIONS_TABLE_STRING,
476	  .scope = OPTIONS_TABLE_SESSION,
477	  .default_str = "",
478	  .text = "Default command to run in new panes. If empty, a shell is "
479		  "started."
480	},
481
482	{ .name = "default-shell",
483	  .type = OPTIONS_TABLE_STRING,
484	  .scope = OPTIONS_TABLE_SESSION,
485	  .default_str = _PATH_BSHELL,
486	  .text = "Location of default shell."
487	},
488
489	{ .name = "default-size",
490	  .type = OPTIONS_TABLE_STRING,
491	  .scope = OPTIONS_TABLE_SESSION,
492	  .pattern = "[0-9]*x[0-9]*",
493	  .default_str = "80x24",
494	  .text = "Initial size of new sessions."
495	},
496
497	{ .name = "destroy-unattached",
498	  .type = OPTIONS_TABLE_CHOICE,
499	  .scope = OPTIONS_TABLE_SESSION,
500	  .choices = options_table_destroy_unattached_list,
501	  .default_num = 0,
502	  .text = "Whether to destroy sessions when they have no attached "
503		  "clients, or keep the last session whether in the group."
504	},
505
506	{ .name = "detach-on-destroy",
507	  .type = OPTIONS_TABLE_CHOICE,
508	  .scope = OPTIONS_TABLE_SESSION,
509	  .choices = options_table_detach_on_destroy_list,
510	  .default_num = 1,
511	  .text = "Whether to detach when a session is destroyed, or switch "
512		  "the client to another session if any exist."
513	},
514
515	{ .name = "display-panes-active-colour",
516	  .type = OPTIONS_TABLE_COLOUR,
517	  .scope = OPTIONS_TABLE_SESSION,
518	  .default_num = 1,
519	  .text = "Colour of the active pane for 'display-panes'."
520	},
521
522	{ .name = "display-panes-colour",
523	  .type = OPTIONS_TABLE_COLOUR,
524	  .scope = OPTIONS_TABLE_SESSION,
525	  .default_num = 4,
526	  .text = "Colour of not active panes for 'display-panes'."
527	},
528
529	{ .name = "display-panes-time",
530	  .type = OPTIONS_TABLE_NUMBER,
531	  .scope = OPTIONS_TABLE_SESSION,
532	  .minimum = 1,
533	  .maximum = INT_MAX,
534	  .default_num = 1000,
535	  .unit = "milliseconds",
536	  .text = "Time for which 'display-panes' should show pane numbers."
537	},
538
539	{ .name = "display-time",
540	  .type = OPTIONS_TABLE_NUMBER,
541	  .scope = OPTIONS_TABLE_SESSION,
542	  .minimum = 0,
543	  .maximum = INT_MAX,
544	  .default_num = 750,
545	  .unit = "milliseconds",
546	  .text = "Time for which status line messages should appear."
547	},
548
549	{ .name = "history-limit",
550	  .type = OPTIONS_TABLE_NUMBER,
551	  .scope = OPTIONS_TABLE_SESSION,
552	  .minimum = 0,
553	  .maximum = INT_MAX,
554	  .default_num = 2000,
555	  .unit = "lines",
556	  .text = "Maximum number of lines to keep in the history for each "
557		  "pane. "
558		  "If changed, the new value applies only to new panes."
559	},
560
561	{ .name = "key-table",
562	  .type = OPTIONS_TABLE_STRING,
563	  .scope = OPTIONS_TABLE_SESSION,
564	  .default_str = "root",
565	  .text = "Default key table. "
566		  "Key presses are first looked up in this table."
567	},
568
569	{ .name = "lock-after-time",
570	  .type = OPTIONS_TABLE_NUMBER,
571	  .scope = OPTIONS_TABLE_SESSION,
572	  .minimum = 0,
573	  .maximum = INT_MAX,
574	  .default_num = 0,
575	  .unit = "seconds",
576	  .text = "Time after which a client is locked if not used."
577	},
578
579	{ .name = "lock-command",
580	  .type = OPTIONS_TABLE_STRING,
581	  .scope = OPTIONS_TABLE_SESSION,
582	  .default_str = "lock -np",
583	  .text = "Shell command to run to lock a client."
584	},
585
586	{ .name = "message-command-style",
587	  .type = OPTIONS_TABLE_STRING,
588	  .scope = OPTIONS_TABLE_SESSION,
589	  .default_str = "bg=black,fg=yellow",
590	  .flags = OPTIONS_TABLE_IS_STYLE,
591	  .separator = ",",
592	  .text = "Style of the command prompt when in command mode, if "
593		  "'mode-keys' is set to 'vi'."
594	},
595
596	{ .name = "message-line",
597	  .type = OPTIONS_TABLE_CHOICE,
598	  .scope = OPTIONS_TABLE_SESSION,
599	  .choices = options_table_message_line_list,
600	  .default_num = 0,
601	  .text = "Position (line) of messages and the command prompt."
602	},
603
604	{ .name = "message-style",
605	  .type = OPTIONS_TABLE_STRING,
606	  .scope = OPTIONS_TABLE_SESSION,
607	  .default_str = "bg=yellow,fg=black",
608	  .flags = OPTIONS_TABLE_IS_STYLE,
609	  .separator = ",",
610	  .text = "Style of messages and the command prompt."
611	},
612
613	{ .name = "mouse",
614	  .type = OPTIONS_TABLE_FLAG,
615	  .scope = OPTIONS_TABLE_SESSION,
616	  .default_num = 0,
617	  .text = "Whether the mouse is recognised and mouse key bindings are "
618		  "executed. "
619		  "Applications inside panes can use the mouse even when 'off'."
620	},
621
622	{ .name = "prefix",
623	  .type = OPTIONS_TABLE_KEY,
624	  .scope = OPTIONS_TABLE_SESSION,
625	  .default_num = '\002',
626	  .text = "The prefix key."
627	},
628
629	{ .name = "prefix2",
630	  .type = OPTIONS_TABLE_KEY,
631	  .scope = OPTIONS_TABLE_SESSION,
632	  .default_num = KEYC_NONE,
633	  .text = "A second prefix key."
634	},
635
636	{ .name = "renumber-windows",
637	  .type = OPTIONS_TABLE_FLAG,
638	  .scope = OPTIONS_TABLE_SESSION,
639	  .default_num = 0,
640	  .text = "Whether windows are automatically renumbered rather than "
641		  "leaving gaps."
642	},
643
644	{ .name = "repeat-time",
645	  .type = OPTIONS_TABLE_NUMBER,
646	  .scope = OPTIONS_TABLE_SESSION,
647	  .minimum = 0,
648	  .maximum = SHRT_MAX,
649	  .default_num = 500,
650	  .unit = "milliseconds",
651	  .text = "Time to wait for a key binding to repeat, if it is bound "
652		  "with the '-r' flag."
653	},
654
655	{ .name = "set-titles",
656	  .type = OPTIONS_TABLE_FLAG,
657	  .scope = OPTIONS_TABLE_SESSION,
658	  .default_num = 0,
659	  .text = "Whether to set the terminal title, if supported."
660	},
661
662	{ .name = "set-titles-string",
663	  .type = OPTIONS_TABLE_STRING,
664	  .scope = OPTIONS_TABLE_SESSION,
665	  .default_str = "#S:#I:#W - \"#T\" #{session_alerts}",
666	  .text = "Format of the terminal title to set."
667	},
668
669	{ .name = "silence-action",
670	  .type = OPTIONS_TABLE_CHOICE,
671	  .scope = OPTIONS_TABLE_SESSION,
672	  .choices = options_table_bell_action_list,
673	  .default_num = ALERT_OTHER,
674	  .text = "Action to take on a silence alert."
675	},
676
677	{ .name = "status",
678	  .type = OPTIONS_TABLE_CHOICE,
679	  .scope = OPTIONS_TABLE_SESSION,
680	  .choices = options_table_status_list,
681	  .default_num = 1,
682	  .text = "Number of lines in the status line."
683	},
684
685	{ .name = "status-bg",
686	  .type = OPTIONS_TABLE_COLOUR,
687	  .scope = OPTIONS_TABLE_SESSION,
688	  .default_num = 8,
689	  .text = "Background colour of the status line. This option is "
690		  "deprecated, use 'status-style' instead."
691	},
692
693	{ .name = "status-fg",
694	  .type = OPTIONS_TABLE_COLOUR,
695	  .scope = OPTIONS_TABLE_SESSION,
696	  .default_num = 8,
697	  .text = "Foreground colour of the status line. This option is "
698		  "deprecated, use 'status-style' instead."
699	},
700
701	{ .name = "status-format",
702	  .type = OPTIONS_TABLE_STRING,
703	  .scope = OPTIONS_TABLE_SESSION,
704	  .flags = OPTIONS_TABLE_IS_ARRAY,
705	  .default_arr = options_table_status_format_default,
706	  .text = "Formats for the status lines. "
707		  "Each array member is the format for one status line. "
708		  "The default status line is made up of several components "
709		  "which may be configured individually with other options such "
710		  "as 'status-left'."
711	},
712
713	{ .name = "status-interval",
714	  .type = OPTIONS_TABLE_NUMBER,
715	  .scope = OPTIONS_TABLE_SESSION,
716	  .minimum = 0,
717	  .maximum = INT_MAX,
718	  .default_num = 15,
719	  .unit = "seconds",
720	  .text = "Number of seconds between status line updates."
721	},
722
723	{ .name = "status-justify",
724	  .type = OPTIONS_TABLE_CHOICE,
725	  .scope = OPTIONS_TABLE_SESSION,
726	  .choices = options_table_status_justify_list,
727	  .default_num = 0,
728	  .text = "Position of the window list in the status line."
729	},
730
731	{ .name = "status-keys",
732	  .type = OPTIONS_TABLE_CHOICE,
733	  .scope = OPTIONS_TABLE_SESSION,
734	  .choices = options_table_status_keys_list,
735	  .default_num = MODEKEY_EMACS,
736	  .text = "Key set to use at the command prompt."
737	},
738
739	{ .name = "status-left",
740	  .type = OPTIONS_TABLE_STRING,
741	  .scope = OPTIONS_TABLE_SESSION,
742	  .default_str = "[#{session_name}] ",
743	  .text = "Contents of the left side of the status line."
744	},
745
746	{ .name = "status-left-length",
747	  .type = OPTIONS_TABLE_NUMBER,
748	  .scope = OPTIONS_TABLE_SESSION,
749	  .minimum = 0,
750	  .maximum = SHRT_MAX,
751	  .default_num = 10,
752	  .text = "Maximum width of the left side of the status line."
753	},
754
755	{ .name = "status-left-style",
756	  .type = OPTIONS_TABLE_STRING,
757	  .scope = OPTIONS_TABLE_SESSION,
758	  .default_str = "default",
759	  .flags = OPTIONS_TABLE_IS_STYLE,
760	  .separator = ",",
761	  .text = "Style of the left side of the status line."
762	},
763
764	{ .name = "status-position",
765	  .type = OPTIONS_TABLE_CHOICE,
766	  .scope = OPTIONS_TABLE_SESSION,
767	  .choices = options_table_status_position_list,
768	  .default_num = 1,
769	  .text = "Position of the status line."
770	},
771
772	{ .name = "status-right",
773	  .type = OPTIONS_TABLE_STRING,
774	  .scope = OPTIONS_TABLE_SESSION,
775	  .default_str = "#{?window_bigger,"
776			 "[#{window_offset_x}#,#{window_offset_y}] ,}"
777			 "\"#{=21:pane_title}\" %H:%M %d-%b-%y",
778	  .text = "Contents of the right side of the status line."
779
780	},
781
782	{ .name = "status-right-length",
783	  .type = OPTIONS_TABLE_NUMBER,
784	  .scope = OPTIONS_TABLE_SESSION,
785	  .minimum = 0,
786	  .maximum = SHRT_MAX,
787	  .default_num = 40,
788	  .text = "Maximum width of the right side of the status line."
789	},
790
791	{ .name = "status-right-style",
792	  .type = OPTIONS_TABLE_STRING,
793	  .scope = OPTIONS_TABLE_SESSION,
794	  .default_str = "default",
795	  .flags = OPTIONS_TABLE_IS_STYLE,
796	  .separator = ",",
797	  .text = "Style of the right side of the status line."
798	},
799
800	{ .name = "status-style",
801	  .type = OPTIONS_TABLE_STRING,
802	  .scope = OPTIONS_TABLE_SESSION,
803	  .default_str = "bg=green,fg=black",
804	  .flags = OPTIONS_TABLE_IS_STYLE,
805	  .separator = ",",
806	  .text = "Style of the status line."
807	},
808
809	{ .name = "update-environment",
810	  .type = OPTIONS_TABLE_STRING,
811	  .scope = OPTIONS_TABLE_SESSION,
812	  .flags = OPTIONS_TABLE_IS_ARRAY,
813	  .default_str = "DISPLAY KRB5CCNAME SSH_ASKPASS SSH_AUTH_SOCK "
814			 "SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY",
815	  .text = "List of environment variables to update in the session "
816		  "environment when a client is attached."
817	},
818
819	{ .name = "visual-activity",
820	  .type = OPTIONS_TABLE_CHOICE,
821	  .scope = OPTIONS_TABLE_SESSION,
822	  .choices = options_table_visual_bell_list,
823	  .default_num = VISUAL_OFF,
824	  .text = "How activity alerts should be shown: a message ('on'), "
825		  "a message and a bell ('both') or nothing ('off')."
826	},
827
828	{ .name = "visual-bell",
829	  .type = OPTIONS_TABLE_CHOICE,
830	  .scope = OPTIONS_TABLE_SESSION,
831	  .choices = options_table_visual_bell_list,
832	  .default_num = VISUAL_OFF,
833	  .text = "How bell alerts should be shown: a message ('on'), "
834		  "a message and a bell ('both') or nothing ('off')."
835	},
836
837	{ .name = "visual-silence",
838	  .type = OPTIONS_TABLE_CHOICE,
839	  .scope = OPTIONS_TABLE_SESSION,
840	  .choices = options_table_visual_bell_list,
841	  .default_num = VISUAL_OFF,
842	  .text = "How silence alerts should be shown: a message ('on'), "
843		  "a message and a bell ('both') or nothing ('off')."
844	},
845
846	{ .name = "word-separators",
847	  .type = OPTIONS_TABLE_STRING,
848	  .scope = OPTIONS_TABLE_SESSION,
849	  /*
850	   * The set of non-alphanumeric printable ASCII characters minus the
851	   * underscore.
852	   */
853	  .default_str = "!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~",
854	  .text = "Characters considered to separate words."
855	},
856
857	/* Window options. */
858	{ .name = "aggressive-resize",
859	  .type = OPTIONS_TABLE_FLAG,
860	  .scope = OPTIONS_TABLE_WINDOW,
861	  .default_num = 0,
862	  .text = "When 'window-size' is 'smallest', whether the maximum size "
863		  "of a window is the smallest attached session where it is "
864		  "the current window ('on') or the smallest session it is "
865		  "linked to ('off')."
866	},
867
868	{ .name = "allow-passthrough",
869	  .type = OPTIONS_TABLE_CHOICE,
870	  .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
871	  .choices = options_table_allow_passthrough_list,
872	  .default_num = 0,
873	  .text = "Whether applications are allowed to use the escape sequence "
874		  "to bypass tmux. Can be 'off' (disallowed), 'on' (allowed "
875		  "if the pane is visible), or 'all' (allowed even if the pane "
876		  "is invisible)."
877	},
878
879	{ .name = "allow-rename",
880	  .type = OPTIONS_TABLE_FLAG,
881	  .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
882	  .default_num = 0,
883	  .text = "Whether applications are allowed to use the escape sequence "
884		  "to rename windows."
885	},
886
887	{ .name = "allow-set-title",
888	  .type = OPTIONS_TABLE_FLAG,
889	  .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
890	  .default_num = 1,
891	  .text = "Whether applications are allowed to use the escape sequence "
892		  "to set the pane title."
893	},
894
895	{ .name = "alternate-screen",
896	  .type = OPTIONS_TABLE_FLAG,
897	  .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
898	  .default_num = 1,
899	  .text = "Whether applications are allowed to use the alternate "
900		  "screen."
901	},
902
903	{ .name = "automatic-rename",
904	  .type = OPTIONS_TABLE_FLAG,
905	  .scope = OPTIONS_TABLE_WINDOW,
906	  .default_num = 1,
907	  .text = "Whether windows are automatically renamed."
908	},
909
910	{ .name = "automatic-rename-format",
911	  .type = OPTIONS_TABLE_STRING,
912	  .scope = OPTIONS_TABLE_WINDOW,
913	  .default_str = "#{?pane_in_mode,[tmux],#{pane_current_command}}"
914			 "#{?pane_dead,[dead],}",
915	  .text = "Format used to automatically rename windows."
916	},
917
918	{ .name = "clock-mode-colour",
919	  .type = OPTIONS_TABLE_COLOUR,
920	  .scope = OPTIONS_TABLE_WINDOW,
921	  .default_num = 4,
922	  .text = "Colour of the clock in clock mode."
923	},
924
925	{ .name = "clock-mode-style",
926	  .type = OPTIONS_TABLE_CHOICE,
927	  .scope = OPTIONS_TABLE_WINDOW,
928	  .choices = options_table_clock_mode_style_list,
929	  .default_num = 1,
930	  .text = "Time format of the clock in clock mode."
931	},
932
933	{ .name = "copy-mode-match-style",
934	  .type = OPTIONS_TABLE_STRING,
935	  .scope = OPTIONS_TABLE_WINDOW,
936	  .default_str = "bg=cyan,fg=black",
937	  .flags = OPTIONS_TABLE_IS_STYLE,
938	  .separator = ",",
939	  .text = "Style of search matches in copy mode."
940	},
941
942	{ .name = "copy-mode-current-match-style",
943	  .type = OPTIONS_TABLE_STRING,
944	  .scope = OPTIONS_TABLE_WINDOW,
945	  .default_str = "bg=magenta,fg=black",
946	  .flags = OPTIONS_TABLE_IS_STYLE,
947	  .separator = ",",
948	  .text = "Style of the current search match in copy mode."
949	},
950
951	{ .name = "copy-mode-mark-style",
952	  .type = OPTIONS_TABLE_STRING,
953	  .scope = OPTIONS_TABLE_WINDOW,
954	  .default_str = "bg=red,fg=black",
955	  .flags = OPTIONS_TABLE_IS_STYLE,
956	  .separator = ",",
957	  .text = "Style of the marked line in copy mode."
958	},
959
960	{ .name = "fill-character",
961	  .type = OPTIONS_TABLE_STRING,
962	  .scope = OPTIONS_TABLE_WINDOW,
963	  .default_str = "",
964	  .text = "Character used to fill unused parts of window."
965	},
966
967	{ .name = "main-pane-height",
968	  .type = OPTIONS_TABLE_STRING,
969	  .scope = OPTIONS_TABLE_WINDOW,
970	  .default_str = "24",
971	  .text = "Height of the main pane in the 'main-horizontal' layout. "
972		  "This may be a percentage, for example '10%'."
973	},
974
975	{ .name = "main-pane-width",
976	  .type = OPTIONS_TABLE_STRING,
977	  .scope = OPTIONS_TABLE_WINDOW,
978	  .default_str = "80",
979	  .text = "Width of the main pane in the 'main-vertical' layout. "
980		  "This may be a percentage, for example '10%'."
981	},
982
983	{ .name = "mode-keys",
984	  .type = OPTIONS_TABLE_CHOICE,
985	  .scope = OPTIONS_TABLE_WINDOW,
986	  .choices = options_table_mode_keys_list,
987	  .default_num = MODEKEY_EMACS,
988	  .text = "Key set used in copy mode."
989	},
990
991	{ .name = "mode-style",
992	  .type = OPTIONS_TABLE_STRING,
993	  .scope = OPTIONS_TABLE_WINDOW,
994	  .flags = OPTIONS_TABLE_IS_STYLE,
995	  .default_str = "bg=yellow,fg=black",
996	  .separator = ",",
997	  .text = "Style of indicators and highlighting in modes."
998	},
999
1000	{ .name = "monitor-activity",
1001	  .type = OPTIONS_TABLE_FLAG,
1002	  .scope = OPTIONS_TABLE_WINDOW,
1003	  .default_num = 0,
1004	  .text = "Whether an alert is triggered by activity."
1005	},
1006
1007	{ .name = "monitor-bell",
1008	  .type = OPTIONS_TABLE_FLAG,
1009	  .scope = OPTIONS_TABLE_WINDOW,
1010	  .default_num = 1,
1011	  .text = "Whether an alert is triggered by a bell."
1012	},
1013
1014	{ .name = "monitor-silence",
1015	  .type = OPTIONS_TABLE_NUMBER,
1016	  .scope = OPTIONS_TABLE_WINDOW,
1017	  .minimum = 0,
1018	  .maximum = INT_MAX,
1019	  .default_num = 0,
1020	  .text = "Time after which an alert is triggered by silence. "
1021		  "Zero means no alert."
1022
1023	},
1024
1025	{ .name = "other-pane-height",
1026	  .type = OPTIONS_TABLE_STRING,
1027	  .scope = OPTIONS_TABLE_WINDOW,
1028	  .default_str = "0",
1029	  .text = "Height of the other panes in the 'main-horizontal' layout. "
1030		  "This may be a percentage, for example '10%'."
1031	},
1032
1033	{ .name = "other-pane-width",
1034	  .type = OPTIONS_TABLE_STRING,
1035	  .scope = OPTIONS_TABLE_WINDOW,
1036	  .default_str = "0",
1037	  .text = "Height of the other panes in the 'main-vertical' layout. "
1038		  "This may be a percentage, for example '10%'."
1039	},
1040
1041	{ .name = "pane-active-border-style",
1042	  .type = OPTIONS_TABLE_STRING,
1043	  .scope = OPTIONS_TABLE_WINDOW,
1044	  .default_str = "#{?pane_in_mode,fg=yellow,#{?synchronize-panes,fg=red,fg=green}}",
1045	  .flags = OPTIONS_TABLE_IS_STYLE,
1046	  .separator = ",",
1047	  .text = "Style of the active pane border."
1048	},
1049
1050	{ .name = "pane-base-index",
1051	  .type = OPTIONS_TABLE_NUMBER,
1052	  .scope = OPTIONS_TABLE_WINDOW,
1053	  .minimum = 0,
1054	  .maximum = USHRT_MAX,
1055	  .default_num = 0,
1056	  .text = "Index of the first pane in each window."
1057	},
1058
1059	{ .name = "pane-border-format",
1060	  .type = OPTIONS_TABLE_STRING,
1061	  .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
1062	  .default_str = "#{?pane_active,#[reverse],}#{pane_index}#[default] "
1063			 "\"#{pane_title}\"",
1064	  .text = "Format of text in the pane status lines."
1065	},
1066
1067	{ .name = "pane-border-indicators",
1068	  .type = OPTIONS_TABLE_CHOICE,
1069	  .scope = OPTIONS_TABLE_WINDOW,
1070	  .choices = options_table_pane_border_indicators_list,
1071	  .default_num = PANE_BORDER_COLOUR,
1072	  .text = "Whether to indicate the active pane by colouring border or "
1073		  "displaying arrow markers."
1074	},
1075
1076	{ .name = "pane-border-lines",
1077	  .type = OPTIONS_TABLE_CHOICE,
1078	  .scope = OPTIONS_TABLE_WINDOW,
1079	  .choices = options_table_pane_border_lines_list,
1080	  .default_num = PANE_LINES_SINGLE,
1081	  .text = "Type of characters used to draw pane border lines. Some of "
1082		  "these are only supported on terminals with UTF-8 support."
1083	},
1084
1085	{ .name = "pane-border-status",
1086	  .type = OPTIONS_TABLE_CHOICE,
1087	  .scope = OPTIONS_TABLE_WINDOW,
1088	  .choices = options_table_pane_status_list,
1089	  .default_num = PANE_STATUS_OFF,
1090	  .text = "Position of the pane status lines."
1091	},
1092
1093	{ .name = "pane-border-style",
1094	  .type = OPTIONS_TABLE_STRING,
1095	  .scope = OPTIONS_TABLE_WINDOW,
1096	  .default_str = "default",
1097	  .flags = OPTIONS_TABLE_IS_STYLE,
1098	  .separator = ",",
1099	  .text = "Style of the pane status lines."
1100	},
1101
1102	{ .name = "pane-colours",
1103	  .type = OPTIONS_TABLE_COLOUR,
1104	  .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
1105	  .default_str = "",
1106	  .flags = OPTIONS_TABLE_IS_ARRAY,
1107	  .text = "The default colour palette for colours zero to 255."
1108	},
1109
1110	{ .name = "popup-style",
1111	  .type = OPTIONS_TABLE_STRING,
1112	  .scope = OPTIONS_TABLE_WINDOW,
1113	  .default_str = "default",
1114	  .flags = OPTIONS_TABLE_IS_STYLE,
1115	  .separator = ",",
1116	  .text = "Default style of popups."
1117	},
1118
1119	{ .name = "popup-border-style",
1120	  .type = OPTIONS_TABLE_STRING,
1121	  .scope = OPTIONS_TABLE_WINDOW,
1122	  .default_str = "default",
1123	  .flags = OPTIONS_TABLE_IS_STYLE,
1124	  .separator = ",",
1125	  .text = "Default style of popup borders."
1126	},
1127
1128	{ .name = "popup-border-lines",
1129	  .type = OPTIONS_TABLE_CHOICE,
1130	  .scope = OPTIONS_TABLE_WINDOW,
1131	  .choices = options_table_popup_border_lines_list,
1132	  .default_num = BOX_LINES_SINGLE,
1133	  .text = "Type of characters used to draw popup border lines. Some of "
1134		  "these are only supported on terminals with UTF-8 support."
1135	},
1136
1137	{ .name = "remain-on-exit",
1138	  .type = OPTIONS_TABLE_CHOICE,
1139	  .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
1140	  .choices = options_table_remain_on_exit_list,
1141	  .default_num = 0,
1142	  .text = "Whether panes should remain ('on') or be automatically "
1143		  "killed ('off' or 'failed') when the program inside exits."
1144	},
1145
1146	{ .name = "remain-on-exit-format",
1147	  .type = OPTIONS_TABLE_STRING,
1148	  .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
1149	  .default_str = "Pane is dead ("
1150			 "#{?#{!=:#{pane_dead_status},},"
1151	                 "status #{pane_dead_status},}"
1152			 "#{?#{!=:#{pane_dead_signal},},"
1153	                 "signal #{pane_dead_signal},}, "
1154			 "#{t:pane_dead_time})",
1155	  .text = "Message shown after the program in a pane has exited, if "
1156	          "remain-on-exit is enabled."
1157	},
1158
1159	{ .name = "scroll-on-clear",
1160	  .type = OPTIONS_TABLE_FLAG,
1161	  .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
1162	  .default_num = 1,
1163	  .text = "Whether the contents of the screen should be scrolled into"
1164		  "history when clearing the whole screen."
1165	},
1166
1167	{ .name = "synchronize-panes",
1168	  .type = OPTIONS_TABLE_FLAG,
1169	  .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
1170	  .default_num = 0,
1171	  .text = "Whether typing should be sent to all panes simultaneously."
1172	},
1173
1174	{ .name = "window-active-style",
1175	  .type = OPTIONS_TABLE_STRING,
1176	  .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
1177	  .default_str = "default",
1178	  .flags = OPTIONS_TABLE_IS_STYLE,
1179	  .separator = ",",
1180	  .text = "Default style of the active pane."
1181	},
1182
1183	{ .name = "window-size",
1184	  .type = OPTIONS_TABLE_CHOICE,
1185	  .scope = OPTIONS_TABLE_WINDOW,
1186	  .choices = options_table_window_size_list,
1187	  .default_num = WINDOW_SIZE_LATEST,
1188	  .text = "How window size is calculated. "
1189		  "'latest' uses the size of the most recently used client, "
1190		  "'largest' the largest client, 'smallest' the smallest "
1191		  "client and 'manual' a size set by the 'resize-window' "
1192		  "command."
1193	},
1194
1195	{ .name = "window-style",
1196	  .type = OPTIONS_TABLE_STRING,
1197	  .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
1198	  .default_str = "default",
1199	  .flags = OPTIONS_TABLE_IS_STYLE,
1200	  .separator = ",",
1201	  .text = "Default style of panes that are not the active pane."
1202	},
1203
1204	{ .name = "window-status-activity-style",
1205	  .type = OPTIONS_TABLE_STRING,
1206	  .scope = OPTIONS_TABLE_WINDOW,
1207	  .default_str = "reverse",
1208	  .flags = OPTIONS_TABLE_IS_STYLE,
1209	  .separator = ",",
1210	  .text = "Style of windows in the status line with an activity alert."
1211	},
1212
1213	{ .name = "window-status-bell-style",
1214	  .type = OPTIONS_TABLE_STRING,
1215	  .scope = OPTIONS_TABLE_WINDOW,
1216	  .default_str = "reverse",
1217	  .flags = OPTIONS_TABLE_IS_STYLE,
1218	  .separator = ",",
1219	  .text = "Style of windows in the status line with a bell alert."
1220	},
1221
1222	{ .name = "window-status-current-format",
1223	  .type = OPTIONS_TABLE_STRING,
1224	  .scope = OPTIONS_TABLE_WINDOW,
1225	  .default_str = "#I:#W#{?window_flags,#{window_flags}, }",
1226	  .text = "Format of the current window in the status line."
1227	},
1228
1229	{ .name = "window-status-current-style",
1230	  .type = OPTIONS_TABLE_STRING,
1231	  .scope = OPTIONS_TABLE_WINDOW,
1232	  .default_str = "default",
1233	  .flags = OPTIONS_TABLE_IS_STYLE,
1234	  .separator = ",",
1235	  .text = "Style of the current window in the status line."
1236	},
1237
1238	{ .name = "window-status-format",
1239	  .type = OPTIONS_TABLE_STRING,
1240	  .scope = OPTIONS_TABLE_WINDOW,
1241	  .default_str = "#I:#W#{?window_flags,#{window_flags}, }",
1242	  .text = "Format of windows in the status line, except the current "
1243		  "window."
1244	},
1245
1246	{ .name = "window-status-last-style",
1247	  .type = OPTIONS_TABLE_STRING,
1248	  .scope = OPTIONS_TABLE_WINDOW,
1249	  .default_str = "default",
1250	  .flags = OPTIONS_TABLE_IS_STYLE,
1251	  .separator = ",",
1252	  .text = "Style of the last window in the status line."
1253	},
1254
1255	{ .name = "window-status-separator",
1256	  .type = OPTIONS_TABLE_STRING,
1257	  .scope = OPTIONS_TABLE_WINDOW,
1258	  .default_str = " ",
1259	  .text = "Separator between windows in the status line."
1260	},
1261
1262	{ .name = "window-status-style",
1263	  .type = OPTIONS_TABLE_STRING,
1264	  .scope = OPTIONS_TABLE_WINDOW,
1265	  .default_str = "default",
1266	  .flags = OPTIONS_TABLE_IS_STYLE,
1267	  .separator = ",",
1268	  .text = "Style of windows in the status line, except the current and "
1269		  "last windows."
1270	},
1271
1272	{ .name = "wrap-search",
1273	  .type = OPTIONS_TABLE_FLAG,
1274	  .scope = OPTIONS_TABLE_WINDOW,
1275	  .default_num = 1,
1276	  .text = "Whether searching in copy mode should wrap at the top or "
1277		  "bottom."
1278	},
1279
1280	{ .name = "xterm-keys", /* no longer used */
1281	  .type = OPTIONS_TABLE_FLAG,
1282	  .scope = OPTIONS_TABLE_WINDOW,
1283	  .default_num = 1,
1284	  .text = "Whether xterm-style function key sequences should be sent. "
1285		  "This option is no longer used."
1286	},
1287
1288	/* Hook options. */
1289	OPTIONS_TABLE_HOOK("after-bind-key", ""),
1290	OPTIONS_TABLE_HOOK("after-capture-pane", ""),
1291	OPTIONS_TABLE_HOOK("after-copy-mode", ""),
1292	OPTIONS_TABLE_HOOK("after-display-message", ""),
1293	OPTIONS_TABLE_HOOK("after-display-panes", ""),
1294	OPTIONS_TABLE_HOOK("after-kill-pane", ""),
1295	OPTIONS_TABLE_HOOK("after-list-buffers", ""),
1296	OPTIONS_TABLE_HOOK("after-list-clients", ""),
1297	OPTIONS_TABLE_HOOK("after-list-keys", ""),
1298	OPTIONS_TABLE_HOOK("after-list-panes", ""),
1299	OPTIONS_TABLE_HOOK("after-list-sessions", ""),
1300	OPTIONS_TABLE_HOOK("after-list-windows", ""),
1301	OPTIONS_TABLE_HOOK("after-load-buffer", ""),
1302	OPTIONS_TABLE_HOOK("after-lock-server", ""),
1303	OPTIONS_TABLE_HOOK("after-new-session", ""),
1304	OPTIONS_TABLE_HOOK("after-new-window", ""),
1305	OPTIONS_TABLE_HOOK("after-paste-buffer", ""),
1306	OPTIONS_TABLE_HOOK("after-pipe-pane", ""),
1307	OPTIONS_TABLE_HOOK("after-queue", ""),
1308	OPTIONS_TABLE_HOOK("after-refresh-client", ""),
1309	OPTIONS_TABLE_HOOK("after-rename-session", ""),
1310	OPTIONS_TABLE_HOOK("after-rename-window", ""),
1311	OPTIONS_TABLE_HOOK("after-resize-pane", ""),
1312	OPTIONS_TABLE_HOOK("after-resize-window", ""),
1313	OPTIONS_TABLE_HOOK("after-save-buffer", ""),
1314	OPTIONS_TABLE_HOOK("after-select-layout", ""),
1315	OPTIONS_TABLE_HOOK("after-select-pane", ""),
1316	OPTIONS_TABLE_HOOK("after-select-window", ""),
1317	OPTIONS_TABLE_HOOK("after-send-keys", ""),
1318	OPTIONS_TABLE_HOOK("after-set-buffer", ""),
1319	OPTIONS_TABLE_HOOK("after-set-environment", ""),
1320	OPTIONS_TABLE_HOOK("after-set-hook", ""),
1321	OPTIONS_TABLE_HOOK("after-set-option", ""),
1322	OPTIONS_TABLE_HOOK("after-show-environment", ""),
1323	OPTIONS_TABLE_HOOK("after-show-messages", ""),
1324	OPTIONS_TABLE_HOOK("after-show-options", ""),
1325	OPTIONS_TABLE_HOOK("after-split-window", ""),
1326	OPTIONS_TABLE_HOOK("after-unbind-key", ""),
1327	OPTIONS_TABLE_HOOK("alert-activity", ""),
1328	OPTIONS_TABLE_HOOK("alert-bell", ""),
1329	OPTIONS_TABLE_HOOK("alert-silence", ""),
1330	OPTIONS_TABLE_HOOK("client-active", ""),
1331	OPTIONS_TABLE_HOOK("client-attached", ""),
1332	OPTIONS_TABLE_HOOK("client-detached", ""),
1333	OPTIONS_TABLE_HOOK("client-focus-in", ""),
1334	OPTIONS_TABLE_HOOK("client-focus-out", ""),
1335	OPTIONS_TABLE_HOOK("client-resized", ""),
1336	OPTIONS_TABLE_HOOK("client-session-changed", ""),
1337	OPTIONS_TABLE_PANE_HOOK("pane-died", ""),
1338	OPTIONS_TABLE_PANE_HOOK("pane-exited", ""),
1339	OPTIONS_TABLE_PANE_HOOK("pane-focus-in", ""),
1340	OPTIONS_TABLE_PANE_HOOK("pane-focus-out", ""),
1341	OPTIONS_TABLE_PANE_HOOK("pane-mode-changed", ""),
1342	OPTIONS_TABLE_PANE_HOOK("pane-set-clipboard", ""),
1343	OPTIONS_TABLE_PANE_HOOK("pane-title-changed", ""),
1344	OPTIONS_TABLE_HOOK("session-closed", ""),
1345	OPTIONS_TABLE_HOOK("session-created", ""),
1346	OPTIONS_TABLE_HOOK("session-renamed", ""),
1347	OPTIONS_TABLE_HOOK("session-window-changed", ""),
1348	OPTIONS_TABLE_WINDOW_HOOK("window-layout-changed", ""),
1349	OPTIONS_TABLE_HOOK("window-linked", ""),
1350	OPTIONS_TABLE_WINDOW_HOOK("window-pane-changed", ""),
1351	OPTIONS_TABLE_WINDOW_HOOK("window-renamed", ""),
1352	OPTIONS_TABLE_WINDOW_HOOK("window-resized", ""),
1353	OPTIONS_TABLE_HOOK("window-unlinked", ""),
1354
1355	{ .name = NULL }
1356};
1357