summaryrefslogtreecommitdiff
path: root/sway/commands.c
diff options
context:
space:
mode:
authorDrew DeVault <[email protected]>2015-08-16 16:46:16 -0400
committerDrew DeVault <[email protected]>2015-08-16 16:46:16 -0400
commit7f4529ec8b6362ef36ce546cfe34d816f1b708f0 (patch)
tree45de60347ce0fc86e4ac1ee9e814152aee9929c6 /sway/commands.c
parentc5d98fe6febc705487f4a8871f5abeb3aa36890b (diff)
parent0a0fe18fd6126941b3518652c935da1d81249a19 (diff)
Merge pull request #44 from Luminarys/master
Added in workspace next/prev and workspace output_next/prev
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/sway/commands.c b/sway/commands.c
index 842142e2..d4f588de 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -342,6 +342,28 @@ static bool cmd_workspace(struct sway_config *config, int argc, char **argv) {
return false;
}
+ // Handle workspace next/prev
+ if (strcmp(argv[0], "next") == 0) {
+ workspace_next();
+ return true;
+ }
+
+ if (strcmp(argv[0], "prev") == 0) {
+ workspace_next();
+ return true;
+ }
+
+ // Handle workspace output_next/prev
+ if (strcmp(argv[0], "output_next") == 0) {
+ workspace_output_next();
+ return true;
+ }
+
+ if (strcmp(argv[0], "output_prev") == 0) {
+ workspace_output_prev();
+ return true;
+ }
+
swayc_t *workspace = workspace_find_by_name(argv[0]);
if (!workspace) {
workspace = workspace_create(argv[0]);