From e73dde3b1057c8248eb24b3c15c99f398472eeba Mon Sep 17 00:00:00 2001 From: Mykyta Holubakha Date: Sat, 14 May 2016 23:42:02 +0300 Subject: Support floating_scroll sideways --- sway/commands.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'sway/commands.c') 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; -- cgit v1.2.3