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