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