diff options
author | Ragnar Groot Koerkamp <ragnar.grootkoerkamp@gmail.com> | 2021-06-18 17:05:23 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-06-22 19:00:31 +0200 |
commit | c0c4e260c45a07b98fc90276a9ca7b6cf06b3d0b (patch) | |
tree | 3035de0f58cbaf2a0bffcbd42ab6ec94db060086 /sway/commands/workspace.c | |
parent | Don't apply hide_edge_borders to any floating container (diff) | |
download | sway-c0c4e260c45a07b98fc90276a9ca7b6cf06b3d0b.tar.gz sway-c0c4e260c45a07b98fc90276a9ca7b6cf06b3d0b.tar.zst sway-c0c4e260c45a07b98fc90276a9ca7b6cf06b3d0b.zip |
Revert "Add workspace {prev,next}_on_output --create"
This reverts commit 487c83f0de9ca2a7650ad636eed6fd694ddcb82e.
The --create flag is undocumented, not in i3, and at least partially
broken (#5913), so this removes the feature.
Diffstat (limited to 'sway/commands/workspace.c')
-rw-r--r-- | sway/commands/workspace.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/sway/commands/workspace.c b/sway/commands/workspace.c index 67db08ff..a6a0beda 100644 --- a/sway/commands/workspace.c +++ b/sway/commands/workspace.c | |||
@@ -187,12 +187,7 @@ struct cmd_results *cmd_workspace(int argc, char **argv) { | |||
187 | ++argv; | 187 | ++argv; |
188 | } | 188 | } |
189 | 189 | ||
190 | bool create = argc > 1 && strcasecmp(argv[1], "--create") == 0; | ||
191 | struct sway_seat *seat = config->handler_context.seat; | 190 | struct sway_seat *seat = config->handler_context.seat; |
192 | struct sway_workspace *current = seat_get_focused_workspace(seat); | ||
193 | if (!current) { | ||
194 | return cmd_results_new(CMD_FAILURE, "No workspace to switch from"); | ||
195 | } | ||
196 | 191 | ||
197 | struct sway_workspace *ws = NULL; | 192 | struct sway_workspace *ws = NULL; |
198 | if (strcasecmp(argv[0], "number") == 0) { | 193 | if (strcasecmp(argv[0], "number") == 0) { |
@@ -214,12 +209,10 @@ struct cmd_results *cmd_workspace(int argc, char **argv) { | |||
214 | } | 209 | } |
215 | } else if (strcasecmp(argv[0], "next") == 0 || | 210 | } else if (strcasecmp(argv[0], "next") == 0 || |
216 | strcasecmp(argv[0], "prev") == 0 || | 211 | strcasecmp(argv[0], "prev") == 0 || |
212 | strcasecmp(argv[0], "next_on_output") == 0 || | ||
213 | strcasecmp(argv[0], "prev_on_output") == 0 || | ||
217 | strcasecmp(argv[0], "current") == 0) { | 214 | strcasecmp(argv[0], "current") == 0) { |
218 | ws = workspace_by_name(argv[0]); | 215 | ws = workspace_by_name(argv[0]); |
219 | } else if (strcasecmp(argv[0], "next_on_output") == 0) { | ||
220 | ws = workspace_output_next(current, create); | ||
221 | } else if (strcasecmp(argv[0], "prev_on_output") == 0) { | ||
222 | ws = workspace_output_prev(current, create); | ||
223 | } else if (strcasecmp(argv[0], "back_and_forth") == 0) { | 216 | } else if (strcasecmp(argv[0], "back_and_forth") == 0) { |
224 | if (!seat->prev_workspace_name) { | 217 | if (!seat->prev_workspace_name) { |
225 | return cmd_results_new(CMD_INVALID, | 218 | return cmd_results_new(CMD_INVALID, |