From cf2b390f6e096e7a2ca93d4dece153eb13261a2e Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Fri, 19 Dec 2025 09:29:06 +0100 Subject: config: add [colors-dark] and [colors-light], replacing [colors] and [colors2] The main reason for having two color sections is to be able to switch between dark and light. Thus, it's better if the section names reflect this, rather than the more generic 'colors' and 'colors2' (which was the dark one and which was the light one, now again?) When the second color section was added, we kept the original name, colors, to make sure we didn't break existing configurations, and third-party themes. However, in the long run, it's probably better to be specific in the section naming, to avoid confusion. So, add 'colors-dark', and 'colors-light'. Keep 'colors' and 'colors2' as aliases for now, but mark them as deprecated. They WILL be removed in a future release. Also rename the option values for initial-color-theme, from 1/2, to dark/light. Keep the old ones for now, marked as deprecated. Update all bundled themes to use the new names. In the light-only themes (i.e. themes that define a single, light, theme), use colors-light, and set initial-color-theme=light. Possible improvements: disable color switching if only one color section has been explicitly configured (todo: figure out how to handle the default color theme values...) --- terminal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'terminal.h') diff --git a/terminal.h b/terminal.h index 364d57b3..fe39341d 100644 --- a/terminal.h +++ b/terminal.h @@ -994,8 +994,8 @@ void term_enable_size_notifications(struct terminal *term); void term_disable_size_notifications(struct terminal *term); void term_send_size_notification(struct terminal *term); -void term_theme_switch_to_1(struct terminal *term); -void term_theme_switch_to_2(struct terminal *term); +void term_theme_switch_to_dark(struct terminal *term); +void term_theme_switch_to_light(struct terminal *term); void term_theme_toggle(struct terminal *term); static inline void term_reset_grapheme_state(struct terminal *term) -- cgit v1.3