diff options
author | Adam <adam.moloney.stuck@gmail.com> | 2022-04-19 23:47:34 +0200 |
---|---|---|
committer | adamstuck <adam.moloney.stuck@gmail.com> | 2022-04-19 23:53:23 +0200 |
commit | 59573cdf3f15ad5dd34ffcf3425ff183b3d4bdb4 (patch) | |
tree | 7ba0f9903974073de8e40a4a7596332facc7768d /.config/lf | |
parent | 9bc69ac1fac41126d5334422ce2360c195e104f6 (diff) |
lf: open text in vim, xdg-open everything else
Diffstat (limited to '.config/lf')
-rw-r--r-- | .config/lf/lfrc | 14 |
1 files changed, 11 insertions, 3 deletions
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 +}} |