Avoids flicker during open (#991)
* Avoids flicker during open
* Update lfrc.example
remove setsid after we execute is with open &{{ anyway
This commit is contained in:
1 parent
c1bcf71ece
commit
887748cefd
1 file changed
+5
-3
+5
-3
@@ -35,10 +35,12 @@ map O $mimeopen --ask $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 ${{
|
# lf -remote is used here to allow the subshell to work in the background to
|
||||||
|
# avoid redrawing lf when external applications are opened.
|
||||||
|
cmd open &{{
|
||||||
case $(file --mime-type -Lb $f) in
|
case $(file --mime-type -Lb $f) in
|
||||||
text/*) $EDITOR $fx;;
|
text/*) lf -remote "send $id \$$EDITOR \$fx";;
|
||||||
*) for f in $fx; do setsid $OPENER $f > /dev/null 2> /dev/null & done;;
|
*) for f in $fx; do $OPENER $f > /dev/null 2> /dev/null & done;;
|
||||||
esac
|
esac
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user