This commit is contained in:
committer
2024-06-01 07:32:30 -05:00
parent abe44e9b57
commit be87788992

View File

@@ -56,10 +56,17 @@ map X !$f
# This command is called when current file is not a directory. You may want to # 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 # use either file extensions and/or mime types here. Below uses an editor for
# text files and a file opener for the rest. # 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 case $(file --mime-type -Lb $f) in
text/*) lf -remote "send $id \$$EDITOR \$fx";; text/*) helix $fx;;
*) for f in $fx; do $OPENER $f > /dev/null 2> /dev/null & done;; *) for f in $fx; do xdg-open $f > /dev/null 2> /dev/null & done;;
esac esac
}} }}