From a868dd120b0c65dc5aa55befcb666d1af501b594 Mon Sep 17 00:00:00 2001 From: Eclypsed Date: Sat, 11 Apr 2026 14:21:41 -0400 Subject: [PATCH] Updated yazi config --- modules/features/yazi.nix | 141 +++++++++++++++++++++++++++++++++----- 1 file changed, 123 insertions(+), 18 deletions(-) diff --git a/modules/features/yazi.nix b/modules/features/yazi.nix index a51f7f1..dfe609f 100644 --- a/modules/features/yazi.nix +++ b/modules/features/yazi.nix @@ -6,7 +6,9 @@ }: { home.packages = with pkgs; [ + wl-clipboard-rs dragon-drop + trash-cli ]; programs.yazi = { @@ -14,7 +16,16 @@ enableZshIntegration = true; shellWrapperName = "y"; plugins = with pkgs.yaziPlugins; { - inherit git full-border chmod; + inherit + git + full-border + chmod + compress + wl-clipboard + recycle-bin + mount + lazygit + ; }; initLua = '' require("git"):setup { @@ -22,24 +33,118 @@ order = 1500, } require("full-border"):setup() + require("recycle-bin"):setup() ''; - keymap = { - mgr.prepend_keymap = [ - { - on = ""; - run = "shell -- dragon-drop -x -i -T %s1"; - desc = "Open a prompt to drag and drop a file"; - } - { - on = [ - "c" - "m" - ]; - run = "plugin chmod"; - desc = "Chmod on selected files"; - } - ]; - }; + keymap = + let + leader = "c"; + in + { + mgr.prepend_keymap = [ + { + on = [ + leader + "d" + ]; + run = "shell -- dragon-drop -x -i -T %s1"; + desc = "Open a prompt to drag and drop a file"; + } + { + on = [ + leader + "c" + ]; + run = "plugin chmod"; + desc = "Chmod on selected files"; + } + { + on = [ + leader + "a" + "a" + ]; + run = "plugin compress"; + desc = "Archive selected files"; + } + { + on = [ + leader + "a" + "p" + ]; + run = "plugin compress -p"; + desc = "Archive selected files (password)"; + } + { + on = [ + leader + "a" + "h" + ]; + run = "plugin compress -ph"; + desc = "Archive selected files (password+header)"; + } + { + on = [ + leader + "a" + "h" + ]; + run = "plugin compress -ph"; + desc = "Archive selected files (password+header)"; + } + { + on = [ + leader + "a" + "l" + ]; + run = "plugin compress -l"; + desc = "Archive selected files (compression level)"; + } + { + on = [ + leader + "a" + "u" + ]; + run = "plugin compress -phl"; + desc = "Archive selected files (password+header+level)"; + } + { + on = [ + leader + "y" + ]; + run = "plugin wl-clipboard"; + desc = "Copy file to clipboard"; + } + { + on = [ + leader + "r" + ]; + run = "plugin recycle-bin"; + desc = "Open Recycle Bin Menu"; + } + { + on = [ + leader + "m" + ]; + run = "plugin mount"; + desc = "Open Mount Manager"; + } + { + on = [ + leader + "l" + ]; + run = "plugin lazygit"; + desc = "Open lazygit"; + } + ]; + }; settings = { plugin = { # Disable all preset previewers, preloaders