diff options
Diffstat (limited to 'sway/commands/workspace_auto_back_and_forth.c')
-rw-r--r-- | sway/commands/workspace_auto_back_and_forth.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sway/commands/workspace_auto_back_and_forth.c b/sway/commands/workspace_auto_back_and_forth.c new file mode 100644 index 00000000..22a66678 --- /dev/null +++ b/sway/commands/workspace_auto_back_and_forth.c | |||
@@ -0,0 +1,17 @@ | |||
1 | #include <string.h> | ||
2 | #include "sway/commands.h" | ||
3 | |||
4 | struct cmd_results *cmd_ws_auto_back_and_forth(int argc, char **argv) { | ||
5 | struct cmd_results *error = NULL; | ||
6 | if ((error = checkarg(argc, "workspace_auto_back_and_forth", EXPECTED_EQUAL_TO, 1))) { | ||
7 | return error; | ||
8 | } | ||
9 | if (strcasecmp(argv[0], "yes") == 0) { | ||
10 | config->auto_back_and_forth = true; | ||
11 | } else if (strcasecmp(argv[0], "no") == 0) { | ||
12 | config->auto_back_and_forth = false; | ||
13 | } else { | ||
14 | return cmd_results_new(CMD_INVALID, "workspace_auto_back_and_forth", "Expected 'workspace_auto_back_and_forth <yes|no>'"); | ||
15 | } | ||
16 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); | ||
17 | } | ||