From 6bc91b5e288ef16613a4e6f9d0a9f6077cedc267 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sun, 20 Apr 2025 07:58:02 +0200 Subject: key-bindings: add bindings to switch between color themes * color-theme-switch-1: select the primary color theme * color-theme-switch-2: select the alternative color theme * color-theme-toggle: toggle between the primary and alternative color themes --- config.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'config.c') diff --git a/config.c b/config.c index 1b73fbcf..921b2d68 100644 --- a/config.c +++ b/config.c @@ -142,6 +142,9 @@ static const char *const binding_action_map[] = { [BIND_ACTION_QUIT] = "quit", [BIND_ACTION_REGEX_LAUNCH] = "regex-launch", [BIND_ACTION_REGEX_COPY] = "regex-copy", + [BIND_ACTION_THEME_SWITCH_1] = "color-theme-switch-1", + [BIND_ACTION_THEME_SWITCH_2] = "color-theme-switch-2", + [BIND_ACTION_THEME_TOGGLE] = "color-theme-toggle", /* Mouse-specific actions */ [BIND_ACTION_SCROLLBACK_UP_MOUSE] = "scrollback-up-mouse", @@ -3479,6 +3482,7 @@ config_load(struct config *conf, const char *conf_path, memcpy(conf->colors.table, default_color_table, sizeof(default_color_table)); memcpy(conf->colors.sixel, default_sixel_colors, sizeof(default_sixel_colors)); + memcpy(&conf->colors2, &conf->colors, sizeof(conf->colors)); parse_modifiers(XKB_MOD_NAME_SHIFT, 5, &conf->mouse.selection_override_modifiers); tokenize_cmdline( -- cgit v1.3