diff --git a/lf/.config/lf/lfrc b/lf/.config/lf/lfrc index ec7fb66..a720229 100644 --- a/lf/.config/lf/lfrc +++ b/lf/.config/lf/lfrc @@ -1,2 +1,5 @@ set hidden true set icons true + +set previewer ~/.config/lf/pv.sh +map i $~/.config/lf/pv.sh $f | less -R diff --git a/lf/.config/lf/pv.sh b/lf/.config/lf/pv.sh new file mode 100755 index 0000000..aacb45a --- /dev/null +++ b/lf/.config/lf/pv.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +case "$1" in + *.tar*) tar tf "$1";; + *.zip) unzip -l "$1";; + *.rar) unrar l "$1";; + *.7z) 7z l "$1";; + *.pdf) pdftotext "$1" -;; + *) highlight -O ansi "$1";; + #*) bat -P "$1";; +esac