mirror of
https://github.com/swaywm/sway.git
synced 2025-11-06 13:29:50 -05:00
Implement focus child command
The `focus child` command focuses the child container within the selected container.
This commit is contained in:
parent
6d2b455727
commit
88b7cbe314
5 changed files with 12 additions and 5 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue