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