From c94c41d1db80138529f0942fa5b4e04e609be3e4 Mon Sep 17 00:00:00 2001 From: Luminarys Date: Sun, 16 Aug 2015 11:41:41 -0500 Subject: [PATCH] Added in kill command --- sway/commands.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sway/commands.c b/sway/commands.c index 7ddbe17ea..02fdcf6cb 100644 --- a/sway/commands.c +++ b/sway/commands.c @@ -188,6 +188,12 @@ static bool cmd_focus_follows_mouse(struct sway_config *config, int argc, char * return true; } +static bool cmd_kill(struct sway_config *config, int argc, char **argv) { + swayc_t *view = get_focused_container(&root_container); + wlc_view_close(view->handle); + return true; +} + static bool cmd_layout(struct sway_config *config, int argc, char **argv) { if (!checkarg(argc, "layout", EXPECTED_MORE_THAN, 0)) { return false; @@ -345,6 +351,7 @@ static struct cmd_handler handlers[] = { { "focus", cmd_focus }, { "focus_follows_mouse", cmd_focus_follows_mouse }, { "fullscreen", cmd_fullscreen }, + { "kill", cmd_kill }, { "layout", cmd_layout }, { "log_colors", cmd_log_colors }, { "reload", cmd_reload },