aboutsummaryrefslogtreecommitdiff
path: root/sway/commands.c
diff options
context:
space:
mode:
authorLuminarys <kizunanohikari@gmail.com>2015-08-30 21:34:10 -0500
committerLuminarys <kizunanohikari@gmail.com>2015-08-30 21:34:24 -0500
commit12e96f0f9e77658e4f490a1ae94c66a4df40b66f (patch)
tree60c4c9e7e61126f695c6fb049e2fde7337fc731c /sway/commands.c
parent0ab71f5f0a47fd87bb71d7361ea90a8fa88c8361 (diff)
Added in workspace_auto_back_and_forth
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/sway/commands.c b/sway/commands.c
index 1825be4f..177c54ab 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -852,6 +852,16 @@ static bool cmd_workspace(struct sway_config *config, int argc, char **argv) {
return true;
}
+static bool cmd_ws_auto_back_and_forth(struct sway_config *config, int argc, char **argv) {
+ if (!checkarg(argc, "workspace_auto_back_and_forth", EXPECTED_EQUAL_TO, 1)) {
+ return false;
+ }
+ if (strcasecmp(argv[0], "yes") == 0) {
+ config->auto_back_and_forth = true;
+ }
+ return true;
+}
+
/* Keep alphabetized */
static struct cmd_handler handlers[] = {
{ "bindsym", cmd_bindsym },
@@ -877,7 +887,8 @@ static struct cmd_handler handlers[] = {
{ "split", cmd_split },
{ "splith", cmd_splith },
{ "splitv", cmd_splitv },
- { "workspace", cmd_workspace }
+ { "workspace", cmd_workspace },
+ { "workspace_auto_back_and_forth", cmd_ws_auto_back_and_forth }
};
static char **split_directive(char *line, int *argc) {