diff options
Diffstat (limited to 'options-table.c')
-rw-r--r-- | options-table.c | 89 |
1 files changed, 84 insertions, 5 deletions
diff --git a/options-table.c b/options-table.c index 40639aff..19cf39f4 100644 --- a/options-table.c +++ b/options-table.c @@ -129,8 +129,19 @@ static const char *options_table_status_format_default[] = { OPTIONS_TABLE_STATUS_FORMAT1, OPTIONS_TABLE_STATUS_FORMAT2, NULL }; +/* Helper for hook options. */ +#define OPTIONS_TABLE_HOOK(hook_name, default_value) \ + { .name = hook_name, \ + .type = OPTIONS_TABLE_COMMAND, \ + .scope = OPTIONS_TABLE_SESSION, \ + .flags = OPTIONS_TABLE_IS_ARRAY|OPTIONS_TABLE_IS_HOOK, \ + .default_str = default_value, \ + .separator = "" \ + } + /* Top-level options. */ const struct options_table_entry options_table[] = { + /* Server options. */ { .name = "buffer-limit", .type = OPTIONS_TABLE_NUMBER, .scope = OPTIONS_TABLE_SERVER, @@ -140,8 +151,9 @@ const struct options_table_entry options_table[] = { }, { .name = "command-alias", - .type = OPTIONS_TABLE_ARRAY, + .type = OPTIONS_TABLE_STRING, .scope = OPTIONS_TABLE_SERVER, + .flags = OPTIONS_TABLE_IS_ARRAY, .default_str = "split-pane=split-window," "splitp=split-window," "server-info=show-messages -JT," @@ -205,8 +217,9 @@ const struct options_table_entry options_table[] = { }, { .name = "terminal-overrides", - .type = OPTIONS_TABLE_ARRAY, + .type = OPTIONS_TABLE_STRING, .scope = OPTIONS_TABLE_SERVER, + .flags = OPTIONS_TABLE_IS_ARRAY, .default_str = "xterm*:XT:Ms=\\E]52;%p1%s;%p2%s\\007" ":Cs=\\E]12;%p1%s\\007:Cr=\\E]112\\007" ":Ss=\\E[%p1%d q:Se=\\E[2 q,screen*:XT", @@ -214,12 +227,14 @@ const struct options_table_entry options_table[] = { }, { .name = "user-keys", - .type = OPTIONS_TABLE_ARRAY, + .type = OPTIONS_TABLE_STRING, .scope = OPTIONS_TABLE_SERVER, + .flags = OPTIONS_TABLE_IS_ARRAY, .default_str = "", .separator = "," }, + /* Session options. */ { .name = "activity-action", .type = OPTIONS_TABLE_CHOICE, .scope = OPTIONS_TABLE_SESSION, @@ -420,8 +435,9 @@ const struct options_table_entry options_table[] = { }, { .name = "status-format", - .type = OPTIONS_TABLE_ARRAY, + .type = OPTIONS_TABLE_STRING, .scope = OPTIONS_TABLE_SESSION, + .flags = OPTIONS_TABLE_IS_ARRAY, .default_arr = options_table_status_format_default, }, @@ -503,8 +519,9 @@ const struct options_table_entry options_table[] = { }, { .name = "update-environment", - .type = OPTIONS_TABLE_ARRAY, + .type = OPTIONS_TABLE_STRING, .scope = OPTIONS_TABLE_SESSION, + .flags = OPTIONS_TABLE_IS_ARRAY, .default_str = "DISPLAY KRB5CCNAME SSH_ASKPASS SSH_AUTH_SOCK " "SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY" }, @@ -536,6 +553,7 @@ const struct options_table_entry options_table[] = { .default_str = " -_@" }, + /* Window options. */ { .name = "aggressive-resize", .type = OPTIONS_TABLE_FLAG, .scope = OPTIONS_TABLE_WINDOW, @@ -770,5 +788,66 @@ const struct options_table_entry options_table[] = { .default_num = 1 }, + /* Hook options. */ + OPTIONS_TABLE_HOOK("after-bind-key", ""), + OPTIONS_TABLE_HOOK("after-capture-pane", ""), + OPTIONS_TABLE_HOOK("after-copy-mode", ""), + OPTIONS_TABLE_HOOK("after-display-message", ""), + OPTIONS_TABLE_HOOK("after-display-panes", ""), + OPTIONS_TABLE_HOOK("after-list-buffers", ""), + OPTIONS_TABLE_HOOK("after-list-clients", ""), + OPTIONS_TABLE_HOOK("after-list-keys", ""), + OPTIONS_TABLE_HOOK("after-list-panes", ""), + OPTIONS_TABLE_HOOK("after-list-sessions", ""), + OPTIONS_TABLE_HOOK("after-list-windows", ""), + OPTIONS_TABLE_HOOK("after-load-buffer", ""), + OPTIONS_TABLE_HOOK("after-lock-server", ""), + OPTIONS_TABLE_HOOK("after-new-session", ""), + OPTIONS_TABLE_HOOK("after-new-window", ""), + OPTIONS_TABLE_HOOK("after-paste-buffer", ""), + OPTIONS_TABLE_HOOK("after-pipe-pane", ""), + OPTIONS_TABLE_HOOK("after-queue", ""), + OPTIONS_TABLE_HOOK("after-refresh-client", ""), + OPTIONS_TABLE_HOOK("after-rename-session", ""), + OPTIONS_TABLE_HOOK("after-rename-window", ""), + OPTIONS_TABLE_HOOK("after-resize-pane", ""), + OPTIONS_TABLE_HOOK("after-resize-window", ""), + OPTIONS_TABLE_HOOK("after-save-buffer", ""), + OPTIONS_TABLE_HOOK("after-select-layout", ""), + OPTIONS_TABLE_HOOK("after-select-pane", ""), + OPTIONS_TABLE_HOOK("after-select-window", ""), + OPTIONS_TABLE_HOOK("after-send-keys", ""), + OPTIONS_TABLE_HOOK("after-set-buffer", ""), + OPTIONS_TABLE_HOOK("after-set-environment", ""), + OPTIONS_TABLE_HOOK("after-set-hook", ""), + OPTIONS_TABLE_HOOK("after-set-option", ""), + OPTIONS_TABLE_HOOK("after-show-environment", ""), + OPTIONS_TABLE_HOOK("after-show-messages", ""), + OPTIONS_TABLE_HOOK("after-show-options", ""), + OPTIONS_TABLE_HOOK("after-split-window", ""), + OPTIONS_TABLE_HOOK("after-unbind-key", ""), + OPTIONS_TABLE_HOOK("alert-activity", ""), + OPTIONS_TABLE_HOOK("alert-bell", ""), + OPTIONS_TABLE_HOOK("alert-silence", ""), + OPTIONS_TABLE_HOOK("client-attached", ""), + OPTIONS_TABLE_HOOK("client-detached", ""), + OPTIONS_TABLE_HOOK("client-resized", ""), + OPTIONS_TABLE_HOOK("client-session-changed", ""), + OPTIONS_TABLE_HOOK("pane-died", ""), + OPTIONS_TABLE_HOOK("pane-exited", ""), + OPTIONS_TABLE_HOOK("pane-focus-in", ""), + OPTIONS_TABLE_HOOK("pane-focus-out", ""), + OPTIONS_TABLE_HOOK("pane-mode-changed", ""), + OPTIONS_TABLE_HOOK("pane-set-clipboard", ""), + OPTIONS_TABLE_HOOK("session-closed", ""), + OPTIONS_TABLE_HOOK("session-created", ""), + OPTIONS_TABLE_HOOK("session-renamed", ""), + OPTIONS_TABLE_HOOK("session-window-changed", ""), + OPTIONS_TABLE_HOOK("window-layout-changed", ""), + OPTIONS_TABLE_HOOK("window-linked", ""), + OPTIONS_TABLE_HOOK("window-pane-changed", ""), + OPTIONS_TABLE_HOOK("window-renamed", ""), + OPTIONS_TABLE_HOOK("window-unlinked", ""), + { .name = NULL } }; |