aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.c8
-rw-r--r--config.h1
-rw-r--r--doc/foot.ini.5.scd9
-rw-r--r--foot.ini3
4 files changed, 21 insertions, 0 deletions
diff --git a/config.c b/config.c
index ce88d6ce..1b73fbcf 100644
--- a/config.c
+++ b/config.c
@@ -1522,6 +1522,12 @@ parse_section_colors(struct context *ctx)
}
static bool
+parse_section_colors2(struct context *ctx)
+{
+ return parse_color_theme(ctx, &ctx->conf->colors2);
+}
+
+static bool
parse_section_cursor(struct context *ctx)
{
struct config *conf = ctx->conf;
@@ -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"},
diff --git a/config.h b/config.h
index 89740db3..8954b270 100644
--- a/config.h
+++ b/config.h
@@ -304,6 +304,7 @@ struct config {
tll(struct custom_regex) custom_regexes;
struct color_theme colors;
+ struct color_theme colors2;
struct {
enum cursor_style style;
diff --git a/doc/foot.ini.5.scd b/doc/foot.ini.5.scd
index 13f768c2..45084ab6 100644
--- a/doc/foot.ini.5.scd
+++ b/doc/foot.ini.5.scd
@@ -1084,6 +1084,15 @@ can configure the background transparency with the _alpha_ option.
Flash translucency. A value in the range 0.0-1.0, where 0.0 means
completely transparent, and 1.0 is opaque. Default: _0.5_.
+# SECTION: colors2
+
+This section defines an alternative color theme. It has the exact same
+keys as the *colors* section. The default values are the same.
+
+Note that values are not inherited. That is, if you set a value in
+*colors*, but not in *colors2*, the value from *colors* is not
+inherited by *colors2*.
+
# SECTION: csd
This section controls the look of the _CSDs_ (Client Side
diff --git a/foot.ini b/foot.ini
index dc2ad6cd..8482af6b 100644
--- a/foot.ini
+++ b/foot.ini
@@ -164,6 +164,9 @@
# search-box-match=<regular0> <regular3> # black-on-yellow
# urls=<regular3>
+[colors2]
+# Alternative color theme, see man page foot.ini(5)
+
[csd]
# preferred=server
# size=26