mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-05 01:40:41 -05:00
config: bold-text-in-bright: add ‘palette-based’ as a special value
When ‘bold-text-in-bright’ is set ‘to palette-based’, colors matching one of the 8 regular palette colors are brightened by using the corresponding bright palette color. Other colors, or all colors if ‘bold-text-in-bright’ is set to ‘yes|true’, are brightened by increasing the luminance.
This commit is contained in:
parent
11e8ff9dc5
commit
1df48fcb33
5 changed files with 38 additions and 12 deletions
16
config.c
16
config.c
|
|
@ -583,8 +583,15 @@ parse_section_main(const char *key, const char *value, struct config *conf,
|
|||
conf->resize_delay_ms = ms;
|
||||
}
|
||||
|
||||
else if (strcmp(key, "bold-text-in-bright") == 0)
|
||||
conf->bold_in_bright = str_to_bool(value);
|
||||
else if (strcmp(key, "bold-text-in-bright") == 0) {
|
||||
if (strcmp(value, "palette-based") == 0) {
|
||||
conf->bold_in_bright.enabled = true;
|
||||
conf->bold_in_bright.palette_based = true;
|
||||
} else {
|
||||
conf->bold_in_bright.enabled = str_to_bool(value);
|
||||
conf->bold_in_bright.palette_based = false;
|
||||
}
|
||||
}
|
||||
|
||||
else if (strcmp(key, "bell") == 0) {
|
||||
if (strcmp(value, "set-urgency") == 0)
|
||||
|
|
@ -2193,7 +2200,10 @@ config_load(struct config *conf, const char *conf_path,
|
|||
.pad_x = 2,
|
||||
.pad_y = 2,
|
||||
.resize_delay_ms = 100,
|
||||
.bold_in_bright = false,
|
||||
.bold_in_bright = {
|
||||
.enabled = false,
|
||||
.palette_based = false,
|
||||
},
|
||||
.bell_action = BELL_ACTION_NONE,
|
||||
.startup_mode = STARTUP_WINDOWED,
|
||||
.fonts = {tll_init(), tll_init(), tll_init(), tll_init()},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue