diff options
Diffstat (limited to 'sway/commands.c')
-rw-r--r-- | sway/commands.c | 13 |
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) { | |||
852 | return true; | 852 | return true; |
853 | } | 853 | } |
854 | 854 | ||
855 | static bool cmd_ws_auto_back_and_forth(struct sway_config *config, int argc, char **argv) { | ||
856 | if (!checkarg(argc, "workspace_auto_back_and_forth", EXPECTED_EQUAL_TO, 1)) { | ||
857 | return false; | ||
858 | } | ||
859 | if (strcasecmp(argv[0], "yes") == 0) { | ||
860 | config->auto_back_and_forth = true; | ||
861 | } | ||
862 | return true; | ||
863 | } | ||
864 | |||
855 | /* Keep alphabetized */ | 865 | /* Keep alphabetized */ |
856 | static struct cmd_handler handlers[] = { | 866 | static struct cmd_handler handlers[] = { |
857 | { "bindsym", cmd_bindsym }, | 867 | { "bindsym", cmd_bindsym }, |
@@ -877,7 +887,8 @@ static struct cmd_handler handlers[] = { | |||
877 | { "split", cmd_split }, | 887 | { "split", cmd_split }, |
878 | { "splith", cmd_splith }, | 888 | { "splith", cmd_splith }, |
879 | { "splitv", cmd_splitv }, | 889 | { "splitv", cmd_splitv }, |
880 | { "workspace", cmd_workspace } | 890 | { "workspace", cmd_workspace }, |
891 | { "workspace_auto_back_and_forth", cmd_ws_auto_back_and_forth } | ||
881 | }; | 892 | }; |
882 | 893 | ||
883 | static char **split_directive(char *line, int *argc) { | 894 | static char **split_directive(char *line, int *argc) { |