diff --git a/chafa/chafa-term-db.c b/chafa/chafa-term-db.c index 62837f5..065cc40 100644 --- a/chafa/chafa-term-db.c +++ b/chafa/chafa-term-db.c @@ -267,6 +267,17 @@ static const SeqStr *color_16_list [] = NULL }; +static const SeqStr *color_8_list [] = +{ + color_8_seqs, + NULL +}; + +static const SeqStr *color_mono_list [] = +{ + NULL +}; + static const SeqStr color_fbterm_seqs [] = { { CHAFA_TERM_SEQ_SET_COLOR_FG_16, "\033[1;%1}" }, @@ -544,6 +555,18 @@ detect_capabilities (ChafaTermInfo *ti, gchar **envp) if (!strcmp (term, "rxvt-unicode")) color_seq_list = color_16_list; + /* Eat uses the "eat-" prefix for TERM. */ + if (!strcmp (term, "eat-truecolor")) + color_seq_list = color_direct_list; + if (!strcmp (term, "eat-256color")) + color_seq_list = color_256_list; + if (!strcmp (term, "eat-16color")) + color_seq_list = color_16_list; + if (!strcmp (term, "eat-color")) + color_seq_list = color_8_list; + if (!strcmp (term, "eat-mono")) + color_seq_list = color_mono_list; + /* 'screen' does not like truecolor at all, but 256 colors works fine. * Sometimes we'll see the outer terminal appended to the TERM string, * like so: screen.xterm-256color */