diff options
Diffstat (limited to 'sway/commands/ws_auto_back_and_forth.c')
-rw-r--r-- | sway/commands/ws_auto_back_and_forth.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sway/commands/ws_auto_back_and_forth.c b/sway/commands/ws_auto_back_and_forth.c index 2485db35..3449d4cc 100644 --- a/sway/commands/ws_auto_back_and_forth.c +++ b/sway/commands/ws_auto_back_and_forth.c | |||
@@ -1,12 +1,14 @@ | |||
1 | #include <string.h> | 1 | #include <string.h> |
2 | #include <strings.h> | 2 | #include <strings.h> |
3 | #include "sway/commands.h" | 3 | #include "sway/commands.h" |
4 | #include "util.h" | ||
4 | 5 | ||
5 | struct cmd_results *cmd_ws_auto_back_and_forth(int argc, char **argv) { | 6 | struct cmd_results *cmd_ws_auto_back_and_forth(int argc, char **argv) { |
6 | struct cmd_results *error = NULL; | 7 | struct cmd_results *error = NULL; |
7 | if ((error = checkarg(argc, "workspace_auto_back_and_forth", EXPECTED_EQUAL_TO, 1))) { | 8 | if ((error = checkarg(argc, "workspace_auto_back_and_forth", EXPECTED_EQUAL_TO, 1))) { |
8 | return error; | 9 | return error; |
9 | } | 10 | } |
10 | config->auto_back_and_forth = !strcasecmp(argv[0], "yes"); | 11 | config->auto_back_and_forth = |
12 | !parse_boolean(argv[0], config->auto_back_and_forth); | ||
11 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); | 13 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); |
12 | } | 14 | } |