summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2023-06-12 00:14:51 -0500
committerzachir <zachir@librem.one>2023-06-12 00:14:51 -0500
commit817eaab497b46e4c6341a9289f03f0e32315ae01 (patch)
tree83a5990dc0ce037364946487f82ef92365aa2116
parentb5dde9254a8d38a46c62902cdf593c6e560dbfc2 (diff)
parentc43084fe9903160c49a3140ba40bee3e53f3c168 (diff)
merge with master
-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() {