version 1.66, 2015/11/12 11:09:11 |
version 1.67, 2015/11/20 12:01:19 |
|
|
}; |
}; |
|
|
/* Server options. */ |
/* Server options. */ |
const struct options_table_entry server_options_table[] = { |
const struct options_table_entry options_table[] = { |
{ .name = "buffer-limit", |
{ .name = "buffer-limit", |
.type = OPTIONS_TABLE_NUMBER, |
.type = OPTIONS_TABLE_NUMBER, |
|
.scope = OPTIONS_TABLE_SERVER, |
.minimum = 1, |
.minimum = 1, |
.maximum = INT_MAX, |
.maximum = INT_MAX, |
.default_num = 20 |
.default_num = 20 |
|
|
|
|
{ .name = "default-terminal", |
{ .name = "default-terminal", |
.type = OPTIONS_TABLE_STRING, |
.type = OPTIONS_TABLE_STRING, |
|
.scope = OPTIONS_TABLE_SERVER, |
.default_str = "screen" |
.default_str = "screen" |
}, |
}, |
|
|
{ .name = "escape-time", |
{ .name = "escape-time", |
.type = OPTIONS_TABLE_NUMBER, |
.type = OPTIONS_TABLE_NUMBER, |
|
.scope = OPTIONS_TABLE_SERVER, |
.minimum = 0, |
.minimum = 0, |
.maximum = INT_MAX, |
.maximum = INT_MAX, |
.default_num = 500 |
.default_num = 500 |
|
|
|
|
{ .name = "exit-unattached", |
{ .name = "exit-unattached", |
.type = OPTIONS_TABLE_FLAG, |
.type = OPTIONS_TABLE_FLAG, |
|
.scope = OPTIONS_TABLE_SERVER, |
.default_num = 0 |
.default_num = 0 |
}, |
}, |
|
|
{ .name = "focus-events", |
{ .name = "focus-events", |
.type = OPTIONS_TABLE_FLAG, |
.type = OPTIONS_TABLE_FLAG, |
|
.scope = OPTIONS_TABLE_SERVER, |
.default_num = 0 |
.default_num = 0 |
}, |
}, |
|
|
{ .name = "history-file", |
{ .name = "history-file", |
.type = OPTIONS_TABLE_STRING, |
.type = OPTIONS_TABLE_STRING, |
|
.scope = OPTIONS_TABLE_SERVER, |
.default_str = "" |
.default_str = "" |
}, |
}, |
|
|
{ .name = "message-limit", |
{ .name = "message-limit", |
.type = OPTIONS_TABLE_NUMBER, |
.type = OPTIONS_TABLE_NUMBER, |
|
.scope = OPTIONS_TABLE_SERVER, |
.minimum = 0, |
.minimum = 0, |
.maximum = INT_MAX, |
.maximum = INT_MAX, |
.default_num = 100 |
.default_num = 100 |
|
|
|
|
{ .name = "quiet", |
{ .name = "quiet", |
.type = OPTIONS_TABLE_FLAG, |
.type = OPTIONS_TABLE_FLAG, |
|
.scope = OPTIONS_TABLE_SERVER, |
.default_num = 0 |
.default_num = 0 |
}, |
}, |
|
|
{ .name = "set-clipboard", |
{ .name = "set-clipboard", |
.type = OPTIONS_TABLE_FLAG, |
.type = OPTIONS_TABLE_FLAG, |
|
.scope = OPTIONS_TABLE_SERVER, |
.default_num = 1 |
.default_num = 1 |
}, |
}, |
|
|
{ .name = "terminal-overrides", |
{ .name = "terminal-overrides", |
.type = OPTIONS_TABLE_STRING, |
.type = OPTIONS_TABLE_STRING, |
|
.scope = OPTIONS_TABLE_SERVER, |
.default_str = "xterm*:XT:Ms=\\E]52;%p1%s;%p2%s\\007" |
.default_str = "xterm*:XT:Ms=\\E]52;%p1%s;%p2%s\\007" |
":Cs=\\E]12;%p1%s\\007:Cr=\\E]112\\007" |
":Cs=\\E]12;%p1%s\\007:Cr=\\E]112\\007" |
":Ss=\\E[%p1%d q:Se=\\E[2 q,screen*:XT" |
":Ss=\\E[%p1%d q:Se=\\E[2 q,screen*:XT" |
}, |
}, |
|
|
{ .name = NULL } |
|
}; |
|
|
|
/* Session options. */ |
|
const struct options_table_entry session_options_table[] = { |
|
{ .name = "assume-paste-time", |
{ .name = "assume-paste-time", |
.type = OPTIONS_TABLE_NUMBER, |
.type = OPTIONS_TABLE_NUMBER, |
|
.scope = OPTIONS_TABLE_SESSION, |
.minimum = 0, |
.minimum = 0, |
.maximum = INT_MAX, |
.maximum = INT_MAX, |
.default_num = 1, |
.default_num = 1, |
|
|
|
|
{ .name = "base-index", |
{ .name = "base-index", |
.type = OPTIONS_TABLE_NUMBER, |
.type = OPTIONS_TABLE_NUMBER, |
|
.scope = OPTIONS_TABLE_SESSION, |
.minimum = 0, |
.minimum = 0, |
.maximum = INT_MAX, |
.maximum = INT_MAX, |
.default_num = 0 |
.default_num = 0 |
|
|
|
|
{ .name = "bell-action", |
{ .name = "bell-action", |
.type = OPTIONS_TABLE_CHOICE, |
.type = OPTIONS_TABLE_CHOICE, |
|
.scope = OPTIONS_TABLE_SESSION, |
.choices = options_table_bell_action_list, |
.choices = options_table_bell_action_list, |
.default_num = BELL_ANY |
.default_num = BELL_ANY |
}, |
}, |
|
|
{ .name = "bell-on-alert", |
{ .name = "bell-on-alert", |
.type = OPTIONS_TABLE_FLAG, |
.type = OPTIONS_TABLE_FLAG, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_num = 0 |
.default_num = 0 |
}, |
}, |
|
|
{ .name = "default-command", |
{ .name = "default-command", |
.type = OPTIONS_TABLE_STRING, |
.type = OPTIONS_TABLE_STRING, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_str = "" |
.default_str = "" |
}, |
}, |
|
|
{ .name = "default-shell", |
{ .name = "default-shell", |
.type = OPTIONS_TABLE_STRING, |
.type = OPTIONS_TABLE_STRING, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_str = _PATH_BSHELL |
.default_str = _PATH_BSHELL |
}, |
}, |
|
|
{ .name = "destroy-unattached", |
{ .name = "destroy-unattached", |
.type = OPTIONS_TABLE_FLAG, |
.type = OPTIONS_TABLE_FLAG, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_num = 0 |
.default_num = 0 |
}, |
}, |
|
|
{ .name = "detach-on-destroy", |
{ .name = "detach-on-destroy", |
.type = OPTIONS_TABLE_FLAG, |
.type = OPTIONS_TABLE_FLAG, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_num = 1 |
.default_num = 1 |
}, |
}, |
|
|
{ .name = "display-panes-active-colour", |
{ .name = "display-panes-active-colour", |
.type = OPTIONS_TABLE_COLOUR, |
.type = OPTIONS_TABLE_COLOUR, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_num = 1 |
.default_num = 1 |
}, |
}, |
|
|
{ .name = "display-panes-colour", |
{ .name = "display-panes-colour", |
.type = OPTIONS_TABLE_COLOUR, |
.type = OPTIONS_TABLE_COLOUR, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_num = 4 |
.default_num = 4 |
}, |
}, |
|
|
{ .name = "display-panes-time", |
{ .name = "display-panes-time", |
.type = OPTIONS_TABLE_NUMBER, |
.type = OPTIONS_TABLE_NUMBER, |
|
.scope = OPTIONS_TABLE_SESSION, |
.minimum = 1, |
.minimum = 1, |
.maximum = INT_MAX, |
.maximum = INT_MAX, |
.default_num = 1000 |
.default_num = 1000 |
|
|
|
|
{ .name = "display-time", |
{ .name = "display-time", |
.type = OPTIONS_TABLE_NUMBER, |
.type = OPTIONS_TABLE_NUMBER, |
|
.scope = OPTIONS_TABLE_SESSION, |
.minimum = 1, |
.minimum = 1, |
.maximum = INT_MAX, |
.maximum = INT_MAX, |
.default_num = 750 |
.default_num = 750 |
|
|
|
|
{ .name = "history-limit", |
{ .name = "history-limit", |
.type = OPTIONS_TABLE_NUMBER, |
.type = OPTIONS_TABLE_NUMBER, |
|
.scope = OPTIONS_TABLE_SESSION, |
.minimum = 0, |
.minimum = 0, |
.maximum = INT_MAX, |
.maximum = INT_MAX, |
.default_num = 2000 |
.default_num = 2000 |
|
|
|
|
{ .name = "lock-after-time", |
{ .name = "lock-after-time", |
.type = OPTIONS_TABLE_NUMBER, |
.type = OPTIONS_TABLE_NUMBER, |
|
.scope = OPTIONS_TABLE_SESSION, |
.minimum = 0, |
.minimum = 0, |
.maximum = INT_MAX, |
.maximum = INT_MAX, |
.default_num = 0 |
.default_num = 0 |
|
|
|
|
{ .name = "lock-command", |
{ .name = "lock-command", |
.type = OPTIONS_TABLE_STRING, |
.type = OPTIONS_TABLE_STRING, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_str = "lock -np" |
.default_str = "lock -np" |
}, |
}, |
|
|
{ .name = "message-attr", |
{ .name = "message-attr", |
.type = OPTIONS_TABLE_ATTRIBUTES, |
.type = OPTIONS_TABLE_ATTRIBUTES, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_num = 0, |
.default_num = 0, |
.style = "message-style" |
.style = "message-style" |
}, |
}, |
|
|
{ .name = "message-bg", |
{ .name = "message-bg", |
.type = OPTIONS_TABLE_COLOUR, |
.type = OPTIONS_TABLE_COLOUR, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_num = 3, |
.default_num = 3, |
.style = "message-style" |
.style = "message-style" |
}, |
}, |
|
|
{ .name = "message-command-attr", |
{ .name = "message-command-attr", |
.type = OPTIONS_TABLE_ATTRIBUTES, |
.type = OPTIONS_TABLE_ATTRIBUTES, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_num = 0, |
.default_num = 0, |
.style = "message-command-style" |
.style = "message-command-style" |
}, |
}, |
|
|
{ .name = "message-command-bg", |
{ .name = "message-command-bg", |
.type = OPTIONS_TABLE_COLOUR, |
.type = OPTIONS_TABLE_COLOUR, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_num = 0, |
.default_num = 0, |
.style = "message-command-style" |
.style = "message-command-style" |
}, |
}, |
|
|
{ .name = "message-command-fg", |
{ .name = "message-command-fg", |
.type = OPTIONS_TABLE_COLOUR, |
.type = OPTIONS_TABLE_COLOUR, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_num = 3, |
.default_num = 3, |
.style = "message-command-style" |
.style = "message-command-style" |
}, |
}, |
|
|
{ .name = "message-command-style", |
{ .name = "message-command-style", |
.type = OPTIONS_TABLE_STYLE, |
.type = OPTIONS_TABLE_STYLE, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_str = "bg=black,fg=yellow" |
.default_str = "bg=black,fg=yellow" |
}, |
}, |
|
|
{ .name = "message-fg", |
{ .name = "message-fg", |
.type = OPTIONS_TABLE_COLOUR, |
.type = OPTIONS_TABLE_COLOUR, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_num = 0, |
.default_num = 0, |
.style = "message-style" |
.style = "message-style" |
}, |
}, |
|
|
{ .name = "message-style", |
{ .name = "message-style", |
.type = OPTIONS_TABLE_STYLE, |
.type = OPTIONS_TABLE_STYLE, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_str = "bg=yellow,fg=black" |
.default_str = "bg=yellow,fg=black" |
}, |
}, |
|
|
{ .name = "mouse", |
{ .name = "mouse", |
.type = OPTIONS_TABLE_FLAG, |
.type = OPTIONS_TABLE_FLAG, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_num = 0 |
.default_num = 0 |
}, |
}, |
|
|
{ .name = "prefix", |
{ .name = "prefix", |
.type = OPTIONS_TABLE_KEY, |
.type = OPTIONS_TABLE_KEY, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_num = '\002', |
.default_num = '\002', |
}, |
}, |
|
|
{ .name = "prefix2", |
{ .name = "prefix2", |
.type = OPTIONS_TABLE_KEY, |
.type = OPTIONS_TABLE_KEY, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_num = KEYC_NONE, |
.default_num = KEYC_NONE, |
}, |
}, |
|
|
{ .name = "renumber-windows", |
{ .name = "renumber-windows", |
.type = OPTIONS_TABLE_FLAG, |
.type = OPTIONS_TABLE_FLAG, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_num = 0 |
.default_num = 0 |
}, |
}, |
|
|
{ .name = "repeat-time", |
{ .name = "repeat-time", |
.type = OPTIONS_TABLE_NUMBER, |
.type = OPTIONS_TABLE_NUMBER, |
|
.scope = OPTIONS_TABLE_SESSION, |
.minimum = 0, |
.minimum = 0, |
.maximum = SHRT_MAX, |
.maximum = SHRT_MAX, |
.default_num = 500 |
.default_num = 500 |
|
|
|
|
{ .name = "set-remain-on-exit", |
{ .name = "set-remain-on-exit", |
.type = OPTIONS_TABLE_FLAG, |
.type = OPTIONS_TABLE_FLAG, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_num = 0 |
.default_num = 0 |
}, |
}, |
|
|
{ .name = "set-titles", |
{ .name = "set-titles", |
.type = OPTIONS_TABLE_FLAG, |
.type = OPTIONS_TABLE_FLAG, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_num = 0 |
.default_num = 0 |
}, |
}, |
|
|
{ .name = "set-titles-string", |
{ .name = "set-titles-string", |
.type = OPTIONS_TABLE_STRING, |
.type = OPTIONS_TABLE_STRING, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_str = "#S:#I:#W - \"#T\" #{session_alerts}" |
.default_str = "#S:#I:#W - \"#T\" #{session_alerts}" |
}, |
}, |
|
|
{ .name = "status", |
{ .name = "status", |
.type = OPTIONS_TABLE_FLAG, |
.type = OPTIONS_TABLE_FLAG, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_num = 1 |
.default_num = 1 |
}, |
}, |
|
|
{ .name = "status-attr", |
{ .name = "status-attr", |
.type = OPTIONS_TABLE_ATTRIBUTES, |
.type = OPTIONS_TABLE_ATTRIBUTES, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_num = 0, |
.default_num = 0, |
.style = "status-style" |
.style = "status-style" |
}, |
}, |
|
|
{ .name = "status-bg", |
{ .name = "status-bg", |
.type = OPTIONS_TABLE_COLOUR, |
.type = OPTIONS_TABLE_COLOUR, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_num = 2, |
.default_num = 2, |
.style = "status-style" |
.style = "status-style" |
}, |
}, |
|
|
{ .name = "status-fg", |
{ .name = "status-fg", |
.type = OPTIONS_TABLE_COLOUR, |
.type = OPTIONS_TABLE_COLOUR, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_num = 0, |
.default_num = 0, |
.style = "status-style" |
.style = "status-style" |
}, |
}, |
|
|
{ .name = "status-interval", |
{ .name = "status-interval", |
.type = OPTIONS_TABLE_NUMBER, |
.type = OPTIONS_TABLE_NUMBER, |
|
.scope = OPTIONS_TABLE_SESSION, |
.minimum = 0, |
.minimum = 0, |
.maximum = INT_MAX, |
.maximum = INT_MAX, |
.default_num = 15 |
.default_num = 15 |
|
|
|
|
{ .name = "status-justify", |
{ .name = "status-justify", |
.type = OPTIONS_TABLE_CHOICE, |
.type = OPTIONS_TABLE_CHOICE, |
|
.scope = OPTIONS_TABLE_SESSION, |
.choices = options_table_status_justify_list, |
.choices = options_table_status_justify_list, |
.default_num = 0 |
.default_num = 0 |
}, |
}, |
|
|
{ .name = "status-keys", |
{ .name = "status-keys", |
.type = OPTIONS_TABLE_CHOICE, |
.type = OPTIONS_TABLE_CHOICE, |
|
.scope = OPTIONS_TABLE_SESSION, |
.choices = options_table_status_keys_list, |
.choices = options_table_status_keys_list, |
.default_num = MODEKEY_EMACS |
.default_num = MODEKEY_EMACS |
}, |
}, |
|
|
{ .name = "status-left", |
{ .name = "status-left", |
.type = OPTIONS_TABLE_STRING, |
.type = OPTIONS_TABLE_STRING, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_str = "[#S] " |
.default_str = "[#S] " |
}, |
}, |
|
|
{ .name = "status-left-attr", |
{ .name = "status-left-attr", |
.type = OPTIONS_TABLE_ATTRIBUTES, |
.type = OPTIONS_TABLE_ATTRIBUTES, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_num = 0, |
.default_num = 0, |
.style = "status-left-style" |
.style = "status-left-style" |
}, |
}, |
|
|
{ .name = "status-left-bg", |
{ .name = "status-left-bg", |
.type = OPTIONS_TABLE_COLOUR, |
.type = OPTIONS_TABLE_COLOUR, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_num = 8, |
.default_num = 8, |
.style = "status-left-style" |
.style = "status-left-style" |
}, |
}, |
|
|
{ .name = "status-left-fg", |
{ .name = "status-left-fg", |
.type = OPTIONS_TABLE_COLOUR, |
.type = OPTIONS_TABLE_COLOUR, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_num = 8, |
.default_num = 8, |
.style = "status-left-style" |
.style = "status-left-style" |
}, |
}, |
|
|
{ .name = "status-left-length", |
{ .name = "status-left-length", |
.type = OPTIONS_TABLE_NUMBER, |
.type = OPTIONS_TABLE_NUMBER, |
|
.scope = OPTIONS_TABLE_SESSION, |
.minimum = 0, |
.minimum = 0, |
.maximum = SHRT_MAX, |
.maximum = SHRT_MAX, |
.default_num = 10 |
.default_num = 10 |
|
|
|
|
{ .name = "status-left-style", |
{ .name = "status-left-style", |
.type = OPTIONS_TABLE_STYLE, |
.type = OPTIONS_TABLE_STYLE, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_str = "default" |
.default_str = "default" |
}, |
}, |
|
|
{ .name = "status-position", |
{ .name = "status-position", |
.type = OPTIONS_TABLE_CHOICE, |
.type = OPTIONS_TABLE_CHOICE, |
|
.scope = OPTIONS_TABLE_SESSION, |
.choices = options_table_status_position_list, |
.choices = options_table_status_position_list, |
.default_num = 1 |
.default_num = 1 |
}, |
}, |
|
|
{ .name = "status-right", |
{ .name = "status-right", |
.type = OPTIONS_TABLE_STRING, |
.type = OPTIONS_TABLE_STRING, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_str = " \"#{=21:pane_title}\" %H:%M %d-%b-%y" |
.default_str = " \"#{=21:pane_title}\" %H:%M %d-%b-%y" |
}, |
}, |
|
|
{ .name = "status-right-attr", |
{ .name = "status-right-attr", |
.type = OPTIONS_TABLE_ATTRIBUTES, |
.type = OPTIONS_TABLE_ATTRIBUTES, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_num = 0, |
.default_num = 0, |
.style = "status-right-style" |
.style = "status-right-style" |
}, |
}, |
|
|
{ .name = "status-right-bg", |
{ .name = "status-right-bg", |
.type = OPTIONS_TABLE_COLOUR, |
.type = OPTIONS_TABLE_COLOUR, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_num = 8, |
.default_num = 8, |
.style = "status-right-style" |
.style = "status-right-style" |
}, |
}, |
|
|
{ .name = "status-right-fg", |
{ .name = "status-right-fg", |
.type = OPTIONS_TABLE_COLOUR, |
.type = OPTIONS_TABLE_COLOUR, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_num = 8, |
.default_num = 8, |
.style = "status-right-style" |
.style = "status-right-style" |
}, |
}, |
|
|
{ .name = "status-right-length", |
{ .name = "status-right-length", |
.type = OPTIONS_TABLE_NUMBER, |
.type = OPTIONS_TABLE_NUMBER, |
|
.scope = OPTIONS_TABLE_SESSION, |
.minimum = 0, |
.minimum = 0, |
.maximum = SHRT_MAX, |
.maximum = SHRT_MAX, |
.default_num = 40 |
.default_num = 40 |
|
|
|
|
{ .name = "status-right-style", |
{ .name = "status-right-style", |
.type = OPTIONS_TABLE_STYLE, |
.type = OPTIONS_TABLE_STYLE, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_str = "default" |
.default_str = "default" |
}, |
}, |
|
|
{ .name = "status-style", |
{ .name = "status-style", |
.type = OPTIONS_TABLE_STYLE, |
.type = OPTIONS_TABLE_STYLE, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_str = "bg=green,fg=black" |
.default_str = "bg=green,fg=black" |
}, |
}, |
|
|
{ .name = "update-environment", |
{ .name = "update-environment", |
.type = OPTIONS_TABLE_STRING, |
.type = OPTIONS_TABLE_STRING, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_str = "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID " |
.default_str = "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID " |
"SSH_CONNECTION WINDOWID XAUTHORITY" |
"SSH_CONNECTION WINDOWID XAUTHORITY" |
|
|
|
|
|
|
{ .name = "visual-activity", |
{ .name = "visual-activity", |
.type = OPTIONS_TABLE_FLAG, |
.type = OPTIONS_TABLE_FLAG, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_num = 0 |
.default_num = 0 |
}, |
}, |
|
|
{ .name = "visual-bell", |
{ .name = "visual-bell", |
.type = OPTIONS_TABLE_FLAG, |
.type = OPTIONS_TABLE_FLAG, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_num = 0 |
.default_num = 0 |
}, |
}, |
|
|
{ .name = "visual-silence", |
{ .name = "visual-silence", |
.type = OPTIONS_TABLE_FLAG, |
.type = OPTIONS_TABLE_FLAG, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_num = 0 |
.default_num = 0 |
}, |
}, |
|
|
{ .name = "word-separators", |
{ .name = "word-separators", |
.type = OPTIONS_TABLE_STRING, |
.type = OPTIONS_TABLE_STRING, |
|
.scope = OPTIONS_TABLE_SESSION, |
.default_str = " -_@" |
.default_str = " -_@" |
}, |
}, |
|
|
{ .name = NULL } |
|
}; |
|
|
|
/* Window options. */ |
|
const struct options_table_entry window_options_table[] = { |
|
{ .name = "aggressive-resize", |
{ .name = "aggressive-resize", |
.type = OPTIONS_TABLE_FLAG, |
.type = OPTIONS_TABLE_FLAG, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_num = 0 |
.default_num = 0 |
}, |
}, |
|
|
{ .name = "allow-rename", |
{ .name = "allow-rename", |
.type = OPTIONS_TABLE_FLAG, |
.type = OPTIONS_TABLE_FLAG, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_num = 1 |
.default_num = 1 |
}, |
}, |
|
|
{ .name = "alternate-screen", |
{ .name = "alternate-screen", |
.type = OPTIONS_TABLE_FLAG, |
.type = OPTIONS_TABLE_FLAG, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_num = 1 |
.default_num = 1 |
}, |
}, |
|
|
{ .name = "automatic-rename", |
{ .name = "automatic-rename", |
.type = OPTIONS_TABLE_FLAG, |
.type = OPTIONS_TABLE_FLAG, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_num = 1 |
.default_num = 1 |
}, |
}, |
|
|
{ .name = "automatic-rename-format", |
{ .name = "automatic-rename-format", |
.type = OPTIONS_TABLE_STRING, |
.type = OPTIONS_TABLE_STRING, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_str = "#{?pane_in_mode,[tmux],#{pane_current_command}}" |
.default_str = "#{?pane_in_mode,[tmux],#{pane_current_command}}" |
"#{?pane_dead,[dead],}" |
"#{?pane_dead,[dead],}" |
}, |
}, |
|
|
{ .name = "clock-mode-colour", |
{ .name = "clock-mode-colour", |
.type = OPTIONS_TABLE_COLOUR, |
.type = OPTIONS_TABLE_COLOUR, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_num = 4 |
.default_num = 4 |
}, |
}, |
|
|
{ .name = "clock-mode-style", |
{ .name = "clock-mode-style", |
.type = OPTIONS_TABLE_CHOICE, |
.type = OPTIONS_TABLE_CHOICE, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.choices = options_table_clock_mode_style_list, |
.choices = options_table_clock_mode_style_list, |
.default_num = 1 |
.default_num = 1 |
}, |
}, |
|
|
{ .name = "force-height", |
{ .name = "force-height", |
.type = OPTIONS_TABLE_NUMBER, |
.type = OPTIONS_TABLE_NUMBER, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.minimum = 0, |
.minimum = 0, |
.maximum = INT_MAX, |
.maximum = INT_MAX, |
.default_num = 0 |
.default_num = 0 |
|
|
|
|
{ .name = "force-width", |
{ .name = "force-width", |
.type = OPTIONS_TABLE_NUMBER, |
.type = OPTIONS_TABLE_NUMBER, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.minimum = 0, |
.minimum = 0, |
.maximum = INT_MAX, |
.maximum = INT_MAX, |
.default_num = 0 |
.default_num = 0 |
|
|
|
|
{ .name = "main-pane-height", |
{ .name = "main-pane-height", |
.type = OPTIONS_TABLE_NUMBER, |
.type = OPTIONS_TABLE_NUMBER, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.minimum = 1, |
.minimum = 1, |
.maximum = INT_MAX, |
.maximum = INT_MAX, |
.default_num = 24 |
.default_num = 24 |
|
|
|
|
{ .name = "main-pane-width", |
{ .name = "main-pane-width", |
.type = OPTIONS_TABLE_NUMBER, |
.type = OPTIONS_TABLE_NUMBER, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.minimum = 1, |
.minimum = 1, |
.maximum = INT_MAX, |
.maximum = INT_MAX, |
.default_num = 80 |
.default_num = 80 |
|
|
|
|
{ .name = "mode-attr", |
{ .name = "mode-attr", |
.type = OPTIONS_TABLE_ATTRIBUTES, |
.type = OPTIONS_TABLE_ATTRIBUTES, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_num = 0, |
.default_num = 0, |
.style = "mode-style" |
.style = "mode-style" |
}, |
}, |
|
|
{ .name = "mode-bg", |
{ .name = "mode-bg", |
.type = OPTIONS_TABLE_COLOUR, |
.type = OPTIONS_TABLE_COLOUR, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_num = 3, |
.default_num = 3, |
.style = "mode-style" |
.style = "mode-style" |
}, |
}, |
|
|
{ .name = "mode-fg", |
{ .name = "mode-fg", |
.type = OPTIONS_TABLE_COLOUR, |
.type = OPTIONS_TABLE_COLOUR, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_num = 0, |
.default_num = 0, |
.style = "mode-style" |
.style = "mode-style" |
}, |
}, |
|
|
{ .name = "mode-keys", |
{ .name = "mode-keys", |
.type = OPTIONS_TABLE_CHOICE, |
.type = OPTIONS_TABLE_CHOICE, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.choices = options_table_mode_keys_list, |
.choices = options_table_mode_keys_list, |
.default_num = MODEKEY_EMACS |
.default_num = MODEKEY_EMACS |
}, |
}, |
|
|
{ .name = "mode-style", |
{ .name = "mode-style", |
.type = OPTIONS_TABLE_STYLE, |
.type = OPTIONS_TABLE_STYLE, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_str = "bg=yellow,fg=black" |
.default_str = "bg=yellow,fg=black" |
}, |
}, |
|
|
{ .name = "monitor-activity", |
{ .name = "monitor-activity", |
.type = OPTIONS_TABLE_FLAG, |
.type = OPTIONS_TABLE_FLAG, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_num = 0 |
.default_num = 0 |
}, |
}, |
|
|
{ .name = "monitor-silence", |
{ .name = "monitor-silence", |
.type = OPTIONS_TABLE_NUMBER, |
.type = OPTIONS_TABLE_NUMBER, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.minimum = 0, |
.minimum = 0, |
.maximum = INT_MAX, |
.maximum = INT_MAX, |
.default_num = 0 |
.default_num = 0 |
|
|
|
|
{ .name = "other-pane-height", |
{ .name = "other-pane-height", |
.type = OPTIONS_TABLE_NUMBER, |
.type = OPTIONS_TABLE_NUMBER, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.minimum = 0, |
.minimum = 0, |
.maximum = INT_MAX, |
.maximum = INT_MAX, |
.default_num = 0 |
.default_num = 0 |
|
|
|
|
{ .name = "other-pane-width", |
{ .name = "other-pane-width", |
.type = OPTIONS_TABLE_NUMBER, |
.type = OPTIONS_TABLE_NUMBER, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.minimum = 0, |
.minimum = 0, |
.maximum = INT_MAX, |
.maximum = INT_MAX, |
.default_num = 0 |
.default_num = 0 |
|
|
|
|
{ .name = "pane-active-border-bg", |
{ .name = "pane-active-border-bg", |
.type = OPTIONS_TABLE_COLOUR, |
.type = OPTIONS_TABLE_COLOUR, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_num = 8, |
.default_num = 8, |
.style = "pane-active-border-style" |
.style = "pane-active-border-style" |
}, |
}, |
|
|
{ .name = "pane-active-border-fg", |
{ .name = "pane-active-border-fg", |
.type = OPTIONS_TABLE_COLOUR, |
.type = OPTIONS_TABLE_COLOUR, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_num = 2, |
.default_num = 2, |
.style = "pane-active-border-style" |
.style = "pane-active-border-style" |
}, |
}, |
|
|
{ .name = "pane-active-border-style", |
{ .name = "pane-active-border-style", |
.type = OPTIONS_TABLE_STYLE, |
.type = OPTIONS_TABLE_STYLE, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_str = "fg=green" |
.default_str = "fg=green" |
}, |
}, |
|
|
{ .name = "pane-base-index", |
{ .name = "pane-base-index", |
.type = OPTIONS_TABLE_NUMBER, |
.type = OPTIONS_TABLE_NUMBER, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.minimum = 0, |
.minimum = 0, |
.maximum = USHRT_MAX, |
.maximum = USHRT_MAX, |
.default_num = 0 |
.default_num = 0 |
|
|
|
|
{ .name = "pane-border-bg", |
{ .name = "pane-border-bg", |
.type = OPTIONS_TABLE_COLOUR, |
.type = OPTIONS_TABLE_COLOUR, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_num = 8, |
.default_num = 8, |
.style = "pane-border-style" |
.style = "pane-border-style" |
}, |
}, |
|
|
{ .name = "pane-border-fg", |
{ .name = "pane-border-fg", |
.type = OPTIONS_TABLE_COLOUR, |
.type = OPTIONS_TABLE_COLOUR, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_num = 8, |
.default_num = 8, |
.style = "pane-border-style" |
.style = "pane-border-style" |
}, |
}, |
|
|
{ .name = "pane-border-style", |
{ .name = "pane-border-style", |
.type = OPTIONS_TABLE_STYLE, |
.type = OPTIONS_TABLE_STYLE, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_str = "default" |
.default_str = "default" |
}, |
}, |
|
|
{ .name = "remain-on-exit", |
{ .name = "remain-on-exit", |
.type = OPTIONS_TABLE_FLAG, |
.type = OPTIONS_TABLE_FLAG, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_num = 0 |
.default_num = 0 |
}, |
}, |
|
|
{ .name = "synchronize-panes", |
{ .name = "synchronize-panes", |
.type = OPTIONS_TABLE_FLAG, |
.type = OPTIONS_TABLE_FLAG, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_num = 0 |
.default_num = 0 |
}, |
}, |
|
|
{ .name = "window-active-style", |
{ .name = "window-active-style", |
.type = OPTIONS_TABLE_STYLE, |
.type = OPTIONS_TABLE_STYLE, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_str = "default" |
.default_str = "default" |
}, |
}, |
|
|
{ .name = "window-style", |
{ .name = "window-style", |
.type = OPTIONS_TABLE_STYLE, |
.type = OPTIONS_TABLE_STYLE, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_str = "default" |
.default_str = "default" |
}, |
}, |
|
|
{ .name = "window-status-activity-attr", |
{ .name = "window-status-activity-attr", |
.type = OPTIONS_TABLE_ATTRIBUTES, |
.type = OPTIONS_TABLE_ATTRIBUTES, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_num = GRID_ATTR_REVERSE, |
.default_num = GRID_ATTR_REVERSE, |
.style = "window-status-activity-style" |
.style = "window-status-activity-style" |
}, |
}, |
|
|
{ .name = "window-status-activity-bg", |
{ .name = "window-status-activity-bg", |
.type = OPTIONS_TABLE_COLOUR, |
.type = OPTIONS_TABLE_COLOUR, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_num = 8, |
.default_num = 8, |
.style = "window-status-activity-style" |
.style = "window-status-activity-style" |
}, |
}, |
|
|
{ .name = "window-status-activity-fg", |
{ .name = "window-status-activity-fg", |
.type = OPTIONS_TABLE_COLOUR, |
.type = OPTIONS_TABLE_COLOUR, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_num = 8, |
.default_num = 8, |
.style = "window-status-activity-style" |
.style = "window-status-activity-style" |
}, |
}, |
|
|
{ .name = "window-status-activity-style", |
{ .name = "window-status-activity-style", |
.type = OPTIONS_TABLE_STYLE, |
.type = OPTIONS_TABLE_STYLE, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_str = "reverse" |
.default_str = "reverse" |
}, |
}, |
|
|
{ .name = "window-status-attr", |
{ .name = "window-status-attr", |
.type = OPTIONS_TABLE_ATTRIBUTES, |
.type = OPTIONS_TABLE_ATTRIBUTES, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_num = 0, |
.default_num = 0, |
.style = "window-status-style" |
.style = "window-status-style" |
}, |
}, |
|
|
{ .name = "window-status-bell-attr", |
{ .name = "window-status-bell-attr", |
.type = OPTIONS_TABLE_ATTRIBUTES, |
.type = OPTIONS_TABLE_ATTRIBUTES, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_num = GRID_ATTR_REVERSE, |
.default_num = GRID_ATTR_REVERSE, |
.style = "window-status-bell-style" |
.style = "window-status-bell-style" |
}, |
}, |
|
|
{ .name = "window-status-bell-bg", |
{ .name = "window-status-bell-bg", |
.type = OPTIONS_TABLE_COLOUR, |
.type = OPTIONS_TABLE_COLOUR, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_num = 8, |
.default_num = 8, |
.style = "window-status-bell-style" |
.style = "window-status-bell-style" |
}, |
}, |
|
|
{ .name = "window-status-bell-fg", |
{ .name = "window-status-bell-fg", |
.type = OPTIONS_TABLE_COLOUR, |
.type = OPTIONS_TABLE_COLOUR, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_num = 8, |
.default_num = 8, |
.style = "window-status-bell-style" |
.style = "window-status-bell-style" |
}, |
}, |
|
|
{ .name = "window-status-bell-style", |
{ .name = "window-status-bell-style", |
.type = OPTIONS_TABLE_STYLE, |
.type = OPTIONS_TABLE_STYLE, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_str = "reverse" |
.default_str = "reverse" |
}, |
}, |
|
|
{ .name = "window-status-bg", |
{ .name = "window-status-bg", |
.type = OPTIONS_TABLE_COLOUR, |
.type = OPTIONS_TABLE_COLOUR, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_num = 8, |
.default_num = 8, |
.style = "window-status-style" |
.style = "window-status-style" |
}, |
}, |
|
|
{ .name = "window-status-current-attr", |
{ .name = "window-status-current-attr", |
.type = OPTIONS_TABLE_ATTRIBUTES, |
.type = OPTIONS_TABLE_ATTRIBUTES, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_num = 0, |
.default_num = 0, |
.style = "window-status-current-style" |
.style = "window-status-current-style" |
}, |
}, |
|
|
{ .name = "window-status-current-bg", |
{ .name = "window-status-current-bg", |
.type = OPTIONS_TABLE_COLOUR, |
.type = OPTIONS_TABLE_COLOUR, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_num = 8, |
.default_num = 8, |
.style = "window-status-current-style" |
.style = "window-status-current-style" |
}, |
}, |
|
|
{ .name = "window-status-current-fg", |
{ .name = "window-status-current-fg", |
.type = OPTIONS_TABLE_COLOUR, |
.type = OPTIONS_TABLE_COLOUR, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_num = 8, |
.default_num = 8, |
.style = "window-status-current-style" |
.style = "window-status-current-style" |
}, |
}, |
|
|
{ .name = "window-status-current-format", |
{ .name = "window-status-current-format", |
.type = OPTIONS_TABLE_STRING, |
.type = OPTIONS_TABLE_STRING, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_str = "#I:#W#{?window_flags,#{window_flags}, }" |
.default_str = "#I:#W#{?window_flags,#{window_flags}, }" |
}, |
}, |
|
|
{ .name = "window-status-current-style", |
{ .name = "window-status-current-style", |
.type = OPTIONS_TABLE_STYLE, |
.type = OPTIONS_TABLE_STYLE, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_str = "default" |
.default_str = "default" |
}, |
}, |
|
|
{ .name = "window-status-fg", |
{ .name = "window-status-fg", |
.type = OPTIONS_TABLE_COLOUR, |
.type = OPTIONS_TABLE_COLOUR, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_num = 8, |
.default_num = 8, |
.style = "window-status-style" |
.style = "window-status-style" |
}, |
}, |
|
|
{ .name = "window-status-format", |
{ .name = "window-status-format", |
.type = OPTIONS_TABLE_STRING, |
.type = OPTIONS_TABLE_STRING, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_str = "#I:#W#{?window_flags,#{window_flags}, }" |
.default_str = "#I:#W#{?window_flags,#{window_flags}, }" |
}, |
}, |
|
|
{ .name = "window-status-last-attr", |
{ .name = "window-status-last-attr", |
.type = OPTIONS_TABLE_ATTRIBUTES, |
.type = OPTIONS_TABLE_ATTRIBUTES, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_num = 0, |
.default_num = 0, |
.style = "window-status-last-style" |
.style = "window-status-last-style" |
}, |
}, |
|
|
{ .name = "window-status-last-bg", |
{ .name = "window-status-last-bg", |
.type = OPTIONS_TABLE_COLOUR, |
.type = OPTIONS_TABLE_COLOUR, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_num = 8, |
.default_num = 8, |
.style = "window-status-last-style" |
.style = "window-status-last-style" |
}, |
}, |
|
|
{ .name = "window-status-last-fg", |
{ .name = "window-status-last-fg", |
.type = OPTIONS_TABLE_COLOUR, |
.type = OPTIONS_TABLE_COLOUR, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_num = 8, |
.default_num = 8, |
.style = "window-status-last-style" |
.style = "window-status-last-style" |
}, |
}, |
|
|
{ .name = "window-status-last-style", |
{ .name = "window-status-last-style", |
.type = OPTIONS_TABLE_STYLE, |
.type = OPTIONS_TABLE_STYLE, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_str = "default" |
.default_str = "default" |
}, |
}, |
|
|
{ .name = "window-status-separator", |
{ .name = "window-status-separator", |
.type = OPTIONS_TABLE_STRING, |
.type = OPTIONS_TABLE_STRING, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_str = " " |
.default_str = " " |
}, |
}, |
|
|
{ .name = "window-status-style", |
{ .name = "window-status-style", |
.type = OPTIONS_TABLE_STYLE, |
.type = OPTIONS_TABLE_STYLE, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_str = "default" |
.default_str = "default" |
}, |
}, |
|
|
{ .name = "wrap-search", |
{ .name = "wrap-search", |
.type = OPTIONS_TABLE_FLAG, |
.type = OPTIONS_TABLE_FLAG, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_num = 1 |
.default_num = 1 |
}, |
}, |
|
|
{ .name = "xterm-keys", |
{ .name = "xterm-keys", |
.type = OPTIONS_TABLE_FLAG, |
.type = OPTIONS_TABLE_FLAG, |
|
.scope = OPTIONS_TABLE_WINDOW, |
.default_num = 0 |
.default_num = 0 |
}, |
}, |
|
|
|
|
|
|
/* Populate an options tree from a table. */ |
/* Populate an options tree from a table. */ |
void |
void |
options_table_populate_tree( |
options_table_populate_tree(enum options_table_scope scope, struct options *oo) |
const struct options_table_entry *table, struct options *oo) |
|
{ |
{ |
const struct options_table_entry *oe; |
const struct options_table_entry *oe; |
|
|
for (oe = table; oe->name != NULL; oe++) { |
for (oe = options_table; oe->name != NULL; oe++) { |
|
if (oe->scope != scope) |
|
continue; |
switch (oe->type) { |
switch (oe->type) { |
case OPTIONS_TABLE_STRING: |
case OPTIONS_TABLE_STRING: |
options_set_string(oo, oe->name, "%s", oe->default_str); |
options_set_string(oo, oe->name, "%s", oe->default_str); |
|
|
|
|
/* Find an option. */ |
/* Find an option. */ |
int |
int |
options_table_find( |
options_table_find(const char *optstr, const struct options_table_entry **oe) |
const char *optstr, const struct options_table_entry **table, |
|
const struct options_table_entry **oe) |
|
{ |
{ |
static const struct options_table_entry *tables[] = { |
|
server_options_table, |
|
window_options_table, |
|
session_options_table |
|
}; |
|
const struct options_table_entry *oe_loop; |
const struct options_table_entry *oe_loop; |
u_int i; |
|
|
|
for (i = 0; i < nitems(tables); i++) { |
for (oe_loop = options_table; oe_loop->name != NULL; oe_loop++) { |
for (oe_loop = tables[i]; oe_loop->name != NULL; oe_loop++) { |
if (strncmp(oe_loop->name, optstr, strlen(optstr)) != 0) |
if (strncmp(oe_loop->name, optstr, strlen(optstr)) != 0) |
continue; |
continue; |
|
|
|
/* If already found, ambiguous. */ |
/* If already found, ambiguous. */ |
if (*oe != NULL) |
if (*oe != NULL) |
return (-1); |
return (-1); |
*oe = oe_loop; |
*oe = oe_loop; |
*table = tables[i]; |
|
|
|
/* Bail now if an exact match. */ |
/* Bail now if an exact match. */ |
if (strcmp((*oe)->name, optstr) == 0) |
if (strcmp(oe_loop->name, optstr) == 0) |
break; |
break; |
} |
|
} |
} |
return (0); |
return (0); |
} |
} |