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 --- terminal.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'terminal.h') diff --git a/terminal.h b/terminal.h index 518e36ef..45e13925 100644 --- a/terminal.h +++ b/terminal.h @@ -405,6 +405,7 @@ struct colors { uint32_t selection_fg; uint32_t selection_bg; bool use_custom_selection; + enum { COLOR_THEME1, COLOR_THEME2 } active_theme; }; struct terminal { @@ -982,6 +983,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_apply(struct terminal *term, const struct color_theme *theme); + static inline void term_reset_grapheme_state(struct terminal *term) { #if defined(FOOT_GRAPHEME_CLUSTERING) -- cgit v1.3