diff options
author | zachir <zachir@librem.one> | 2023-06-12 00:14:51 -0500 |
---|---|---|
committer | zachir <zachir@librem.one> | 2023-06-12 00:14:51 -0500 |
commit | 817eaab497b46e4c6341a9289f03f0e32315ae01 (patch) | |
tree | 83a5990dc0ce037364946487f82ef92365aa2116 /lf | |
parent | b5dde9254a8d38a46c62902cdf593c6e560dbfc2 (diff) | |
parent | c43084fe9903160c49a3140ba40bee3e53f3c168 (diff) |
merge with master
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() { |