config: add mouse.alternate-scroll-mode option

This option controls the initial state of the Alternate Scroll Mode,
and defaults to ‘enabled’.
This commit is contained in:
Daniel Eklöf 2020-09-15 19:09:00 +02:00
parent 04c1bab7b0
commit f2497320c6
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
6 changed files with 31 additions and 0 deletions

View file

@ -764,6 +764,9 @@ parse_section_mouse(const char *key, const char *value, struct config *conf,
if (strcmp(key, "hide-when-typing") == 0)
conf->mouse.hide_when_typing = str_to_bool(value);
else if (strcmp(key, "alternate-scroll-mode") == 0)
conf->mouse.alternate_scroll_mode = str_to_bool(value);
else {
LOG_AND_NOTIFY_ERR("%s:%d: [mouse]: %s: invalid key", path, lineno, key);
return false;
@ -1907,6 +1910,7 @@ config_load(struct config *conf, const char *conf_path,
},
.mouse = {
.hide_when_typing = false,
.alternate_scroll_mode = true,
},
.csd = {
.preferred = CONF_CSD_PREFER_SERVER,