AutoYADM commit: 2025-05-21 14:57:18

This commit is contained in:
Daniel Fichtinger 2025-05-21 14:57:18 -04:00
parent 2fe337e881
commit b0590df0d9
3 changed files with 8 additions and 4 deletions

View file

@ -35,10 +35,13 @@ function kak-session -w kak --description "kakoune where sessions are derived fr
return 1
end
set kakroot (fdup .kakroot $files[1])
set kakroot (fdup '\.kakroot|\.kakrc.local|\.local.kakrc|kakrc' $files[1])
if test -n "$kakroot"
set session_id (echo -n "$(path basename "$kakroot")" | tr --complement '[:alpha:]_-' '-')
# special case; kakrc
if test "$kakroot" = ~/.config/kak
set session_id kakrc
end
# if there is no existing session
if not command kak -l | rg -xqF "$session_id"
set fifo_dir (mktemp -d --suffix=kak-init.XXXXXX)

View file

@ -10,7 +10,7 @@ define-command ide %{
}
# project-specific configuration
hook global BufCreate (.*/)?(\.kakrc\.local) %{
hook global BufCreate (.*/)?(\.kakrc\.local|\.kakrc\.local) %{
set-option buffer filetype kak
}

View file

@ -20,7 +20,7 @@ map -docstring "open a file with yazi (blocking)" global yazi f ": open-yazi-thi
define-command spawn-yazi %{
terminal yazi
}
map global -docstring "spawn yazi" global yazi <space> ': spawn-yazi<ret>'
map -docstring "spawn yazi" global yazi <space> ': spawn-yazi<ret>'
define-command open-yazi-new-client %{
evaluate-commands %sh{
@ -36,3 +36,4 @@ define-command open-yazi-new-client %{
fi
}
}
map -docstring "open with yazi in new client" global yazi n ': open-yazi-new-client<ret>'