From 016d0455f809ac3b8da8a040611d691b96502c15 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Sat, 1 Sep 2018 21:28:13 +1000 Subject: Implement deprecated new_window and new_float commands May as well make it as easy as possible for users who are coming from i3. This also changes the `border` command to accept a thickness when setting the border to normal. This makes it work the same way as the `default_border` command. Eg. `border normal 5` --- sway/commands/border.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sway/commands') diff --git a/sway/commands/border.c b/sway/commands/border.c index 9c19e20a..9502c877 100644 --- a/sway/commands/border.c +++ b/sway/commands/border.c @@ -27,9 +27,6 @@ struct cmd_results *cmd_border(int argc, char **argv) { view->border = B_NORMAL; } else if (strcmp(argv[0], "pixel") == 0) { view->border = B_PIXEL; - if (argc == 2) { - view->border_thickness = atoi(argv[1]); - } } else if (strcmp(argv[0], "toggle") == 0) { view->border = (view->border + 1) % 3; } else { @@ -37,6 +34,9 @@ struct cmd_results *cmd_border(int argc, char **argv) { "Expected 'border ' " "or 'border pixel '"); } + if (argc == 2) { + view->border_thickness = atoi(argv[1]); + } if (container_is_floating(view->swayc)) { container_set_geometry_from_floating_view(view->swayc); -- cgit v1.2.3