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
This commit is contained in:
Daniel Eklöf 2025-04-20 07:58:02 +02:00
parent 8cf1f7edd3
commit 1c21200267
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
8 changed files with 102 additions and 11 deletions

View file

@ -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)