add custom previewer file

This commit is contained in:
Ray Elliott 2021-10-12 18:34:51 +01:00
parent 3bdc9a62c1
commit d96eab75d3
2 changed files with 11 additions and 0 deletions

2
lfrc
View File

@ -115,3 +115,5 @@ cmd thumbs ${{
feh -t -y128 -E128 & feh -t -y128 -E128 &
fi fi
}} }}
set previewer /home/ray/.config/lf/previewer.sh

9
previewer.sh Executable file
View File

@ -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