options-table.c revision 1.99
1/* $OpenBSD: options-table.c,v 1.99 2019/03/18 20:53:33 nicm Exp $ */ 2 3/* 4 * Copyright (c) 2011 Nicholas Marriott <nicholas.marriott@gmail.com> 5 * 6 * Permission to use, copy, modify, and distribute this software for any 7 * purpose with or without fee is hereby granted, provided that the above 8 * copyright notice and this permission notice appear in all copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER 15 * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING 16 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19#include <sys/types.h> 20 21#include <string.h> 22#include <paths.h> 23 24#include "tmux.h" 25 26/* 27 * This file has a tables with all the server, session and window 28 * options. These tables are the master copy of the options with their real 29 * (user-visible) types, range limits and default values. At start these are 30 * copied into the runtime global options trees (which only has number and 31 * string types). These tables are then used to look up the real type when the 32 * user sets an option or its value needs to be shown. 33 */ 34 35/* Choice option type lists. */ 36static const char *options_table_mode_keys_list[] = { 37 "emacs", "vi", NULL 38}; 39static const char *options_table_clock_mode_style_list[] = { 40 "12", "24", NULL 41}; 42static const char *options_table_status_list[] = { 43 "off", "on", "2", "3", "4", "5", NULL 44}; 45static const char *options_table_status_keys_list[] = { 46 "emacs", "vi", NULL 47}; 48static const char *options_table_status_justify_list[] = { 49 "left", "centre", "right", NULL 50}; 51static const char *options_table_status_position_list[] = { 52 "top", "bottom", NULL 53}; 54static const char *options_table_bell_action_list[] = { 55 "none", "any", "current", "other", NULL 56}; 57static const char *options_table_visual_bell_list[] = { 58 "off", "on", "both", NULL 59}; 60static const char *options_table_pane_status_list[] = { 61 "off", "top", "bottom", NULL 62}; 63static const char *options_table_set_clipboard_list[] = { 64 "off", "external", "on", NULL 65}; 66static const char *options_table_window_size_list[] = { 67 "largest", "smallest", "manual", NULL 68}; 69 70/* Status line format. */ 71#define OPTIONS_TABLE_STATUS_FORMAT1 \ 72 "#[align=left range=left #{status-left-style}]" \ 73 "#{T;=/#{status-left-length}:status-left}#[norange default]" \ 74 "#[list=on align=#{status-justify}]" \ 75 "#[list=left-marker]<#[list=right-marker]>#[list=on]" \ 76 "#{W:" \ 77 "#[range=window|#{window_index}" \ 78 "#{?window_last_flag, #{window-status-last-style},}" \ 79 "#{?window_bell_flag," \ 80 " #{window-status-bell-style}," \ 81 "#{?window_activity_flag," \ 82 " #{window-status-activity-style},}" \ 83 "}" \ 84 "]" \ 85 "#{T:window-status-format}" \ 86 "#[norange default]" \ 87 "#{?window_end_flag,,#{window-status-separator}}" \ 88 "," \ 89 "#[range=window|#{window_index} list=focus" \ 90 "#{?window_last_flag, #{window-status-last-style},}" \ 91 "#{?window_bell_flag," \ 92 " #{window-status-bell-style}," \ 93 "#{?window_activity_flag," \ 94 " #{window-status-activity-style},}" \ 95 "}" \ 96 "]" \ 97 "#{T:window-status-current-format}" \ 98 "#[norange list=on default]" \ 99 "#{?window_end_flag,,#{window-status-separator}}" \ 100 "}" \ 101 "#[nolist align=right range=right #{status-right-style}]" \ 102 "#{T;=/#{status-right-length}:status-right}#[norange default]" 103#define OPTIONS_TABLE_STATUS_FORMAT2 \ 104 "#[align=centre]#{P:#{?pane_active,#[reverse],}" \ 105 "#{pane_index}[#{pane_width}x#{pane_height}]#[default] }" 106static const char *options_table_status_format_default[] = { 107 OPTIONS_TABLE_STATUS_FORMAT1, OPTIONS_TABLE_STATUS_FORMAT2, NULL 108}; 109 110/* Top-level options. */ 111const struct options_table_entry options_table[] = { 112 { .name = "buffer-limit", 113 .type = OPTIONS_TABLE_NUMBER, 114 .scope = OPTIONS_TABLE_SERVER, 115 .minimum = 1, 116 .maximum = INT_MAX, 117 .default_num = 50 118 }, 119 120 { .name = "command-alias", 121 .type = OPTIONS_TABLE_ARRAY, 122 .scope = OPTIONS_TABLE_SERVER, 123 .default_str = "split-pane=split-window," 124 "splitp=split-window," 125 "server-info=show-messages -JT," 126 "info=show-messages -JT," 127 "choose-window=choose-tree -w," 128 "choose-session=choose-tree -s", 129 .separator = "," 130 }, 131 132 { .name = "default-terminal", 133 .type = OPTIONS_TABLE_STRING, 134 .scope = OPTIONS_TABLE_SERVER, 135 .default_str = "screen" 136 }, 137 138 { .name = "escape-time", 139 .type = OPTIONS_TABLE_NUMBER, 140 .scope = OPTIONS_TABLE_SERVER, 141 .minimum = 0, 142 .maximum = INT_MAX, 143 .default_num = 500 144 }, 145 146 { .name = "exit-empty", 147 .type = OPTIONS_TABLE_FLAG, 148 .scope = OPTIONS_TABLE_SERVER, 149 .default_num = 1 150 }, 151 152 { .name = "exit-unattached", 153 .type = OPTIONS_TABLE_FLAG, 154 .scope = OPTIONS_TABLE_SERVER, 155 .default_num = 0 156 }, 157 158 { .name = "focus-events", 159 .type = OPTIONS_TABLE_FLAG, 160 .scope = OPTIONS_TABLE_SERVER, 161 .default_num = 0 162 }, 163 164 { .name = "history-file", 165 .type = OPTIONS_TABLE_STRING, 166 .scope = OPTIONS_TABLE_SERVER, 167 .default_str = "" 168 }, 169 170 { .name = "message-limit", 171 .type = OPTIONS_TABLE_NUMBER, 172 .scope = OPTIONS_TABLE_SERVER, 173 .minimum = 0, 174 .maximum = INT_MAX, 175 .default_num = 100 176 }, 177 178 { .name = "set-clipboard", 179 .type = OPTIONS_TABLE_CHOICE, 180 .scope = OPTIONS_TABLE_SERVER, 181 .choices = options_table_set_clipboard_list, 182 .default_num = 1 183 }, 184 185 { .name = "terminal-overrides", 186 .type = OPTIONS_TABLE_ARRAY, 187 .scope = OPTIONS_TABLE_SERVER, 188 .default_str = "xterm*:XT:Ms=\\E]52;%p1%s;%p2%s\\007" 189 ":Cs=\\E]12;%p1%s\\007:Cr=\\E]112\\007" 190 ":Ss=\\E[%p1%d q:Se=\\E[2 q,screen*:XT", 191 .separator = "," 192 }, 193 194 { .name = "user-keys", 195 .type = OPTIONS_TABLE_ARRAY, 196 .scope = OPTIONS_TABLE_SERVER, 197 .default_str = "", 198 .separator = "," 199 }, 200 201 { .name = "activity-action", 202 .type = OPTIONS_TABLE_CHOICE, 203 .scope = OPTIONS_TABLE_SESSION, 204 .choices = options_table_bell_action_list, 205 .default_num = ALERT_OTHER 206 }, 207 208 { .name = "assume-paste-time", 209 .type = OPTIONS_TABLE_NUMBER, 210 .scope = OPTIONS_TABLE_SESSION, 211 .minimum = 0, 212 .maximum = INT_MAX, 213 .default_num = 1, 214 }, 215 216 { .name = "base-index", 217 .type = OPTIONS_TABLE_NUMBER, 218 .scope = OPTIONS_TABLE_SESSION, 219 .minimum = 0, 220 .maximum = INT_MAX, 221 .default_num = 0 222 }, 223 224 { .name = "bell-action", 225 .type = OPTIONS_TABLE_CHOICE, 226 .scope = OPTIONS_TABLE_SESSION, 227 .choices = options_table_bell_action_list, 228 .default_num = ALERT_ANY 229 }, 230 231 { .name = "default-command", 232 .type = OPTIONS_TABLE_STRING, 233 .scope = OPTIONS_TABLE_SESSION, 234 .default_str = "" 235 }, 236 237 { .name = "default-shell", 238 .type = OPTIONS_TABLE_STRING, 239 .scope = OPTIONS_TABLE_SESSION, 240 .default_str = _PATH_BSHELL 241 }, 242 243 { .name = "default-size", 244 .type = OPTIONS_TABLE_STRING, 245 .scope = OPTIONS_TABLE_SESSION, 246 .pattern = "[0-9]*x[0-9]*", 247 .default_str = "80x24" 248 }, 249 250 { .name = "destroy-unattached", 251 .type = OPTIONS_TABLE_FLAG, 252 .scope = OPTIONS_TABLE_SESSION, 253 .default_num = 0 254 }, 255 256 { .name = "detach-on-destroy", 257 .type = OPTIONS_TABLE_FLAG, 258 .scope = OPTIONS_TABLE_SESSION, 259 .default_num = 1 260 }, 261 262 { .name = "display-panes-active-colour", 263 .type = OPTIONS_TABLE_COLOUR, 264 .scope = OPTIONS_TABLE_SESSION, 265 .default_num = 1 266 }, 267 268 { .name = "display-panes-colour", 269 .type = OPTIONS_TABLE_COLOUR, 270 .scope = OPTIONS_TABLE_SESSION, 271 .default_num = 4 272 }, 273 274 { .name = "display-panes-time", 275 .type = OPTIONS_TABLE_NUMBER, 276 .scope = OPTIONS_TABLE_SESSION, 277 .minimum = 1, 278 .maximum = INT_MAX, 279 .default_num = 1000 280 }, 281 282 { .name = "display-time", 283 .type = OPTIONS_TABLE_NUMBER, 284 .scope = OPTIONS_TABLE_SESSION, 285 .minimum = 0, 286 .maximum = INT_MAX, 287 .default_num = 750 288 }, 289 290 { .name = "history-limit", 291 .type = OPTIONS_TABLE_NUMBER, 292 .scope = OPTIONS_TABLE_SESSION, 293 .minimum = 0, 294 .maximum = INT_MAX, 295 .default_num = 2000 296 }, 297 298 { .name = "key-table", 299 .type = OPTIONS_TABLE_STRING, 300 .scope = OPTIONS_TABLE_SESSION, 301 .default_str = "root" 302 }, 303 304 { .name = "lock-after-time", 305 .type = OPTIONS_TABLE_NUMBER, 306 .scope = OPTIONS_TABLE_SESSION, 307 .minimum = 0, 308 .maximum = INT_MAX, 309 .default_num = 0 310 }, 311 312 { .name = "lock-command", 313 .type = OPTIONS_TABLE_STRING, 314 .scope = OPTIONS_TABLE_SESSION, 315 .default_str = "lock -np" 316 }, 317 318 { .name = "message-attr", 319 .type = OPTIONS_TABLE_ATTRIBUTES, 320 .scope = OPTIONS_TABLE_SESSION, 321 .default_num = 0, 322 .style = "message-style" 323 }, 324 325 { .name = "message-bg", 326 .type = OPTIONS_TABLE_COLOUR, 327 .scope = OPTIONS_TABLE_SESSION, 328 .default_num = 3, 329 .style = "message-style" 330 }, 331 332 { .name = "message-command-attr", 333 .type = OPTIONS_TABLE_ATTRIBUTES, 334 .scope = OPTIONS_TABLE_SESSION, 335 .default_num = 0, 336 .style = "message-command-style" 337 }, 338 339 { .name = "message-command-bg", 340 .type = OPTIONS_TABLE_COLOUR, 341 .scope = OPTIONS_TABLE_SESSION, 342 .default_num = 0, 343 .style = "message-command-style" 344 }, 345 346 { .name = "message-command-fg", 347 .type = OPTIONS_TABLE_COLOUR, 348 .scope = OPTIONS_TABLE_SESSION, 349 .default_num = 3, 350 .style = "message-command-style" 351 }, 352 353 { .name = "message-command-style", 354 .type = OPTIONS_TABLE_STYLE, 355 .scope = OPTIONS_TABLE_SESSION, 356 .default_str = "bg=black,fg=yellow" 357 }, 358 359 { .name = "message-fg", 360 .type = OPTIONS_TABLE_COLOUR, 361 .scope = OPTIONS_TABLE_SESSION, 362 .default_num = 0, 363 .style = "message-style" 364 }, 365 366 { .name = "message-style", 367 .type = OPTIONS_TABLE_STYLE, 368 .scope = OPTIONS_TABLE_SESSION, 369 .default_str = "bg=yellow,fg=black" 370 }, 371 372 { .name = "mouse", 373 .type = OPTIONS_TABLE_FLAG, 374 .scope = OPTIONS_TABLE_SESSION, 375 .default_num = 0 376 }, 377 378 { .name = "prefix", 379 .type = OPTIONS_TABLE_KEY, 380 .scope = OPTIONS_TABLE_SESSION, 381 .default_num = '\002', 382 }, 383 384 { .name = "prefix2", 385 .type = OPTIONS_TABLE_KEY, 386 .scope = OPTIONS_TABLE_SESSION, 387 .default_num = KEYC_NONE, 388 }, 389 390 { .name = "renumber-windows", 391 .type = OPTIONS_TABLE_FLAG, 392 .scope = OPTIONS_TABLE_SESSION, 393 .default_num = 0 394 }, 395 396 { .name = "repeat-time", 397 .type = OPTIONS_TABLE_NUMBER, 398 .scope = OPTIONS_TABLE_SESSION, 399 .minimum = 0, 400 .maximum = SHRT_MAX, 401 .default_num = 500 402 }, 403 404 { .name = "set-titles", 405 .type = OPTIONS_TABLE_FLAG, 406 .scope = OPTIONS_TABLE_SESSION, 407 .default_num = 0 408 }, 409 410 { .name = "set-titles-string", 411 .type = OPTIONS_TABLE_STRING, 412 .scope = OPTIONS_TABLE_SESSION, 413 .default_str = "#S:#I:#W - \"#T\" #{session_alerts}" 414 }, 415 416 { .name = "silence-action", 417 .type = OPTIONS_TABLE_CHOICE, 418 .scope = OPTIONS_TABLE_SESSION, 419 .choices = options_table_bell_action_list, 420 .default_num = ALERT_OTHER 421 }, 422 423 { .name = "status", 424 .type = OPTIONS_TABLE_CHOICE, 425 .scope = OPTIONS_TABLE_SESSION, 426 .choices = options_table_status_list, 427 .default_num = 1 428 }, 429 430 { .name = "status-attr", 431 .type = OPTIONS_TABLE_ATTRIBUTES, 432 .scope = OPTIONS_TABLE_SESSION, 433 .default_num = 0, 434 .style = "status-style" 435 }, 436 437 { .name = "status-bg", 438 .type = OPTIONS_TABLE_COLOUR, 439 .scope = OPTIONS_TABLE_SESSION, 440 .default_num = 2, 441 .style = "status-style" 442 }, 443 444 { .name = "status-fg", 445 .type = OPTIONS_TABLE_COLOUR, 446 .scope = OPTIONS_TABLE_SESSION, 447 .default_num = 0, 448 .style = "status-style" 449 }, 450 451 { .name = "status-format", 452 .type = OPTIONS_TABLE_ARRAY, 453 .scope = OPTIONS_TABLE_SESSION, 454 .default_arr = options_table_status_format_default, 455 }, 456 457 { .name = "status-interval", 458 .type = OPTIONS_TABLE_NUMBER, 459 .scope = OPTIONS_TABLE_SESSION, 460 .minimum = 0, 461 .maximum = INT_MAX, 462 .default_num = 15 463 }, 464 465 { .name = "status-justify", 466 .type = OPTIONS_TABLE_CHOICE, 467 .scope = OPTIONS_TABLE_SESSION, 468 .choices = options_table_status_justify_list, 469 .default_num = 0 470 }, 471 472 { .name = "status-keys", 473 .type = OPTIONS_TABLE_CHOICE, 474 .scope = OPTIONS_TABLE_SESSION, 475 .choices = options_table_status_keys_list, 476 .default_num = MODEKEY_EMACS 477 }, 478 479 { .name = "status-left", 480 .type = OPTIONS_TABLE_STRING, 481 .scope = OPTIONS_TABLE_SESSION, 482 .default_str = "[#S] " 483 }, 484 485 { .name = "status-left-attr", 486 .type = OPTIONS_TABLE_ATTRIBUTES, 487 .scope = OPTIONS_TABLE_SESSION, 488 .default_num = 0, 489 .style = "status-left-style" 490 }, 491 492 { .name = "status-left-bg", 493 .type = OPTIONS_TABLE_COLOUR, 494 .scope = OPTIONS_TABLE_SESSION, 495 .default_num = 8, 496 .style = "status-left-style" 497 }, 498 499 { .name = "status-left-fg", 500 .type = OPTIONS_TABLE_COLOUR, 501 .scope = OPTIONS_TABLE_SESSION, 502 .default_num = 8, 503 .style = "status-left-style" 504 }, 505 506 { .name = "status-left-length", 507 .type = OPTIONS_TABLE_NUMBER, 508 .scope = OPTIONS_TABLE_SESSION, 509 .minimum = 0, 510 .maximum = SHRT_MAX, 511 .default_num = 10 512 }, 513 514 { .name = "status-left-style", 515 .type = OPTIONS_TABLE_STYLE, 516 .scope = OPTIONS_TABLE_SESSION, 517 .default_str = "default" 518 }, 519 520 { .name = "status-position", 521 .type = OPTIONS_TABLE_CHOICE, 522 .scope = OPTIONS_TABLE_SESSION, 523 .choices = options_table_status_position_list, 524 .default_num = 1 525 }, 526 527 { .name = "status-right", 528 .type = OPTIONS_TABLE_STRING, 529 .scope = OPTIONS_TABLE_SESSION, 530 .default_str = "#{?window_bigger," 531 "[#{window_offset_x}#,#{window_offset_y}] ,}" 532 "\"#{=21:pane_title}\" %H:%M %d-%b-%y" 533 }, 534 535 { .name = "status-right-attr", 536 .type = OPTIONS_TABLE_ATTRIBUTES, 537 .scope = OPTIONS_TABLE_SESSION, 538 .default_num = 0, 539 .style = "status-right-style" 540 }, 541 542 { .name = "status-right-bg", 543 .type = OPTIONS_TABLE_COLOUR, 544 .scope = OPTIONS_TABLE_SESSION, 545 .default_num = 8, 546 .style = "status-right-style" 547 }, 548 549 { .name = "status-right-fg", 550 .type = OPTIONS_TABLE_COLOUR, 551 .scope = OPTIONS_TABLE_SESSION, 552 .default_num = 8, 553 .style = "status-right-style" 554 }, 555 556 { .name = "status-right-length", 557 .type = OPTIONS_TABLE_NUMBER, 558 .scope = OPTIONS_TABLE_SESSION, 559 .minimum = 0, 560 .maximum = SHRT_MAX, 561 .default_num = 40 562 }, 563 564 { .name = "status-right-style", 565 .type = OPTIONS_TABLE_STYLE, 566 .scope = OPTIONS_TABLE_SESSION, 567 .default_str = "default" 568 }, 569 570 { .name = "status-style", 571 .type = OPTIONS_TABLE_STYLE, 572 .scope = OPTIONS_TABLE_SESSION, 573 .default_str = "bg=green,fg=black" 574 }, 575 576 { .name = "update-environment", 577 .type = OPTIONS_TABLE_ARRAY, 578 .scope = OPTIONS_TABLE_SESSION, 579 .default_str = "DISPLAY KRB5CCNAME SSH_ASKPASS SSH_AUTH_SOCK " 580 "SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY" 581 }, 582 583 { .name = "visual-activity", 584 .type = OPTIONS_TABLE_CHOICE, 585 .scope = OPTIONS_TABLE_SESSION, 586 .choices = options_table_visual_bell_list, 587 .default_num = VISUAL_OFF 588 }, 589 590 { .name = "visual-bell", 591 .type = OPTIONS_TABLE_CHOICE, 592 .scope = OPTIONS_TABLE_SESSION, 593 .choices = options_table_visual_bell_list, 594 .default_num = VISUAL_OFF 595 }, 596 597 { .name = "visual-silence", 598 .type = OPTIONS_TABLE_CHOICE, 599 .scope = OPTIONS_TABLE_SESSION, 600 .choices = options_table_visual_bell_list, 601 .default_num = VISUAL_OFF 602 }, 603 604 { .name = "word-separators", 605 .type = OPTIONS_TABLE_STRING, 606 .scope = OPTIONS_TABLE_SESSION, 607 .default_str = " -_@" 608 }, 609 610 { .name = "aggressive-resize", 611 .type = OPTIONS_TABLE_FLAG, 612 .scope = OPTIONS_TABLE_WINDOW, 613 .default_num = 0 614 }, 615 616 { .name = "allow-rename", 617 .type = OPTIONS_TABLE_FLAG, 618 .scope = OPTIONS_TABLE_WINDOW, 619 .default_num = 0 620 }, 621 622 { .name = "alternate-screen", 623 .type = OPTIONS_TABLE_FLAG, 624 .scope = OPTIONS_TABLE_WINDOW, 625 .default_num = 1 626 }, 627 628 { .name = "automatic-rename", 629 .type = OPTIONS_TABLE_FLAG, 630 .scope = OPTIONS_TABLE_WINDOW, 631 .default_num = 1 632 }, 633 634 { .name = "automatic-rename-format", 635 .type = OPTIONS_TABLE_STRING, 636 .scope = OPTIONS_TABLE_WINDOW, 637 .default_str = "#{?pane_in_mode,[tmux],#{pane_current_command}}" 638 "#{?pane_dead,[dead],}" 639 }, 640 641 { .name = "clock-mode-colour", 642 .type = OPTIONS_TABLE_COLOUR, 643 .scope = OPTIONS_TABLE_WINDOW, 644 .default_num = 4 645 }, 646 647 { .name = "clock-mode-style", 648 .type = OPTIONS_TABLE_CHOICE, 649 .scope = OPTIONS_TABLE_WINDOW, 650 .choices = options_table_clock_mode_style_list, 651 .default_num = 1 652 }, 653 654 { .name = "main-pane-height", 655 .type = OPTIONS_TABLE_NUMBER, 656 .scope = OPTIONS_TABLE_WINDOW, 657 .minimum = 1, 658 .maximum = INT_MAX, 659 .default_num = 24 660 }, 661 662 { .name = "main-pane-width", 663 .type = OPTIONS_TABLE_NUMBER, 664 .scope = OPTIONS_TABLE_WINDOW, 665 .minimum = 1, 666 .maximum = INT_MAX, 667 .default_num = 80 668 }, 669 670 { .name = "mode-attr", 671 .type = OPTIONS_TABLE_ATTRIBUTES, 672 .scope = OPTIONS_TABLE_WINDOW, 673 .default_num = 0, 674 .style = "mode-style" 675 }, 676 677 { .name = "mode-bg", 678 .type = OPTIONS_TABLE_COLOUR, 679 .scope = OPTIONS_TABLE_WINDOW, 680 .default_num = 3, 681 .style = "mode-style" 682 }, 683 684 { .name = "mode-fg", 685 .type = OPTIONS_TABLE_COLOUR, 686 .scope = OPTIONS_TABLE_WINDOW, 687 .default_num = 0, 688 .style = "mode-style" 689 }, 690 691 { .name = "mode-keys", 692 .type = OPTIONS_TABLE_CHOICE, 693 .scope = OPTIONS_TABLE_WINDOW, 694 .choices = options_table_mode_keys_list, 695 .default_num = MODEKEY_EMACS 696 }, 697 698 { .name = "mode-style", 699 .type = OPTIONS_TABLE_STYLE, 700 .scope = OPTIONS_TABLE_WINDOW, 701 .default_str = "bg=yellow,fg=black" 702 }, 703 704 { .name = "monitor-activity", 705 .type = OPTIONS_TABLE_FLAG, 706 .scope = OPTIONS_TABLE_WINDOW, 707 .default_num = 0 708 }, 709 710 { .name = "monitor-bell", 711 .type = OPTIONS_TABLE_FLAG, 712 .scope = OPTIONS_TABLE_WINDOW, 713 .default_num = 1 714 }, 715 716 { .name = "monitor-silence", 717 .type = OPTIONS_TABLE_NUMBER, 718 .scope = OPTIONS_TABLE_WINDOW, 719 .minimum = 0, 720 .maximum = INT_MAX, 721 .default_num = 0 722 }, 723 724 { .name = "other-pane-height", 725 .type = OPTIONS_TABLE_NUMBER, 726 .scope = OPTIONS_TABLE_WINDOW, 727 .minimum = 0, 728 .maximum = INT_MAX, 729 .default_num = 0 730 }, 731 732 { .name = "other-pane-width", 733 .type = OPTIONS_TABLE_NUMBER, 734 .scope = OPTIONS_TABLE_WINDOW, 735 .minimum = 0, 736 .maximum = INT_MAX, 737 .default_num = 0 738 }, 739 740 { .name = "pane-active-border-bg", 741 .type = OPTIONS_TABLE_COLOUR, 742 .scope = OPTIONS_TABLE_WINDOW, 743 .default_num = 8, 744 .style = "pane-active-border-style" 745 }, 746 747 { .name = "pane-active-border-fg", 748 .type = OPTIONS_TABLE_COLOUR, 749 .scope = OPTIONS_TABLE_WINDOW, 750 .default_num = 2, 751 .style = "pane-active-border-style" 752 }, 753 754 { .name = "pane-active-border-style", 755 .type = OPTIONS_TABLE_STYLE, 756 .scope = OPTIONS_TABLE_WINDOW, 757 .default_str = "fg=green" 758 }, 759 760 { .name = "pane-base-index", 761 .type = OPTIONS_TABLE_NUMBER, 762 .scope = OPTIONS_TABLE_WINDOW, 763 .minimum = 0, 764 .maximum = USHRT_MAX, 765 .default_num = 0 766 }, 767 768 { .name = "pane-border-bg", 769 .type = OPTIONS_TABLE_COLOUR, 770 .scope = OPTIONS_TABLE_WINDOW, 771 .default_num = 8, 772 .style = "pane-border-style" 773 }, 774 775 { .name = "pane-border-fg", 776 .type = OPTIONS_TABLE_COLOUR, 777 .scope = OPTIONS_TABLE_WINDOW, 778 .default_num = 8, 779 .style = "pane-border-style" 780 }, 781 782 { .name = "pane-border-format", 783 .type = OPTIONS_TABLE_STRING, 784 .scope = OPTIONS_TABLE_WINDOW, 785 .default_str = "#{?pane_active,#[reverse],}#{pane_index}#[default] " 786 "\"#{pane_title}\"" 787 }, 788 789 { .name = "pane-border-status", 790 .type = OPTIONS_TABLE_CHOICE, 791 .scope = OPTIONS_TABLE_WINDOW, 792 .choices = options_table_pane_status_list, 793 .default_num = 0 794 }, 795 796 { .name = "pane-border-style", 797 .type = OPTIONS_TABLE_STYLE, 798 .scope = OPTIONS_TABLE_WINDOW, 799 .default_str = "default" 800 }, 801 802 { .name = "remain-on-exit", 803 .type = OPTIONS_TABLE_FLAG, 804 .scope = OPTIONS_TABLE_WINDOW, 805 .default_num = 0 806 }, 807 808 { .name = "synchronize-panes", 809 .type = OPTIONS_TABLE_FLAG, 810 .scope = OPTIONS_TABLE_WINDOW, 811 .default_num = 0 812 }, 813 814 { .name = "window-active-style", 815 .type = OPTIONS_TABLE_STYLE, 816 .scope = OPTIONS_TABLE_WINDOW, 817 .default_str = "default" 818 }, 819 820 { .name = "window-size", 821 .type = OPTIONS_TABLE_CHOICE, 822 .scope = OPTIONS_TABLE_WINDOW, 823 .choices = options_table_window_size_list, 824 .default_num = WINDOW_SIZE_SMALLEST 825 }, 826 827 { .name = "window-style", 828 .type = OPTIONS_TABLE_STYLE, 829 .scope = OPTIONS_TABLE_WINDOW, 830 .default_str = "default" 831 }, 832 833 { .name = "window-status-activity-attr", 834 .type = OPTIONS_TABLE_ATTRIBUTES, 835 .scope = OPTIONS_TABLE_WINDOW, 836 .default_num = GRID_ATTR_REVERSE, 837 .style = "window-status-activity-style" 838 }, 839 840 { .name = "window-status-activity-bg", 841 .type = OPTIONS_TABLE_COLOUR, 842 .scope = OPTIONS_TABLE_WINDOW, 843 .default_num = 8, 844 .style = "window-status-activity-style" 845 }, 846 847 { .name = "window-status-activity-fg", 848 .type = OPTIONS_TABLE_COLOUR, 849 .scope = OPTIONS_TABLE_WINDOW, 850 .default_num = 8, 851 .style = "window-status-activity-style" 852 }, 853 854 { .name = "window-status-activity-style", 855 .type = OPTIONS_TABLE_STYLE, 856 .scope = OPTIONS_TABLE_WINDOW, 857 .default_str = "reverse" 858 }, 859 860 { .name = "window-status-attr", 861 .type = OPTIONS_TABLE_ATTRIBUTES, 862 .scope = OPTIONS_TABLE_WINDOW, 863 .default_num = 0, 864 .style = "window-status-style" 865 }, 866 867 { .name = "window-status-bell-attr", 868 .type = OPTIONS_TABLE_ATTRIBUTES, 869 .scope = OPTIONS_TABLE_WINDOW, 870 .default_num = GRID_ATTR_REVERSE, 871 .style = "window-status-bell-style" 872 }, 873 874 { .name = "window-status-bell-bg", 875 .type = OPTIONS_TABLE_COLOUR, 876 .scope = OPTIONS_TABLE_WINDOW, 877 .default_num = 8, 878 .style = "window-status-bell-style" 879 }, 880 881 { .name = "window-status-bell-fg", 882 .type = OPTIONS_TABLE_COLOUR, 883 .scope = OPTIONS_TABLE_WINDOW, 884 .default_num = 8, 885 .style = "window-status-bell-style" 886 }, 887 888 { .name = "window-status-bell-style", 889 .type = OPTIONS_TABLE_STYLE, 890 .scope = OPTIONS_TABLE_WINDOW, 891 .default_str = "reverse" 892 }, 893 894 { .name = "window-status-bg", 895 .type = OPTIONS_TABLE_COLOUR, 896 .scope = OPTIONS_TABLE_WINDOW, 897 .default_num = 8, 898 .style = "window-status-style" 899 }, 900 901 { .name = "window-status-current-attr", 902 .type = OPTIONS_TABLE_ATTRIBUTES, 903 .scope = OPTIONS_TABLE_WINDOW, 904 .default_num = 0, 905 .style = "window-status-current-style" 906 }, 907 908 { .name = "window-status-current-bg", 909 .type = OPTIONS_TABLE_COLOUR, 910 .scope = OPTIONS_TABLE_WINDOW, 911 .default_num = 8, 912 .style = "window-status-current-style" 913 }, 914 915 { .name = "window-status-current-fg", 916 .type = OPTIONS_TABLE_COLOUR, 917 .scope = OPTIONS_TABLE_WINDOW, 918 .default_num = 8, 919 .style = "window-status-current-style" 920 }, 921 922 { .name = "window-status-current-format", 923 .type = OPTIONS_TABLE_STRING, 924 .scope = OPTIONS_TABLE_WINDOW, 925 .default_str = "#I:#W#{?window_flags,#{window_flags}, }" 926 }, 927 928 { .name = "window-status-current-style", 929 .type = OPTIONS_TABLE_STYLE, 930 .scope = OPTIONS_TABLE_WINDOW, 931 .default_str = "default" 932 }, 933 934 { .name = "window-status-fg", 935 .type = OPTIONS_TABLE_COLOUR, 936 .scope = OPTIONS_TABLE_WINDOW, 937 .default_num = 8, 938 .style = "window-status-style" 939 }, 940 941 { .name = "window-status-format", 942 .type = OPTIONS_TABLE_STRING, 943 .scope = OPTIONS_TABLE_WINDOW, 944 .default_str = "#I:#W#{?window_flags,#{window_flags}, }" 945 }, 946 947 { .name = "window-status-last-attr", 948 .type = OPTIONS_TABLE_ATTRIBUTES, 949 .scope = OPTIONS_TABLE_WINDOW, 950 .default_num = 0, 951 .style = "window-status-last-style" 952 }, 953 954 { .name = "window-status-last-bg", 955 .type = OPTIONS_TABLE_COLOUR, 956 .scope = OPTIONS_TABLE_WINDOW, 957 .default_num = 8, 958 .style = "window-status-last-style" 959 }, 960 961 { .name = "window-status-last-fg", 962 .type = OPTIONS_TABLE_COLOUR, 963 .scope = OPTIONS_TABLE_WINDOW, 964 .default_num = 8, 965 .style = "window-status-last-style" 966 }, 967 968 { .name = "window-status-last-style", 969 .type = OPTIONS_TABLE_STYLE, 970 .scope = OPTIONS_TABLE_WINDOW, 971 .default_str = "default" 972 }, 973 974 { .name = "window-status-separator", 975 .type = OPTIONS_TABLE_STRING, 976 .scope = OPTIONS_TABLE_WINDOW, 977 .default_str = " " 978 }, 979 980 { .name = "window-status-style", 981 .type = OPTIONS_TABLE_STYLE, 982 .scope = OPTIONS_TABLE_WINDOW, 983 .default_str = "default" 984 }, 985 986 { .name = "wrap-search", 987 .type = OPTIONS_TABLE_FLAG, 988 .scope = OPTIONS_TABLE_WINDOW, 989 .default_num = 1 990 }, 991 992 { .name = "xterm-keys", 993 .type = OPTIONS_TABLE_FLAG, 994 .scope = OPTIONS_TABLE_WINDOW, 995 .default_num = 1 996 }, 997 998 { .name = NULL } 999}; 1000