diff --git a/doc/tint2.md b/doc/tint2.md index d17af95..3024b14 100644 --- a/doc/tint2.md +++ b/doc/tint2.md @@ -119,6 +119,10 @@ The tint2 config file starts with the options defining background elements with * `color` is specified in hex RGB, e.g. #ff0000 is red * `opacity` varies from (0 to 100), where 0 is fully transparent, 100 is fully opaque + * `border_content_tint_weight = integer` : Mixes the border color with the content color (for tasks, this is the average color of the window icon). Values must be between 0 (no mixing) and 100 (fully replaces the color). *(since 16.0)* + + * `background_content_tint_weight = integer` : Mixes the background color with the content color (for tasks, this is the average color of the window icon). Values must be between 0 (no mixing) and 100 (fully replaces the color). *(since 16.0)* + You can define as many backgrounds as you want. For example, the following config defines two backgrounds: ``` diff --git a/src/config.c b/src/config.c index 58969e9..d5ee571 100644 --- a/src/config.c +++ b/src/config.c @@ -353,7 +353,7 @@ void add_entry(char *key, char *value) } else if (strcmp(key, "border_content_tint_weight") == 0) { Background *bg = &g_array_index(backgrounds, Background, backgrounds->len - 1); bg->border_content_tint_weight = MAX(0.0, MIN(1.0, atoi(value) / 100.)); - } else if (strcmp(key, "fill_content_tint_weight") == 0) { + } else if (strcmp(key, "background_content_tint_weight") == 0) { Background *bg = &g_array_index(backgrounds, Background, backgrounds->len - 1); bg->fill_content_tint_weight = MAX(0.0, MIN(1.0, atoi(value) / 100.)); } diff --git a/src/tint2conf/properties_rw.c b/src/tint2conf/properties_rw.c index c4c5880..7454e94 100644 --- a/src/tint2conf/properties_rw.c +++ b/src/tint2conf/properties_rw.c @@ -252,7 +252,7 @@ void config_write_backgrounds(FILE *fp) fprintf(fp, "border_sides = %s\n", sides); fprintf(fp, "border_content_tint_weight = %d\n", (int)(border_weight)); - fprintf(fp, "fill_content_tint_weight = %d\n", (int)(fill_weight)); + fprintf(fp, "background_content_tint_weight = %d\n", (int)(fill_weight)); config_write_color(fp, "background_color", *fillColor, fillOpacity); config_write_color(fp, "border_color", *borderColor, borderOpacity); @@ -1242,7 +1242,7 @@ void add_entry(char *key, char *value) } else if (strcmp(key, "border_content_tint_weight") == 0) { gtk_spin_button_set_value(GTK_SPIN_BUTTON(background_border_content_tint_weight), atoi(value)); background_force_update(); - } else if (strcmp(key, "fill_content_tint_weight") == 0) { + } else if (strcmp(key, "background_content_tint_weight") == 0) { gtk_spin_button_set_value(GTK_SPIN_BUTTON(background_fill_content_tint_weight), atoi(value)); background_force_update(); }