aboutsummaryrefslogtreecommitdiff
path: root/sway/commands.c
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2016-07-27 22:42:45 -0400
committerTony Crisci <tony@dubstepdish.com>2016-07-27 22:48:46 -0400
commit88b7cbe314aaefc9cc96884a655a2d9aea84ee0a (patch)
tree293bdbf27966b01a31574f40eb83f4b6ab834ba1 /sway/commands.c
parent6d2b455727f7e3df1fc7241a39694bd843a92ed1 (diff)
Implement `focus child` command
The `focus child` command focuses the child container within the selected container.
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sway/commands.c b/sway/commands.c
index ed561764..56701634 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -864,6 +864,8 @@ static struct cmd_results *cmd_focus(int argc, char **argv) {
move_focus(MOVE_DOWN);
} else if (strcasecmp(argv[0], "parent") == 0) {
move_focus(MOVE_PARENT);
+ } else if (strcasecmp(argv[0], "child") == 0) {
+ move_focus(MOVE_CHILD);
} else if (strcasecmp(argv[0], "mode_toggle") == 0) {
int i;
swayc_t *workspace = swayc_active_workspace();
@@ -903,7 +905,7 @@ static struct cmd_results *cmd_focus(int argc, char **argv) {
}
} else {
return cmd_results_new(CMD_INVALID, "focus",
- "Expected 'focus <direction|parent|mode_toggle>' or 'focus output <direction|name>'");
+ "Expected 'focus <direction|parent|child|mode_toggle>' or 'focus output <direction|name>'");
}
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
}