aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/workspace.c
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2018-04-03 13:08:45 -0400
committerLibravatar Tony Crisci <tony@dubstepdish.com>2018-04-03 13:08:45 -0400
commit5f4761c4f40f5d6ec550ccabaebe0f990b6e8bbc (patch)
tree75f4da71db52745ffd833e0bb7b110ff0044c084 /sway/commands/workspace.c
parentmove output code out of the tree (diff)
downloadsway-5f4761c4f40f5d6ec550ccabaebe0f990b6e8bbc.tar.gz
sway-5f4761c4f40f5d6ec550ccabaebe0f990b6e8bbc.tar.zst
sway-5f4761c4f40f5d6ec550ccabaebe0f990b6e8bbc.zip
unify workspace create functions
Diffstat (limited to 'sway/commands/workspace.c')
-rw-r--r--sway/commands/workspace.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/commands/workspace.c b/sway/commands/workspace.c
index aa4096f7..a3702803 100644
--- a/sway/commands/workspace.c
+++ b/sway/commands/workspace.c
@@ -61,7 +61,7 @@ struct cmd_results *cmd_workspace(int argc, char **argv) {
61 if (strcasecmp(argv[0], "number") == 0) { 61 if (strcasecmp(argv[0], "number") == 0) {
62 if (!(ws = workspace_by_number(argv[1]))) { 62 if (!(ws = workspace_by_number(argv[1]))) {
63 char *name = join_args(argv + 1, argc - 1); 63 char *name = join_args(argv + 1, argc - 1);
64 ws = workspace_create(name); 64 ws = container_workspace_create(NULL, name);
65 free(name); 65 free(name);
66 } 66 }
67 } else if (strcasecmp(argv[0], "next") == 0) { 67 } else if (strcasecmp(argv[0], "next") == 0) {
@@ -80,12 +80,12 @@ struct cmd_results *cmd_workspace(int argc, char **argv) {
80 ws = old_workspace; 80 ws = old_workspace;
81 } else if (prev_workspace_name 81 } else if (prev_workspace_name
82 && !(ws = workspace_by_name(prev_workspace_name))) { 82 && !(ws = workspace_by_name(prev_workspace_name))) {
83 ws = workspace_create(prev_workspace_name); 83 ws = container_workspace_create(NULL, prev_workspace_name);
84 } 84 }
85 } else { 85 } else {
86 char *name = join_args(argv, argc); 86 char *name = join_args(argv, argc);
87 if (!(ws = workspace_by_name(name))) { 87 if (!(ws = workspace_by_name(name))) {
88 ws = workspace_create(name); 88 ws = container_workspace_create(NULL, name);
89 } 89 }
90 free(name); 90 free(name);
91 } 91 }