diff options
author | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2024-06-07 02:04:57 +0300 |
---|---|---|
committer | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2024-06-07 02:04:57 +0300 |
commit | 9273d021a5c5f4ef767a349996aa6bf318054d8f (patch) | |
tree | 9e2aa0b8f519337c7629934c1504fe2520ff537e /dotfiles | |
parent | 182cb9918352e93047d0fcc8c38048c61b3d4dfd (diff) | |
download | swayrice-9273d021a5c5f4ef767a349996aa6bf318054d8f.tar.gz swayrice-9273d021a5c5f4ef767a349996aa6bf318054d8f.zip |
scope: force sixel for previews on Alacritty
Diffstat (limited to 'dotfiles')
-rwxr-xr-x | dotfiles/.local/bin/scope | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/dotfiles/.local/bin/scope b/dotfiles/.local/bin/scope index 46b01a9..f094601 100755 --- a/dotfiles/.local/bin/scope +++ b/dotfiles/.local/bin/scope @@ -33,7 +33,12 @@ HIGHLIGHT_STYLE='pablo' handle_img() { if [ -n "$w" -a -n "$h" ]; then - chafa --polite on --animate off -s "${w}x${h}" $FILE_PATH | sed 's/#/\n#/g' + # A little hack to force sixel on ayosec's Alacritty fork + if [ "$TERM" = alacritty ]; then + chafa --polite on --animate off -f sixel -s "${w}x${h}" $FILE_PATH | sed 's/#/\n#/g' + else + chafa --polite on --animate off -s "${w}x${h}" $FILE_PATH | sed 's/#/\n#/g' + fi else exiftool "${FILE_PATH}" fi |