From 0a0fe18fd6126941b3518652c935da1d81249a19 Mon Sep 17 00:00:00 2001 From: Luminarys Date: Sun, 16 Aug 2015 14:50:01 -0500 Subject: Added in workspace next/prev and workspace output_next/prev --- sway/commands.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'sway/commands.c') diff --git a/sway/commands.c b/sway/commands.c index 5cb661eb..91fadb86 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]); -- cgit v1.2.3