From 1423babc35e2896b602d124b634816ebfaeae243 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sun, 20 Apr 2025 07:36:58 +0200 Subject: config: add new section 'colors2' This section defines an alternative color theme. The keys are the same as in the 'colors' section, as are the default values. Values are *not* inherited from 'colors'. That is, if you set a value in 'colors', but not in 'colors2', it is *not* inherited by 'colors2'. --- config.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'config.c') diff --git a/config.c b/config.c index ce88d6ce..1b73fbcf 100644 --- a/config.c +++ b/config.c @@ -1521,6 +1521,12 @@ parse_section_colors(struct context *ctx) return parse_color_theme(ctx, &ctx->conf->colors); } +static bool +parse_section_colors2(struct context *ctx) +{ + return parse_color_theme(ctx, &ctx->conf->colors2); +} + static bool parse_section_cursor(struct context *ctx) { @@ -2900,6 +2906,7 @@ enum section { SECTION_URL, SECTION_REGEX, SECTION_COLORS, + SECTION_COLORS2, SECTION_CURSOR, SECTION_MOUSE, SECTION_CSD, @@ -2930,6 +2937,7 @@ static const struct { [SECTION_URL] = {&parse_section_url, "url"}, [SECTION_REGEX] = {&parse_section_regex, "regex", true}, [SECTION_COLORS] = {&parse_section_colors, "colors"}, + [SECTION_COLORS2] = {&parse_section_colors2, "colors2"}, [SECTION_CURSOR] = {&parse_section_cursor, "cursor"}, [SECTION_MOUSE] = {&parse_section_mouse, "mouse"}, [SECTION_CSD] = {&parse_section_csd, "csd"}, -- cgit v1.3