summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlf/preview9
1 files changed, 2 insertions, 7 deletions
diff --git a/lf/preview b/lf/preview
index 0e2f7f0..862c0d7 100755
--- a/lf/preview
+++ b/lf/preview
@@ -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() {