aboutsummaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2026-09-02 10:55:12 +0000
committerDaniel Eklöf <daniel@ekloef.se>2026-09-02 10:55:12 +0000
commit7aad838572248df2902c172b7448bc033ce01964 (patch)
tree48785472534896dfe129d86cd4eaa6280ddab899 /config.c
parentconfig: remove debug printf from unit test (diff)
config: remove support for the deprecated colors and colors2 sections
They were deprecated in 1.26.0, and replaced by colors-dark and colors-light.
Diffstat (limited to 'config.c')
-rw-r--r--config.c72
1 files changed, 2 insertions, 70 deletions
diff --git a/config.c b/config.c
index da4d764e..e216f0d2 100644
--- a/config.c
+++ b/config.c
@@ -1178,40 +1178,8 @@ parse_section_main(struct context *ctx)
sizeof(conf->initial_color_theme) == sizeof(int),
"enum is not 32-bit");
- if (!value_to_enum(ctx, (const char*[]){
- "dark", "light", "1", "2", NULL},
- (int *)&conf->initial_color_theme))
- return false;
-
- if (streq(ctx->value, "1")) {
- LOG_WARN("%s:%d: [main].initial-color-theme=1 deprecated, "
- "use [main].initial-color-theme=dark instead",
- ctx->path, ctx->lineno);
-
- user_notification_add(
- &ctx->conf->notifications,
- USER_NOTIFICATION_DEPRECATED,
- xstrdup("[main].initial-color-theme=1: "
- "use [main].initial-color-theme=dark instead"));
-
- conf->initial_color_theme = COLOR_THEME_DARK;
- }
-
- else if (streq(ctx->value, "2")) {
- LOG_WARN("%s:%d: [main].initial-color-theme=2 deprecated, "
- "use [main].initial-color-theme=light instead",
- ctx->path, ctx->lineno);
-
- user_notification_add(
- &ctx->conf->notifications,
- USER_NOTIFICATION_DEPRECATED,
- xstrdup("[main].initial-color-theme=2: "
- "use [main].initial-color-theme=light instead"));
-
- conf->initial_color_theme = COLOR_THEME_LIGHT;
- }
-
- return true;
+ return value_to_enum(ctx, (const char*[]){
+ "dark", "light", NULL}, (int *)&conf->initial_color_theme);
}
else if (streq(key, "uppercase-regex-insert"))
@@ -1671,34 +1639,6 @@ parse_section_colors_light(struct context *ctx)
}
static bool
-parse_section_colors(struct context *ctx)
-{
- LOG_WARN("%s:%d: [colors]: deprecated; use [colors-dark] instead",
- ctx->path, ctx->lineno);
-
- user_notification_add(
- &ctx->conf->notifications,
- USER_NOTIFICATION_DEPRECATED,
- xstrdup("[colors]: use [colors-dark] instead"));
-
- return parse_color_theme(ctx, &ctx->conf->colors_dark);
-}
-
-static bool
-parse_section_colors2(struct context *ctx)
-{
- LOG_WARN("%s:%d: [colors2]: deprecated; use [colors-light] instead",
- ctx->path, ctx->lineno);
-
- user_notification_add(
- &ctx->conf->notifications,
- USER_NOTIFICATION_DEPRECATED,
- xstrdup("[colors2]: use [colors-light] instead"));
-
- return parse_color_theme(ctx, &ctx->conf->colors_light);
-}
-
-static bool
parse_section_cursor(struct context *ctx)
{
struct config *conf = ctx->conf;
@@ -3193,10 +3133,6 @@ enum section {
SECTION_TWEAK,
SECTION_TOUCH,
- /* Deprecated */
- SECTION_COLORS,
- SECTION_COLORS2,
-
SECTION_COUNT,
};
@@ -3228,10 +3164,6 @@ static const struct {
[SECTION_ENVIRONMENT] = {&parse_section_environment, "environment"},
[SECTION_TWEAK] = {&parse_section_tweak, "tweak"},
[SECTION_TOUCH] = {&parse_section_touch, "touch"},
-
- /* Deprecated */
- [SECTION_COLORS] = {&parse_section_colors, "colors"},
- [SECTION_COLORS2] = {&parse_section_colors2, "colors2"},
};
static_assert(ALEN(section_info) == SECTION_COUNT, "section info array size mismatch");