diff --git a/home/default/.config/lf/scope b/home/default/.config/lf/scope index 140641b..8ac32b2 100755 --- a/home/default/.config/lf/scope +++ b/home/default/.config/lf/scope @@ -35,6 +35,12 @@ case "$(printf "%s\n" "$1" | awk '{print tolower($0)}')" in chafa "$CACHE.jpg" -f sixel -s "$(($2-2))x$(($3-2))" | sed 's/#/\n#/g' exit 0 ;; + *.cbz|*.cbr|*.cbt) + CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)" + [ ! -f "$CACHE.jpg" ] && comicthumb "$1" "$CACHE.jpg" 768 + chafa "$CACHE.jpg" -f sixel -s "$(($2-2))x$(($3-2))" | sed 's/#/\n#/g' + exit 0 + ;; esac case "$(file --dereference --brief --mime-type -- "$1")" in