Add hooks infrastructure, basic commands (set-hook, show-hooks) and a

couple of not very useful client hooks. This will eventually let
commands be run at various points and on notifications. Joint work with
Thomas Adam.
This commit is contained in:
nicm
2015-12-08 01:10:31 +00:00
parent dbfce2a4d8
commit d2fb0efcd1
11 changed files with 364 additions and 13 deletions

3
tmux.c
View File

@ -38,6 +38,7 @@ struct options *global_options; /* server options */
struct options *global_s_options; /* session options */
struct options *global_w_options; /* window options */
struct environ *global_environ;
struct hooks *global_hooks;
struct timeval start_time;
const char *socket_path;
@ -269,6 +270,8 @@ main(int argc, char **argv)
flags |= CLIENT_UTF8;
}
global_hooks = hooks_create(NULL);
global_environ = environ_create();
for (var = environ; *var != NULL; var++)
environ_put(global_environ, *var);