diff --git a/res/config.ini b/res/config.ini index be89557..ee39ef8 100644 --- a/res/config.ini +++ b/res/config.ini @@ -43,6 +43,9 @@ # Foreground color id #fg = 9 +# Animation color id (applies to CMatrix only) +#animation_fg = 3 + # Blank main box background # Setting to false will make it transparent #blank_box = true diff --git a/src/config.c b/src/config.c index f7a1c00..2cc8335 100644 --- a/src/config.c +++ b/src/config.c @@ -159,6 +159,7 @@ void config_load(const char *cfg_path) { {"animate", &config.animate, config_handle_bool}, {"animation", &config.animation, config_handle_u8}, + {"animation_fg", &config.animation_fg, config_handle_u8}, {"asterisk", &config.asterisk, config_handle_char}, {"bg", &config.bg, config_handle_u8}, {"bigclock", &config.bigclock, config_handle_bool}, @@ -271,6 +272,7 @@ void config_defaults() { config.animate = false; config.animation = 0; + config.animation_fg = 3; config.asterisk = '*'; config.bg = 0; config.bigclock = false; diff --git a/src/config.h b/src/config.h index 6a54f60..6b9b68c 100644 --- a/src/config.h +++ b/src/config.h @@ -72,6 +72,7 @@ struct config char* console_dev; uint8_t default_input; uint8_t fg; + uint8_t animation_fg; bool hide_borders; bool hide_key_hints; uint8_t input_len; diff --git a/src/draw.c b/src/draw.c index 0679244..d93f7b6 100644 --- a/src/draw.c +++ b/src/draw.c @@ -922,8 +922,8 @@ static void matrix(struct term_buf* buf) for (int i = 1; i <= buf->height; ++i) { uint32_t c; - int fg = TB_GREEN; int bg = TB_DEFAULT; + int fg = config.animation_fg; if (s->grid[i][j].val == -1 || s->grid[i][j].val == ' ') {