aboutsummaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2025-04-20 05:58:02 +0000
committerDaniel Eklöf <daniel@ekloef.se>2025-04-26 12:20:58 +0000
commit6bc91b5e288ef16613a4e6f9d0a9f6077cedc267 (patch)
tree67ba84ba5b165a2a8c24253b83ae7935d7a3bd9c /config.c
parentconfig: add new section 'colors2' (diff)
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
Diffstat (limited to 'config.c')
-rw-r--r--config.c4
1 files changed, 4 insertions, 0 deletions
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(