aboutsummaryrefslogtreecommitdiff
path: root/sway/commands
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands')
-rw-r--r--sway/commands/layout.c12
-rw-r--r--sway/commands/move.c4
2 files changed, 3 insertions, 13 deletions
diff --git a/sway/commands/layout.c b/sway/commands/layout.c
index d908b95c..2da65765 100644
--- a/sway/commands/layout.c
+++ b/sway/commands/layout.c
@@ -117,18 +117,6 @@ struct cmd_results *cmd_layout(int argc, char **argv) {
"Must be one of <prev|next>.");
}
swayc_change_layout(parent, layout);
- } else if (strcasecmp(argv[0], "promote") == 0) {
- // swap first child in auto layout with currently focused child
- swayc_t *container = get_focused_view(swayc_active_workspace());
- swayc_t *parent = container->parent;
- if (is_auto_layout(parent->layout)) {
- int focused_idx = index_child(container);
- swayc_t *first = parent->children->items[0];
- if (focused_idx > 0) {
- list_swap(parent->children, 0, focused_idx);
- swap_geometry(first, container);
- }
- }
}
}
diff --git a/sway/commands/move.c b/sway/commands/move.c
index 4f6bc76f..0b134494 100644
--- a/sway/commands/move.c
+++ b/sway/commands/move.c
@@ -13,7 +13,7 @@ struct cmd_results *cmd_move(int argc, char **argv) {
if ((error = checkarg(argc, "move", EXPECTED_AT_LEAST, 1))) {
return error;
}
- const char* expected_syntax = "Expected 'move <left|right|up|down|next|prev>' or "
+ const char* expected_syntax = "Expected 'move <left|right|up|down|next|prev|first>' or "
"'move <container|window> to workspace <name>' or "
"'move <container|window|workspace> to output <name|direction>' or "
"'move position mouse'";
@@ -31,6 +31,8 @@ struct cmd_results *cmd_move(int argc, char **argv) {
move_container(view, MOVE_NEXT);
} else if (strcasecmp(argv[0], "prev") == 0) {
move_container(view, MOVE_PREV);
+ } else if (strcasecmp(argv[0], "first") == 0) {
+ move_container(view, MOVE_FIRST);
} else if (strcasecmp(argv[0], "container") == 0 || strcasecmp(argv[0], "window") == 0) {
// "move container ...
if ((error = checkarg(argc, "move container/window", EXPECTED_AT_LEAST, 4))) {