replaced "bot" with "bottom" in auto layout commands

This commit is contained in:
wil 2017-01-14 19:34:04 +01:00
parent b74870f516
commit 71b386964a
3 changed files with 31 additions and 21 deletions

View file

@ -78,7 +78,7 @@ static struct cmd_results *cmd_layout_auto(swayc_t *container, int argc, char **
struct cmd_results *error = NULL; struct cmd_results *error = NULL;
const char *cmd_name = "layout auto"; const char *cmd_name = "layout auto";
const char *set_inc_cmd_name = "layout auto [master|ncol] [set|inc]"; const char *set_inc_cmd_name = "layout auto [master|ncol] [set|inc]";
const char *err_msg = "Allowed arguments are <right|left|top|bot|next|prev|master|ncol>"; const char *err_msg = "Allowed arguments are <right|left|top|bottom|next|prev|master|ncol>";
bool need_layout_update = false; bool need_layout_update = false;
enum swayc_layouts old_layout = container->layout; enum swayc_layouts old_layout = container->layout;
@ -90,7 +90,7 @@ static struct cmd_results *cmd_layout_auto(swayc_t *container, int argc, char **
layout = L_AUTO_RIGHT; layout = L_AUTO_RIGHT;
} else if (strcasecmp(argv[1], "top") == 0) { } else if (strcasecmp(argv[1], "top") == 0) {
layout = L_AUTO_TOP; layout = L_AUTO_TOP;
} else if (strcasecmp(argv[1], "bot") == 0) { } else if (strcasecmp(argv[1], "bottom") == 0) {
layout = L_AUTO_BOTTOM; layout = L_AUTO_BOTTOM;
} else if (strcasecmp(argv[1], "next") == 0) { } else if (strcasecmp(argv[1], "next") == 0) {
if (is_auto_layout(container->layout) && container->layout < L_AUTO_LAST) { if (is_auto_layout(container->layout) && container->layout < L_AUTO_LAST) {

View file

@ -3,7 +3,7 @@
struct cmd_results *cmd_workspace_layout(int argc, char **argv) { struct cmd_results *cmd_workspace_layout(int argc, char **argv) {
struct cmd_results *error = NULL; struct cmd_results *error = NULL;
if ((error = checkarg(argc, "workspace_layout", EXPECTED_EQUAL_TO, 1))) { if ((error = checkarg(argc, "workspace_layout", EXPECTED_AT_LEAST, 1))) {
return error; return error;
} }
@ -13,16 +13,27 @@ struct cmd_results *cmd_workspace_layout(int argc, char **argv) {
config->default_layout = L_STACKED; config->default_layout = L_STACKED;
} else if (strcasecmp(argv[0], "tabbed") == 0) { } else if (strcasecmp(argv[0], "tabbed") == 0) {
config->default_layout = L_TABBED; config->default_layout = L_TABBED;
} else if (strcasecmp(argv[0], "auto_left") == 0) { } else if (strcasecmp(argv[0], "auto") == 0) {
config->default_layout = L_AUTO_LEFT; if (argc == 1) {
} else if (strcasecmp(argv[0], "auto_right") == 0) { config->default_layout = L_AUTO_FIRST;
config->default_layout = L_AUTO_RIGHT; } else {
} else if (strcasecmp(argv[0], "auto_top") == 0) { if ((error = checkarg(argc, "workspace_layout auto", EXPECTED_EQUAL_TO, 2))) {
config->default_layout = L_AUTO_TOP; return error;
} else if (strcasecmp(argv[0], "auto_bottom") == 0) { }
config->default_layout = L_AUTO_BOTTOM; if (strcasecmp(argv[0], "left") == 0) {
config->default_layout = L_AUTO_LEFT;
} else if (strcasecmp(argv[0], "right") == 0) {
config->default_layout = L_AUTO_RIGHT;
} else if (strcasecmp(argv[0], "top") == 0) {
config->default_layout = L_AUTO_TOP;
} else if (strcasecmp(argv[0], "bottom") == 0) {
config->default_layout = L_AUTO_BOTTOM;
} else {
return cmd_results_new(CMD_INVALID, "workspace_layout auto", "Expected 'workspace_layout auto <left|right|top|bottom>'");
}
}
} else { } else {
return cmd_results_new(CMD_INVALID, "workspace_layout", "Expected 'workspace_layout <default|stacking|tabbed|auto_left|auto_right|auto_top|auto_bottom>'"); return cmd_results_new(CMD_INVALID, "workspace_layout", "Expected 'workspace_layout <default|stacking|tabbed|auto|auto left|auto right|auto top|auto bottom>'");
} }
return cmd_results_new(CMD_SUCCESS, NULL, NULL); return cmd_results_new(CMD_SUCCESS, NULL, NULL);
} }

View file

@ -64,12 +64,11 @@ They are expected to be used with **bindsym** or at runtime through **swaymsg**(
**focus** <direction>:: **focus** <direction>::
Direction may be one of _up_, _down_, _left_, _right_, _next_, _prev_, Direction may be one of _up_, _down_, _left_, _right_, _next_, _prev_,
_parent_, or _child_. The directional focus commands will move the focus _parent_, or _child_. The directional focus commands will move the focus
in that direction. The auto_next and auto_prev will focus the next, in that direction. The _next_ and _prev_ directions will focus the next,
respectively previous, element in the current container if it is using respectively previous, element in the current container. The parent
one of the _auto_ layouts. The parent focus command will change the focus command will change the focus to the parent of the currently
focus to the parent of the currently focused container, which is useful, focused container, which is useful, for example, to open a sibling of
for example, to open a sibling of the parent container, or to move the the parent container, or to move the entire container around.
entire container around.
**focus** output <direction|name>:: **focus** output <direction|name>::
Direction may be one of _up_, _down_, _left_, _right_. The directional focus Direction may be one of _up_, _down_, _left_, _right_. The directional focus
@ -88,7 +87,7 @@ They are expected to be used with **bindsym** or at runtime through **swaymsg**(
**layout** auto <mode>:: **layout** auto <mode>::
Sets layout to one of the auto modes, i.e. one of _left_, right_, _top_, Sets layout to one of the auto modes, i.e. one of _left_, right_, _top_,
or _bot_. or _bottom_.
**layout** auto <next|prev>:: **layout** auto <next|prev>::
Cycles between available auto layouts. Cycles between available auto layouts.
@ -381,8 +380,8 @@ The default colors are:
switch to workspace 2, then invoke the "workspace 2" command again, you switch to workspace 2, then invoke the "workspace 2" command again, you
will be returned to workspace 1. Defaults to _no_. will be returned to workspace 1. Defaults to _no_.
**workspace_layout** <default|stacking|tabbed|auto_left|auto_right|auto_top|auto_bottom>:: **workspace_layout** <default|stacking|tabbed|auto|auto left|auto right|auto
Specifies the start layout for new workspaces. top|auto bottom>:: Specifies the start layout for new workspaces.
**include** <path>:: **include** <path>::
Includes a sub config file by _path_. _path_ can be either a full path or a Includes a sub config file by _path_. _path_ can be either a full path or a