diff options
author | portix <none@none> | 2013-02-21 00:42:04 +0100 |
---|---|---|
committer | portix <none@none> | 2013-02-21 00:42:04 +0100 |
commit | 6cee1844ce6467b53285701039c047d550b5c858 (patch) | |
tree | 9fd6ff23ecc356cf0e2fa12523cac2a3c69d7da0 /src/commands.c | |
parent | 427ead3f7118d8bfc39424dc4ba0f98065314811 (diff) | |
download | dwb-6cee1844ce6467b53285701039c047d550b5c858.zip |
New signal 'executeCommand'
Diffstat (limited to 'src/commands.c')
-rw-r--r-- | src/commands.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/commands.c b/src/commands.c index 50ed6d35..1aeae0f9 100644 --- a/src/commands.c +++ b/src/commands.c @@ -55,6 +55,16 @@ commands_simple_command(KeyMap *km, const char *argument) { completion_clean_autocompletion(); } + if (EMIT_SCRIPT(EXECUTE_COMMAND)) + { + char *json = util_create_json(3, + CHAR, "command", km->map->n.first, + CHAR, "argument", argument, + INTEGER, "nummod", dwb.state.nummod); + + ScriptSignal sig = { .jsobj = NULL, SCRIPTS_SIG_META(json, EXECUTE_COMMAND, 0) }; + SCRIPTS_EMIT_RETURN_ARG(sig, json, STATUS_OK); + } ret = func(km, arg); switch (ret) |