mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
config: add alpha_mode option
This commit is contained in:
parent
9a6227acb3
commit
5f83278afd
5 changed files with 38 additions and 0 deletions
10
config.c
10
config.c
|
|
@ -1095,6 +1095,15 @@ parse_section_main(struct context *ctx)
|
|||
return true;
|
||||
}
|
||||
|
||||
else if (strcmp(key, "alpha-mode") == 0) {
|
||||
_Static_assert(sizeof(conf->alpha_mode) == sizeof(int),
|
||||
"enum is not 32-bit");
|
||||
return value_to_enum(
|
||||
ctx,
|
||||
(const char *[]){"default", "matching", "all", NULL},
|
||||
(int *)&conf->alpha_mode);
|
||||
}
|
||||
|
||||
else {
|
||||
LOG_CONTEXTUAL_ERR("not a valid option: %s", key);
|
||||
return false;
|
||||
|
|
@ -3338,6 +3347,7 @@ config_load(struct config *conf, const char *conf_path,
|
|||
},
|
||||
.multiplier = 3.,
|
||||
},
|
||||
.alpha_mode = ALPHA_MODE_DEFAULT,
|
||||
.colors = {
|
||||
.fg = default_foreground,
|
||||
.bg = default_background,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue