From 9fe31ab8d0b988b328532546965be058ced9fd6c Mon Sep 17 00:00:00 2001 From: Andrew Date: Mon, 23 Sep 2024 02:04:17 +0100 Subject: [PATCH] [file_previewer.sh]: Add previews for RAR files --- file_previewer.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/file_previewer.sh b/file_previewer.sh index 0aaa8d1..a8dd0f7 100755 --- a/file_previewer.sh +++ b/file_previewer.sh @@ -20,6 +20,9 @@ case "$(mimetype --brief -- "$file")" in pdftoppm -jpeg "$file" -singlefile | chafa --size "$(($width-4))"x"$height" 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) sqlite3 "$file" "SELECT * FROM sqlite_master WHERE type = 'table';" | bat --theme='base16' --terminal-width "$(($width-4))" --force-colorization;;