diff options
author | Drew DeVault <sir@cmpwn.com> | 2016-05-14 16:47:45 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2016-05-14 16:47:45 -0400 |
commit | ae027aad5a4a1c83cb4dd073aaeb2276b2e659ac (patch) | |
tree | 26292b5ece4da11f72f7b3b486d2dc5c83caa026 /sway/commands.c | |
parent | 2c9553a6fdfa7986fadeb3ac3883622a3c7aa8c5 (diff) | |
parent | e73dde3b1057c8248eb24b3c15c99f398472eeba (diff) |
Merge pull request #662 from Hummer12007/scroll
Support floating_scroll sideways
Diffstat (limited to 'sway/commands.c')
-rw-r--r-- | sway/commands.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sway/commands.c b/sway/commands.c index 22621453..9c5309f9 100644 --- a/sway/commands.c +++ b/sway/commands.c @@ -726,6 +726,20 @@ static struct cmd_results *cmd_floating_scroll(int argc, char **argv) { } else { config->floating_scroll_down_cmd = join_args(argv + 1, argc - 1); } + } else if (!strcasecmp("left", argv[0])) { + free(config->floating_scroll_left_cmd); + if (argc < 2) { + config->floating_scroll_left_cmd = strdup(""); + } else { + config->floating_scroll_left_cmd = join_args(argv + 1, argc - 1); + } + } else if (!strcasecmp("right", argv[0])) { + free(config->floating_scroll_right_cmd); + if (argc < 2) { + config->floating_scroll_right_cmd = strdup(""); + } else { + config->floating_scroll_right_cmd = join_args(argv + 1, argc - 1); + } } else { error = cmd_results_new(CMD_INVALID, "floating_scroll", "Unknown command: '%s'", argv[0]); return error; |