[file_previewer.sh]: Use exiftool instead of bat as fallback previewer

Use bat + exiftool as default text previewer
This commit is contained in:
2024-09-02 12:24:02 +01:00
parent 8fed0779b6
commit 622e5f38cd

View File

@ -40,6 +40,9 @@ case "$(mimetype --brief -- "$file")" in
text/csv)
column --separator "," --table "$file" | bat --theme='base16' --terminal-width "$(($width-4))" --force-colorization;;
text/*)
bat --theme='base16' --terminal-width "$(($width-4))" --force-colorization "$file";;
video/*)
ffmpeg -ss 00:00:00 -i "$file" -frames:v 1 -q:v 2 "$preview_image"
chafa "$preview_image" --size "$(($width-4))"x"$height"
@ -47,5 +50,5 @@ case "$(mimetype --brief -- "$file")" in
exiftool "$file" | bat --theme='base16' --terminal-width "$(($width-4))" --force-colorization;;
*)
bat --theme='base16' --terminal-width "$(($width-4))" --force-colorization "$file"
exiftool "$file" | bat --theme='base16' --terminal-width "$(($width-4))" --force-colorization;;
esac