mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-29 07:58:01 -04:00
config: add ‘notify’ to possible values for ‘bell’ in foot.ini
When `bell=notify`, foot will trigger a desktop notification when it receives a BEL in an unfocused window.
This commit is contained in:
parent
1d8410b7ae
commit
15d20af2a2
7 changed files with 45 additions and 17 deletions
13
config.c
13
config.c
|
|
@ -483,14 +483,17 @@ parse_section_main(const char *key, const char *value, struct config *conf,
|
|||
|
||||
else if (strcmp(key, "bell") == 0) {
|
||||
if (strcmp(value, "set-urgency") == 0)
|
||||
conf->bell_is_urgent = true;
|
||||
conf->bell_action = BELL_ACTION_URGENT;
|
||||
else if (strcmp(value, "notify") == 0)
|
||||
conf->bell_action = BELL_ACTION_NOTIFY;
|
||||
else if (strcmp(value, "none") == 0)
|
||||
conf->bell_is_urgent = false;
|
||||
conf->bell_action = BELL_ACTION_NONE;
|
||||
else {
|
||||
LOG_AND_NOTIFY_ERR(
|
||||
"%s:%d: [default]: bell: "
|
||||
"expected either 'set-urgency' or 'none'", path, lineno);
|
||||
conf->bell_is_urgent = false;
|
||||
"expected either 'set-urgency', 'notify' or 'none'",
|
||||
path, lineno);
|
||||
conf->bell_action = BELL_ACTION_NONE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -1945,7 +1948,7 @@ config_load(struct config *conf, const char *conf_path,
|
|||
.pad_x = 2,
|
||||
.pad_y = 2,
|
||||
.bold_in_bright = false,
|
||||
.bell_is_urgent = false,
|
||||
.bell_action = BELL_ACTION_NONE,
|
||||
.startup_mode = STARTUP_WINDOWED,
|
||||
.fonts = {tll_init(), tll_init(), tll_init(), tll_init()},
|
||||
.dpi_aware = true, /* Use DPI by default, not scale factor */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue