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