From 8da8b6ccbf87419442bb2dc0f0106c7b3c4e2ef8 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Wed, 16 Mar 2022 13:13:55 +0100 Subject: lf update again --- .config/lf/lfrc | 6 ++++-- .config/lf/scope | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) (limited to '.config/lf') 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 bulkrename map down map up -map V push :!nvim +map E push :$$EDITOR +map V push :$$EDITOR 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 -- cgit v1.2.3