diff --git a/lfrc b/lfrc index ee2a3d5..f2c1693 100644 --- a/lfrc +++ b/lfrc @@ -115,3 +115,5 @@ cmd thumbs ${{ feh -t -y128 -E128 & fi }} + +set previewer /home/ray/.config/lf/previewer.sh diff --git a/previewer.sh b/previewer.sh new file mode 100755 index 0000000..277286b --- /dev/null +++ b/previewer.sh @@ -0,0 +1,9 @@ +#!/bin/sh +case "$1" in + *.tar*) tar tf "$1";; + *.zip) unzip -l "$1";; + *.rar) unrar l "$1";; + *.7z) 7z l "$1";; + *.pdf) pdftotext "$1" -;; + *) bat --plain --color always --theme base16 "$1";; +esac