aboutsummaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-04-17 19:57:08 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-04-18 18:09:10 +0000
commit1df48fcb33f2e6009e7e4055662e441f2f0c3314 (patch)
treeed222d07f1e26a7f1bf39b219da5d72bcace17e6 /config.c
parentrender: brighten: use corresponding bright palette color for base 8 colors (diff)
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.
Diffstat (limited to 'config.c')
-rw-r--r--config.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/config.c b/config.c
index 653c3f8a..3aed1e7d 100644
--- a/config.c
+++ b/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()},