From ae9f2cbc600c7642cf45ab289fc64c4ce2d8338a Mon Sep 17 00:00:00 2001 From: Jeef Date: Wed, 29 May 2024 16:59:03 -0600 Subject: [PATCH] Add support for Alacritty preview in ANSI Format --- bin/fzf-preview.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/fzf-preview.sh b/bin/fzf-preview.sh index 13beef8f7be..e9c0d0ebb84 100755 --- a/bin/fzf-preview.sh +++ b/bin/fzf-preview.sh @@ -57,7 +57,12 @@ if [[ $KITTY_WINDOW_ID ]]; then # 2. Use chafa with Sixel output elif command -v chafa > /dev/null; then - chafa -f sixel -s "$dim" "$file" + # Alacritty doesn't support sixels + if [[ $ALACRITTY_WINDOW_ID ]]; then + chafa --colors 256 -s "$dim" "$file" + else + chafa -f sixel -s "$dim" "$file" + fi # Add a new line character so that fzf can display multiple images in the preview window echo