1
0
Fork 0

change opening

This commit is contained in:
Luca Bilke 2024-02-01 11:34:40 +01:00
parent 8b5141f8bf
commit 8fceb7bc4e
1 changed files with 24 additions and 1 deletions

View File

@ -11,7 +11,30 @@ set previewer "~/.config/lf/preview/chafa"
set cursorpreviewfmt "\033[7;90m"
set promptfmt "\033[34;1m%u\033[36m@\033[34m%h \033[35m[\033[0;1m%d\033[35m]\033[32m » \033[33m%f\033[0m"
cmd open $set -f; rifle -c $XDG_CONFIG_HOME/lf/rifle.conf -p 0 $fx; clear
cmd open ${{
set -f
rifle -c $XDG_CONFIG_HOME/lf/rifle.conf -p 0 $f
clear
}}
cmd pushedit %{{
echo "Open: "
files=$(read x; echo $x)
lf -remote "send $id unselect"
if sh -c '[ -n "$VIM" ]'; then
lf -remote "send $id vimopen $files"
else
lf -remote "send $id \$echo $files | xargs -or \$EDITOR"
fi
}}
cmd edit &{{
if sh -c "[ -n '\$VIM' ]"; then
lf -remote "send $id vimopen $fx"
else
lf -remote "send $id '\$echo $fx | xargs -or nvim +wa'"
fi
}}
cmd open-with ${{
method=$(rifle -c $XDG_CONFIG_HOME/lf/rifle.conf -l $fx | fzf | cut -d':' -f1)