From 59573cdf3f15ad5dd34ffcf3425ff183b3d4bdb4 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 19 Apr 2022 23:47:34 +0200 Subject: lf: open text in vim, xdg-open everything else --- .config/lf/lfrc | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to '.config/lf/lfrc') diff --git a/.config/lf/lfrc b/.config/lf/lfrc index a99715a..0eaa9ea 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -1,9 +1,17 @@ -set hidden true -set ignorecase true +set shell sh +set shellopts '-eu' +set ifs "\n" +set scrolloff 10 set previewer stpv set cleaner stpvimgclr &stpvimg --listen $id cmd on-quit $stpvimg --end $id -map . set hidden! +cmd open ${{ + test -L $f && f=$(readlink -f $f) + case $(file --mime-type $f -b) in + text/*) $EDITOR $fx;; + *) for f in $fx; do setsid $OPENER $f > /dev/null 2> /dev/null & done;; + esac +}} -- cgit v1.2.3-70-g09d2