diff options
author | portix <none@none> | 2013-01-28 17:49:14 +0100 |
---|---|---|
committer | portix <none@none> | 2013-01-28 17:49:14 +0100 |
commit | 422e28fd748f3c2b0e89aa14614a0ac42c1847fb (patch) | |
tree | 0df1db793c66aaba55423b1b6fae8d2502d65023 /src/commands.c | |
parent | a76637c331e2fadb7031764f70a8aa9068053e57 (diff) | |
download | dwb-422e28fd748f3c2b0e89aa14614a0ac42c1847fb.zip |
New signal 'executeCommand'
Diffstat (limited to 'src/commands.c')
-rw-r--r-- | src/commands.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/commands.c b/src/commands.c index b8de8ffb..564b2ae3 100644 --- a/src/commands.c +++ b/src/commands.c @@ -54,6 +54,21 @@ commands_simple_command(KeyMap *km) completion_clean_autocompletion(); } + if (EMIT_SCRIPT(EXECUTE_COMMAND)) + { + char *json = util_create_json(3, + CHAR, "command", km->map->n.first, + CHAR, "argument", arg->p, + INTEGER, "nummod", dwb.state.nummod); + ScriptSignal sig = { NULL, SCRIPTS_SIG_META(json, EXECUTE_COMMAND, 0) } ; + + gboolean prevent = scripts_emit(&sig); + g_free(json); + + if (prevent) + return STATUS_OK; + } + ret = func(km, arg); switch (ret) { |