diff options
author | zachir <zachir@librem.one> | 2023-06-09 12:42:32 -0500 |
---|---|---|
committer | zachir <zachir@librem.one> | 2023-06-12 00:12:20 -0500 |
commit | 8ebf039d3a708f439d7347a5b1090a30dc1906f0 (patch) | |
tree | 5ca508eb167e71505bf4a6447442d6bfca6515d8 | |
parent | 4d3413b8241d7c3151cd028506c49534ca287d30 (diff) |
use sixel image preview lf
-rwxr-xr-x | lf/preview | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -1,12 +1,8 @@ #!/bin/sh 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() { |