summaryrefslogtreecommitdiffstats
path: root/cmd-set-hook.c
AgeCommit message (Collapse)Author
2018-07-04Add set-hook -R to run a hook immediately (useful to set multiple hooksnicm
to the same thing).
2017-04-22Get rid of the extra layer of flags and cmd_prepare() and just store thenicm
CMD_FIND_* flags in the cmd_entry and call it for the command. Commands with special requirements call it themselves and update the target for hooks to use.
2017-01-15It is silly for cmd_list_parse to return an integer error when it couldnicm
just return NULL.
2016-10-16Mass rename struct cmd_q to struct cmdq_item and related.nicm
2016-10-14Add CMD_AFTERHOOK flag to the easy commands that don't need any special ↵nicm
handling.
2016-10-10Add static in cmd-* and fix a few other nits.nicm
2016-05-12set-hook needs CANFAIL like the other set commands.nicm
2015-12-14Instead of combined flags for -c, -s, -t, split into different setsnicm
using an enum and simplify the parsing code.
2015-12-13Use member names in cmd_entry definitions so I stop getting confusednicm
about the order.
2015-12-13Instead of every command resolving the target (-t or -s) itself, preparenicm
the state (client, session, winlink, pane) for it it before entering the command. Each command provides some flags that tell the prepare step what it is expecting. This is a requirement for having hooks on commands (for example, if you hook "select-window -t1:2", the hook command should to operate on window 1:2 not whatever it thinks is the current window), and should allow some other target improvements. The old cmd_find_* functions remain for the moment but that layer will be dropped later. Joint work with Thomas Adam.
2015-12-11We cannot do hooks_find and then hooks_remove because it might have comenicm
from the parent (global) tree, instead make it remove by name like options. While here, also tidy up a few bits of options and hooks handling (use RB_FOREACH_SAFE, and a helper function for the free).
2015-12-08Add hooks infrastructure, basic commands (set-hook, show-hooks) and anicm
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.