aboutsummaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-10-09 05:41:39 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-10-09 05:41:39 +0000
commitb10d93b0efe657d25e6615e45d5d6b84f069a06c (patch)
treed5612e8d8fe89006f3c634d64cbd4c8d921ea71a /config.c
parentdoc: foot.1: remove ‘--’ from example command line (diff)
parentdoc: foot.ini: bell/urgency: add note about this getting replaced in the future (diff)
Merge branch 'bell-triggers-faked-urgency' into master
Closes #157
Diffstat (limited to 'config.c')
-rw-r--r--config.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/config.c b/config.c
index ff5d6c59..3bece45e 100644
--- a/config.c
+++ b/config.c
@@ -517,6 +517,20 @@ parse_section_main(const char *key, const char *value, struct config *conf,
conf->pad_y = y;
}
+ else if (strcmp(key, "bell") == 0) {
+ if (strcmp(value, "set-urgency") == 0)
+ conf->bell_set_urgency = true;
+ else if (strcmp(value, "none") == 0)
+ conf->bell_set_urgency = false;
+ else {
+ LOG_AND_NOTIFY_ERR(
+ "%s:%d: [default]: bell: "
+ "expected either 'set-urgency' or 'none'", path, lineno);
+ conf->bell_set_urgency = false;
+ return false;
+ }
+ }
+
else if (strcmp(key, "initial-window-mode") == 0) {
if (strcmp(value, "windowed") == 0)
conf->startup_mode = STARTUP_WINDOWED;
@@ -1867,6 +1881,7 @@ config_load(struct config *conf, const char *conf_path,
},
.pad_x = 2,
.pad_y = 2,
+ .bell_set_urgency = false,
.startup_mode = STARTUP_WINDOWED,
.fonts = tll_init(),
.scrollback = {