[file_previewer.sh]: Add handling for TSV files

This commit is contained in:
2025-02-17 22:18:33 +00:00
parent c9411fed6a
commit f8d0f7c180

View File

@ -66,6 +66,9 @@ case "$mimetype" in
text/html) text/html)
lynx -width="$width" -display_charset=utf-8 -dump "$file";; lynx -width="$width" -display_charset=utf-8 -dump "$file";;
text/tab-separated-values)
column --table "$file" | bat --theme='base16' --terminal-width "$(($width-4))" --force-colorization --wrap=never;;
video/*) video/*)
ffmpeg -ss 00:00:00 -i "$file" -frames:v 1 -q:v 2 "$preview_image" ffmpeg -ss 00:00:00 -i "$file" -frames:v 1 -q:v 2 "$preview_image"
chafa "$preview_image" --size "$(($width-4))"x"$height" chafa "$preview_image" --size "$(($width-4))"x"$height"