aboutsummaryrefslogtreecommitdiff
path: root/.config/lf/previewer.sh
diff options
context:
space:
mode:
authorJustine Smithies <justine@smithies.me.uk>2024-01-25 19:37:46 +0000
committerJustine Smithies <justine@smithies.me.uk>2024-01-25 19:37:46 +0000
commit05cf5113be816ce12e98f580a2858090cfb028bd (patch)
treeb5535b8c20fd35d5fd840b21e2986d9c6b748690 /.config/lf/previewer.sh
parentcc6c1bf7440a1e29110c81124cf2394ecebd1fc3 (diff)
Fix for image previews in LF using Chafa as it breaks in Chafa 1.14
Diffstat (limited to '.config/lf/previewer.sh')
-rwxr-xr-x.config/lf/previewer.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/.config/lf/previewer.sh b/.config/lf/previewer.sh
index 7995985..764758b 100755
--- a/.config/lf/previewer.sh
+++ b/.config/lf/previewer.sh
@@ -20,19 +20,19 @@ case "$(printf "%s\n" "$(readlink -f "$1")" | awk '{print tolower($0)}')" in
exit 1
;;
*.jpg|*.jpeg|*.png|*.bmp|*.xpm|*.gif)
- chafa -f sixel -s "$2x$3" --animate false "$1"
+ chafa -f sixel -s "$2x$3" --animate false "$1" --polite on
exit 1
;;
*.pdf)
CACHE=$(mktemp)
pdftoppm -png -f 1 -singlefile "$1" "$CACHE"
- chafa -f sixel -s "$2x$3" --animate false "$CACHE.png"
+ chafa -f sixel -s "$2x$3" --animate false "$CACHE.png" --polite on
rm "$CACHE"
;;
*.avi|*.mp4|*.wmv|*.dat|*.3gp|*.ogv|*.mkv|*.mpg|*.mpeg|*.vob|*.fl[icv]|*.m2v|*.mov|*.webm|*.ts|*.mts|*.m4v|*.r[am]|*.qt|*.divx)
CACHE=$(mktemp)
ffmpegthumbnailer -i "$1" -o "$CACHE" -s 0
- chafa -f sixel -s "$2x$3" --animate false "$CACHE"
+ chafa -f sixel -s "$2x$3" --animate false "$CACHE" --polite on
rm "$CACHE"
;;
*)