From 622e5f38cd9a14f84dd976503e7fa306149fe9fa Mon Sep 17 00:00:00 2001 From: Andrew Date: Mon, 2 Sep 2024 12:24:02 +0100 Subject: [PATCH] [file_previewer.sh]: Use exiftool instead of bat as fallback previewer Use bat + exiftool as default text previewer --- file_previewer.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/file_previewer.sh b/file_previewer.sh index c282020..f19cbeb 100755 --- a/file_previewer.sh +++ b/file_previewer.sh @@ -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