aboutsummaryrefslogtreecommitdiff
path: root/sway/commands.c
diff options
context:
space:
mode:
authorMykyta Holubakha <hilobakho@gmail.com>2016-05-08 17:17:35 +0300
committerMykyta Holubakha <hilobakho@gmail.com>2016-05-08 17:17:35 +0300
commit0c495eecde82c3b7a2827c713badfd13536f5507 (patch)
treeed2cbb25cb60138bac65178e50ab9cf717dad787 /sway/commands.c
parent394a5d36cb5ac7f1d711fb4d02275ff4523b62bf (diff)
Remove FSB_GAPS_INNER and FSB_GAPS_OUTER
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c29
1 files changed, 7 insertions, 22 deletions
diff --git a/sway/commands.c b/sway/commands.c
index a4fcde78..5a592555 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -711,34 +711,19 @@ static struct cmd_results *cmd_floating_scroll(int argc, char **argv) {
if ((error = checkarg(argc, "floating_scroll", EXPECTED_AT_LEAST, 1))) {
return error;
}
- if (!strcasecmp("behavior", argv[0])) {
+ if (!strcasecmp("up", argv[0])) {
+ free(config->floating_scroll_up_cmd);
if (argc < 2) {
- error = cmd_results_new(CMD_INVALID, "floating_scroll", "Insufficient parameters given");
- return error;
- }
- if (!strcasecmp("gaps_inner", argv[1])) {
- config->floating_scroll = FSB_GAPS_INNER;
- } else if (!strcasecmp("gaps_outer", argv[1])) {
- config->floating_scroll = FSB_GAPS_OUTER;
- } else if (!strcasecmp("custom", argv[1])) {
- config->floating_scroll = FSB_CUSTOM;
- } else {
- error = cmd_results_new(CMD_INVALID, "floating_scroll", "Unknown behavior: '%s'", argv[1]);
- return error;
- }
- } else if (!strcasecmp("up", argv[0])) {
- free(config->fsb_up);
- if (argc < 2) {
- config->fsb_up = strdup("");
+ config->floating_scroll_up_cmd = strdup("");
} else {
- config->fsb_up = join_args(argv + 1, argc - 1);
+ config->floating_scroll_up_cmd = join_args(argv + 1, argc - 1);
}
} else if (!strcasecmp("down", argv[0])) {
- free(config->fsb_down);
+ free(config->floating_scroll_down_cmd);
if (argc < 2) {
- config->fsb_down = strdup("");
+ config->floating_scroll_down_cmd = strdup("");
} else {
- config->fsb_down = join_args(argv + 1, argc - 1);
+ config->floating_scroll_down_cmd = join_args(argv + 1, argc - 1);
}
} else {
error = cmd_results_new(CMD_INVALID, "floating_scroll", "Unknown command: '%s'", argv[0]);