summaryrefslogtreecommitdiffstats
path: root/.config/lf/lfrc
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2025-03-01 22:00:30 +0100
committerJoe <rbo@gmx.us>2025-03-01 22:00:30 +0100
commit6184e00392c28f9903b519d4a63680b06436e894 (patch)
treedd6268aec81177d3db97b337fb2025c5b53669c6 /.config/lf/lfrc
parentupup (diff)
downloaddotfiles-bsd-6184e00392c28f9903b519d4a63680b06436e894.tar.gz
dotfiles-bsd-6184e00392c28f9903b519d4a63680b06436e894.tar.bz2
dotfiles-bsd-6184e00392c28f9903b519d4a63680b06436e894.tar.xz
dotfiles-bsd-6184e00392c28f9903b519d4a63680b06436e894.tar.zst
dotfiles-bsd-6184e00392c28f9903b519d4a63680b06436e894.zip
waylanded
Diffstat (limited to '.config/lf/lfrc')
-rw-r--r--.config/lf/lfrc10
1 files changed, 8 insertions, 2 deletions
diff --git a/.config/lf/lfrc b/.config/lf/lfrc
index 563c155..19653c1 100644
--- a/.config/lf/lfrc
+++ b/.config/lf/lfrc
@@ -14,6 +14,11 @@ set previewer '~/.config/lf/scope'
# cmds/functions
cmd open ${{
+ if [ -n "$WAYLAND_DISPLAY" ]; then
+ IMAGER=imv
+ else
+ IMAGER="nsxiv -aibo"
+ fi
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 | $PAGER ;;
@@ -23,8 +28,9 @@ cmd open ${{
text/*|application/json|inode/x-empty) bat --style=plain --tabs 4 --paging=always -f $fx ;;
image/x-xcf) gimp $f >/dev/null 2>&1 ;;
image/svg+xml) display -- $f ;;
- image/*) rotdir $f | grep -i "\.\(png\|jpg\|jpeg\|gif\|webp\|tif\|ico\)\(_large\)*$" |
- nsxiv -aibof 2>/dev/null | while read -r file; do
+ image/*)
+ rotdir $f | grep -i "\.\(png\|jpg\|jpeg\|gif\|webp\|tif\|ico\)\(_large\)*$" |
+ $IMAGER 2>/dev/null | while read -r file; do
[ -z "$file" ] && continue
lf -remote "send select \"$file\""
lf -remote "send toggle"