diff options
author | 2015-08-16 11:41:41 -0500 | |
---|---|---|
committer | 2015-08-16 11:41:41 -0500 | |
commit | c94c41d1db80138529f0942fa5b4e04e609be3e4 (patch) | |
tree | 05ad3842fa8378214d1f050c1508f11ecba7f60f /sway | |
parent | Config errors should not be fatal (diff) | |
download | sway-c94c41d1db80138529f0942fa5b4e04e609be3e4.tar.gz sway-c94c41d1db80138529f0942fa5b4e04e609be3e4.tar.zst sway-c94c41d1db80138529f0942fa5b4e04e609be3e4.zip |
Added in kill command
Diffstat (limited to 'sway')
-rw-r--r-- | sway/commands.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sway/commands.c b/sway/commands.c index 7ddbe17e..02fdcf6c 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 * | |||
188 | return true; | 188 | return true; |
189 | } | 189 | } |
190 | 190 | ||
191 | static bool cmd_kill(struct sway_config *config, int argc, char **argv) { | ||
192 | swayc_t *view = get_focused_container(&root_container); | ||
193 | wlc_view_close(view->handle); | ||
194 | return true; | ||
195 | } | ||
196 | |||
191 | static bool cmd_layout(struct sway_config *config, int argc, char **argv) { | 197 | static bool cmd_layout(struct sway_config *config, int argc, char **argv) { |
192 | if (!checkarg(argc, "layout", EXPECTED_MORE_THAN, 0)) { | 198 | if (!checkarg(argc, "layout", EXPECTED_MORE_THAN, 0)) { |
193 | return false; | 199 | return false; |
@@ -345,6 +351,7 @@ static struct cmd_handler handlers[] = { | |||
345 | { "focus", cmd_focus }, | 351 | { "focus", cmd_focus }, |
346 | { "focus_follows_mouse", cmd_focus_follows_mouse }, | 352 | { "focus_follows_mouse", cmd_focus_follows_mouse }, |
347 | { "fullscreen", cmd_fullscreen }, | 353 | { "fullscreen", cmd_fullscreen }, |
354 | { "kill", cmd_kill }, | ||
348 | { "layout", cmd_layout }, | 355 | { "layout", cmd_layout }, |
349 | { "log_colors", cmd_log_colors }, | 356 | { "log_colors", cmd_log_colors }, |
350 | { "reload", cmd_reload }, | 357 | { "reload", cmd_reload }, |