aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin
diff options
context:
space:
mode:
authorYaroslav de la Peña Smirnov <yps@yaroslavps.com>2024-06-07 02:04:57 +0300
committerYaroslav de la Peña Smirnov <yps@yaroslavps.com>2024-06-07 02:04:57 +0300
commit9273d021a5c5f4ef767a349996aa6bf318054d8f (patch)
tree9e2aa0b8f519337c7629934c1504fe2520ff537e /dotfiles/.local/bin
parent182cb9918352e93047d0fcc8c38048c61b3d4dfd (diff)
downloadswayrice-swayfx.tar.gz
swayrice-swayfx.zip
scope: force sixel for previews on Alacrittyswayfx
Diffstat (limited to 'dotfiles/.local/bin')
-rwxr-xr-xdotfiles/.local/bin/scope7
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