mirror of
https://github.com/swaywm/sway.git
synced 2025-11-10 13:29:51 -05:00
refactor commands.c
This commit is contained in:
parent
050704ab23
commit
b374c35758
77 changed files with 3567 additions and 3217 deletions
12
sway/commands/kill.c
Normal file
12
sway/commands/kill.c
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#include "commands.h"
|
||||
#include "container.h"
|
||||
#include "focus.h"
|
||||
|
||||
struct cmd_results *cmd_kill(int argc, char **argv) {
|
||||
if (config->reading) return cmd_results_new(CMD_FAILURE, "kill", "Can't be used in config file.");
|
||||
if (!config->active) return cmd_results_new(CMD_FAILURE, "kill", "Can only be used when sway is running.");
|
||||
|
||||
swayc_t *container = get_focused_container(&root_container);
|
||||
close_views(container);
|
||||
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue