From 34f696607a684bb561eebeaeb66e93cec3942f8a Mon Sep 17 00:00:00 2001 From: Oleksandr Smirnov Date: Fri, 24 Oct 2025 23:20:41 +0300 Subject: [PATCH] yazi: add config, and shell wrapper --- config/fish/functions/yaz.fish | 8 ++++++++ config/yazi/keymap.toml | 10 ++++++++++ config/yazi/yazi.toml | 6 ++++++ 3 files changed, 24 insertions(+) create mode 100644 config/fish/functions/yaz.fish create mode 100644 config/yazi/keymap.toml create mode 100644 config/yazi/yazi.toml diff --git a/config/fish/functions/yaz.fish b/config/fish/functions/yaz.fish new file mode 100644 index 0000000..32cbb57 --- /dev/null +++ b/config/fish/functions/yaz.fish @@ -0,0 +1,8 @@ +function yaz + set tmp (mktemp -t "yazi-cwd.XXXXXX") + yazi $argv --cwd-file="$tmp" + if read -z cwd < "$tmp"; and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ] + builtin cd -- "$cwd" + end + rm -f -- "$tmp" +end diff --git a/config/yazi/keymap.toml b/config/yazi/keymap.toml new file mode 100644 index 0000000..a178de2 --- /dev/null +++ b/config/yazi/keymap.toml @@ -0,0 +1,10 @@ +[[mgr.prepend_keymap]] +on = [ "g", "c" ] +run = "cd ~/.dotfiles" +desc = "goto .dotfiles" + +[[mgr.prepend_keymap]] +on = [ "g", "v" ] +run = "cd ~/vods" +desc = "goto ~/vods" + diff --git a/config/yazi/yazi.toml b/config/yazi/yazi.toml new file mode 100644 index 0000000..8c46481 --- /dev/null +++ b/config/yazi/yazi.toml @@ -0,0 +1,6 @@ +[mgr] +sort_sensitive = false +sort_dir_first = true +linemode = "none" +show_symlink = true +show_hidden = false