summaryrefslogtreecommitdiffstats
path: root/.config/lf
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2022-03-16 13:13:55 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2022-03-16 13:13:55 +0100
commit8da8b6ccbf87419442bb2dc0f0106c7b3c4e2ef8 (patch)
treebc65150b011fea83cfd1307684368025a316eb96 /.config/lf
parentlf update (diff)
downloaddotfiles-bsd-8da8b6ccbf87419442bb2dc0f0106c7b3c4e2ef8.tar.gz
dotfiles-bsd-8da8b6ccbf87419442bb2dc0f0106c7b3c4e2ef8.tar.bz2
dotfiles-bsd-8da8b6ccbf87419442bb2dc0f0106c7b3c4e2ef8.tar.xz
dotfiles-bsd-8da8b6ccbf87419442bb2dc0f0106c7b3c4e2ef8.tar.zst
dotfiles-bsd-8da8b6ccbf87419442bb2dc0f0106c7b3c4e2ef8.zip
lf update again
Diffstat (limited to '')
-rw-r--r--.config/lf/lfrc6
-rwxr-xr-x.config/lf/scope1
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