From be87788992a771e9ec0f000df7571a100996d9e2 Mon Sep 17 00:00:00 2001 From: committer Date: Sat, 1 Jun 2024 07:32:30 -0500 Subject: [PATCH] u --- dots/lf/lfrc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/dots/lf/lfrc b/dots/lf/lfrc index eefbaf4..fc97872 100644 --- a/dots/lf/lfrc +++ b/dots/lf/lfrc @@ -56,10 +56,17 @@ map X !$f # This command is called when current file is not a directory. You may want to # use either file extensions and/or mime types here. Below uses an editor for # text files and a file opener for the rest. -cmd open &{{ +#cmd open &{{ +# case $(file --mime-type -Lb $f) in +# text/*) lf -remote "send $id \$$EDITOR \$fx";; +# *) for f in $fx; do $OPENER $f > /dev/null 2> /dev/null & done;; +# esac +#}} + +cmd open ${{ case $(file --mime-type -Lb $f) in - text/*) lf -remote "send $id \$$EDITOR \$fx";; - *) for f in $fx; do $OPENER $f > /dev/null 2> /dev/null & done;; + text/*) helix $fx;; + *) for f in $fx; do xdg-open $f > /dev/null 2> /dev/null & done;; esac }}