diff options
Diffstat (limited to '.config/lf')
-rw-r--r-- | .config/lf/lfrc | 6 | ||||
-rwxr-xr-x | .config/lf/scope | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/.config/lf/lfrc b/.config/lf/lfrc index 83ed5e9..012506b 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -17,6 +17,7 @@ set hiddenfiles ".*:*.aux:*.log:*.bbl:*.bcf:*.blg:*.run.xml" cmd open ${{ case $(file --mime-type "$(readlink -f $f)" -b) in application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) localc $fx ;; + application/vnd.openxmlformats-officedocument.wordprocessingml.document) docx2txt $f | less ;; image/vnd.djvu|application/pdf|application/octet-stream|application/postscript) bsdsetsid zathura $fx >/dev/null 2>&1 ;; text/*|application/json|inode/x-empty) bat --style=plain --tabs 4 --paging=always -f $fx ;; image/x-xcf) bsdsetsid gimp $f >/dev/null 2>&1 ;; @@ -30,7 +31,7 @@ cmd open ${{ ;; audio/*) bsdsetsid st -e mpv --no-audio-display --audio-channels=stereo $f ;; video/*) bsdsetsid mpv --fullscreen --really-quiet --audio-channels=stereo $f >/dev/null 2>&1 ;; - *opendocument*) odt2txt $f | bat --style=plain --tabs 4 --paging=always -f ;; + *opendocument*) odt2txt $f | less ;; application/pdf|application/vnd*|application/epub*) bsdsetsid zathura $fx >/dev/null 2>&1 ;; application/pgp-encrypted) $EDITOR $fx ;; *) for f in $fx; do bsdsetsid xdg-open $f >/dev/null 2>&1; done;; @@ -73,4 +74,5 @@ map <f-2> bulkrename map <c-e> down map <c-y> up -map V push :!nvim<space> +map E push :$$EDITOR<space> +map V push :$$EDITOR<space> diff --git a/.config/lf/scope b/.config/lf/scope index 3bc2f9c..267e5bf 100755 --- a/.config/lf/scope +++ b/.config/lf/scope @@ -33,6 +33,7 @@ case "$(file --dereference --brief --mime-type -- "$1")" in video/* ) mediainfo "$1" || exit 1 ;; */pdf) pdftotext "$1" - || exit 1 ;; *opendocument*) odt2txt "$1" || exit 1;; + application/vnd.openxmlformats-officedocument.wordprocessingml.document) docx2txt "$1" ;; application/pgp-encrypted) gpg -d -- "$1" ;; esac exit 1 |