[file_previewer.sh]: Add previews for RAR files

This commit is contained in:
2024-09-23 02:04:17 +01:00
parent b0cb21449f
commit 9fe31ab8d0

View File

@ -20,6 +20,9 @@ case "$(mimetype --brief -- "$file")" in
pdftoppm -jpeg "$file" -singlefile | chafa --size "$(($width-4))"x"$height" pdftoppm -jpeg "$file" -singlefile | chafa --size "$(($width-4))"x"$height"
pdfinfo "$file" | bat --theme='base16' --terminal-width "$(($width-4))" --force-colorization;; pdfinfo "$file" | bat --theme='base16' --terminal-width "$(($width-4))" --force-colorization;;
application/vnd.rar)
unrar l "$file" |bat --language=java --theme='base16' --terminal-width "$(($width-4))" --force-colorization;;
application/vnd.sqlite3) application/vnd.sqlite3)
sqlite3 "$file" "SELECT * FROM sqlite_master WHERE type = 'table';" | bat --theme='base16' --terminal-width "$(($width-4))" --force-colorization;; sqlite3 "$file" "SELECT * FROM sqlite_master WHERE type = 'table';" | bat --theme='base16' --terminal-width "$(($width-4))" --force-colorization;;