summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
authorAdam <56338480+adastx@users.noreply.github.com>2022-04-19 23:47:34 +0200
committerAdam <56338480+adastx@users.noreply.github.com>2022-04-19 23:47:34 +0200
commitfe38baa4f95404acf84a6e31db4346cec146a83c (patch)
tree2fe2997763016c40533198549f3b20f8f7cc2028 /.config
parente95aa362ede74f07db457437cd63c5f12f6954d0 (diff)
lf: open text in vim, xdg-open everything else
Diffstat (limited to '.config')
-rw-r--r--.config/lf/lfrc14
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
+}}