diff options
Diffstat (limited to 'lf')
-rwxr-xr-x | lf/preview | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -3,13 +3,8 @@ CACHE="$HOME/.cache/lf/thumbnail.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' \ -- "$(readlink -f "$1")" | sha256sum | awk '{print $1}'))" image() { - if [ -n "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ]; then - printf '{"action": "add", "identifier": "PREVIEW", "x": "%s", "y":"%s", "width": "%s", "height": "%s", "scaler": "contain", "path": "%s"}\n' \ - "$4" "$5" "$(($2-1))" "$(($3-1))" "$1" > "$FIFO_UEBERZUG" - exit 1 - else - chafa "$1" -s "$4x" - fi + geometry="$(($2-2))x$3" + chafa "$1" -f sixel -s "$geometry" --animate false | fold -w 65535 } batorcat() { |