From 8ce2157c2b12428e055e702125fb68d393844091 Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Sat, 15 Mar 2025 02:00:06 -0400 Subject: [PATCH] AutoYADM commit: 2025-03-15 02:00:06 --- .config/yazi/init.lua | 2 +- .config/yazi/keymap.toml | 38 +++++++++++++++++-- .config/yazi/package.toml | 20 ++++++++++ .../custom-shell.yazi/yazi_cmd_history | 1 + .config/yazi/yazi.toml | 10 +++-- 5 files changed, 62 insertions(+), 9 deletions(-) diff --git a/.config/yazi/init.lua b/.config/yazi/init.lua index 25c3e6ae..3d0d1e9b 100644 --- a/.config/yazi/init.lua +++ b/.config/yazi/init.lua @@ -1,6 +1,6 @@ -local M = {} require("custom-shell"):setup({ history_path = "default", save_history = true, }) +require("git"):setup() diff --git a/.config/yazi/keymap.toml b/.config/yazi/keymap.toml index 7395b9f2..cd82ac65 100644 --- a/.config/yazi/keymap.toml +++ b/.config/yazi/keymap.toml @@ -81,12 +81,14 @@ run = "plugin open-with-cmd" desc = "Open with command" [[manager.prepend_keymap]] -on = ["'", ";"] -run = 'plugin custom-shell -- auto --interactive' +on = [";"] +# on = ["'", ";"] +run = 'plugin custom-shell -- auto --interactive --block=false' desc = "custom-shell as default, interactive" [[manager.prepend_keymap]] -on = ["'", ":"] +on = [":"] +# on = ["'", ":"] run = 'plugin custom-shell -- auto --interactive --block' desc = "custom-shell as default, interactive, block" @@ -125,7 +127,7 @@ run = "plugin chmod" desc = "Chmod on selected files" [[manager.prepend_keymap]] -on = "F" +on = ["g", "f"] run = "plugin jump-to-char" desc = "Jump to char" @@ -230,6 +232,34 @@ on = ["R", "D"] run = "plugin sudo -- remove --permanently" desc = "sudo delete" +[[manager.prepend_keymap]] +on = "F" +run = "plugin smart-filter" +desc = "Smart filter" + +[[manager.prepend_keymap]] +on = [ "I" ] +run = "plugin bypass" +desc = "Recursively enter child directory, skipping children with only a single subdirectory" +[[manager.prepend_keymap]] +on = [ "M" ] +run = "plugin bypass --args=reverse" +desc = "Recursively enter parent directory, skipping parents with only a single subdirectory" + +[[manager.prepend_keymap]] +on = [ "k", "g" ] +run = "plugin vcs-files" +desc = "Show Git file changes" + + +# INPUT + + +[[input.prepend_keymap]] +on = "" +run = "close" +desc = "Cancel input" + [[input.prepend_keymap]] on = "l" run = "forward --end-of-word" diff --git a/.config/yazi/package.toml b/.config/yazi/package.toml index 3c09633c..8ce8db64 100644 --- a/.config/yazi/package.toml +++ b/.config/yazi/package.toml @@ -78,6 +78,26 @@ use = "TD-Sky/sudo" rev = "af70636" hash = "a94dcbe9266512806c677138e8591ddb" +[[plugin.deps]] +use = "yazi-rs/plugins:smart-filter" +rev = "cb6165b" +hash = "f0c4b41b5d19a3144958383333eff6e7" + +[[plugin.deps]] +use = "Rolv-Apneseth/bypass" +rev = "ecb1f7f" +hash = "905054b2df08ff79af223e0b6f249fa3" + +[[plugin.deps]] +use = "yazi-rs/plugins:vcs-files" +rev = "cb6165b" +hash = "5e85dd0baca18119f4d712d81b09eb7c" + +[[plugin.deps]] +use = "yazi-rs/plugins:git" +rev = "cb6165b" +hash = "ee5fa7e64db72d6b10c2315de97c9cc7" + [[flavor.deps]] use = "ashen-org/ashen:ashen" rev = "7a53969" diff --git a/.config/yazi/plugins/custom-shell.yazi/yazi_cmd_history b/.config/yazi/plugins/custom-shell.yazi/yazi_cmd_history index 92418844..09afa14d 100644 --- a/.config/yazi/plugins/custom-shell.yazi/yazi_cmd_history +++ b/.config/yazi/plugins/custom-shell.yazi/yazi_cmd_history @@ -3,3 +3,4 @@ zsh -ic 'chmod +x get_git_provider_url.fish;exit' zsh -ic 'mksh abook;exit' zsh -ic 'mksh bootstrap-in-dir;exit' zsh -ic 'mksh strap;exit' +zsh -ic 'ya pack -a yazi-rs/plugins:git;exit' diff --git a/.config/yazi/yazi.toml b/.config/yazi/yazi.toml index bd0fcc84..25cab4c9 100644 --- a/.config/yazi/yazi.toml +++ b/.config/yazi/yazi.toml @@ -1,6 +1,6 @@ [manager] show_hidden = true -linemode = "size" +# linemode = "git" title_format = "{cwd}" @@ -17,12 +17,14 @@ prepend_previewers = [ { mime = "application/x-xz", run = "ouch" }, ] append_previewers = [{ name = "*", run = "hexyl" }] +prepend_fetchers = [ + { id = "git", name = "*", run = "git" }, + { id = "git", name = "*/", run = "git" }, +] [opener] extract = [ { run = 'ouch d -y "%*"', desc = "Extract here with ouch", for = "windows" }, { run = 'ouch d -y "$@"', desc = "Extract here with ouch", for = "unix" }, ] -open = [ - { run = 'xdg-open "$@"', desc = "Open", orphan = true } -] +open = [{ run = 'xdg-open "$@"', desc = "Open", orphan = true }]