Skip to content

Commit

Permalink
chafa: Detect iTerm image mode
Browse files Browse the repository at this point in the history
Fixes #196 (GitHub).
  • Loading branch information
hpjansson committed Mar 29, 2024
1 parent 5bd0087 commit 044d990
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/chafa/chafa.c
Expand Up @@ -1772,6 +1772,9 @@ detect_terminal (ChafaTermInfo **term_info_out, ChafaCanvasMode *mode_out,
else if (chafa_term_info_have_seq (term_info, CHAFA_TERM_SEQ_BEGIN_SIXELS)
&& chafa_term_info_have_seq (term_info, CHAFA_TERM_SEQ_END_SIXELS))
pixel_mode = CHAFA_PIXEL_MODE_SIXELS;
else if (chafa_term_info_have_seq (term_info, CHAFA_TERM_SEQ_BEGIN_ITERM2_IMAGE)
&& chafa_term_info_have_seq (term_info, CHAFA_TERM_SEQ_END_ITERM2_IMAGE))
pixel_mode = CHAFA_PIXEL_MODE_ITERM2;
else
pixel_mode = CHAFA_PIXEL_MODE_SYMBOLS;

Expand Down

0 comments on commit 044d990

Please sign in to comment.