Updated config

This commit is contained in:
Eduard Urbach 2025-05-18 15:59:57 +02:00
parent 285360a1dc
commit 557f33c14a
No known key found for this signature in database
GPG key ID: C874F672B1AF20C0
35 changed files with 159 additions and 694 deletions

View file

@ -1,8 +1,19 @@
function f
set tmp (mktemp -t "yazi-cwd.XXXXXX")
yazi $argv --cwd-file="$tmp"
if set cwd (command cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
builtin cd -- "$cwd"
function f --wraps nnn --description 'support nnn quit and change directory'
if test -n "$NNNLVL" -a "$NNNLVL" -ge 1
echo "nnn is already running"
return
end
if test -n "$XDG_CONFIG_HOME"
set -x NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd"
else
set -x NNN_TMPFILE "$HOME/.config/nnn/.lastd"
end
command nnn $argv
if test -e $NNN_TMPFILE
source $NNN_TMPFILE
rm -- $NNN_TMPFILE
end
rm -f -- "$tmp"
end