diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-01-21 19:13:11 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2018-01-21 19:13:11 -0500 |
commit | beb3805cf0300bc2640290233aa763d757c12466 (patch) | |
tree | 202b9b951d0123a7f3b248dee1f913114823036e | |
parent | clear handler context before ipc command (diff) | |
download | sway-beb3805cf0300bc2640290233aa763d757c12466.tar.gz sway-beb3805cf0300bc2640290233aa763d757c12466.tar.zst sway-beb3805cf0300bc2640290233aa763d757c12466.zip |
dont allow kill command in config
-rw-r--r-- | sway/commands/kill.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/commands/kill.c b/sway/commands/kill.c index 8208bc14..3804f0b0 100644 --- a/sway/commands/kill.c +++ b/sway/commands/kill.c | |||
@@ -6,6 +6,10 @@ | |||
6 | #include "sway/commands.h" | 6 | #include "sway/commands.h" |
7 | 7 | ||
8 | struct cmd_results *cmd_kill(int argc, char **argv) { | 8 | struct cmd_results *cmd_kill(int argc, char **argv) { |
9 | if (config->reading) { | ||
10 | return cmd_results_new(CMD_FAILURE, "kill", | ||
11 | "Command 'kill' cannot be used in the config file"); | ||
12 | } | ||
9 | if (!sway_assert(config->handler_context.current_container, | 13 | if (!sway_assert(config->handler_context.current_container, |
10 | "cmd_kill called without container context")) { | 14 | "cmd_kill called without container context")) { |
11 | return cmd_results_new(CMD_INVALID, NULL, | 15 | return cmd_results_new(CMD_INVALID, NULL, |