2026-04-04 16:46:30 -04:00
|
|
|
{
|
|
|
|
|
flake.modules.homeManager.yazi =
|
|
|
|
|
{
|
|
|
|
|
pkgs,
|
|
|
|
|
...
|
|
|
|
|
}:
|
|
|
|
|
{
|
|
|
|
|
home.packages = with pkgs; [
|
2026-04-11 14:21:41 -04:00
|
|
|
wl-clipboard-rs
|
2026-04-04 16:46:30 -04:00
|
|
|
dragon-drop
|
2026-04-11 14:21:41 -04:00
|
|
|
trash-cli
|
2026-04-04 16:46:30 -04:00
|
|
|
];
|
|
|
|
|
|
|
|
|
|
programs.yazi = {
|
|
|
|
|
enable = true;
|
|
|
|
|
enableZshIntegration = true;
|
|
|
|
|
shellWrapperName = "y";
|
|
|
|
|
plugins = with pkgs.yaziPlugins; {
|
2026-04-11 14:21:41 -04:00
|
|
|
inherit
|
|
|
|
|
git
|
|
|
|
|
full-border
|
|
|
|
|
chmod
|
|
|
|
|
compress
|
|
|
|
|
wl-clipboard
|
|
|
|
|
recycle-bin
|
|
|
|
|
mount
|
|
|
|
|
lazygit
|
|
|
|
|
;
|
2026-04-04 16:46:30 -04:00
|
|
|
};
|
|
|
|
|
initLua = ''
|
|
|
|
|
require("git"):setup {
|
|
|
|
|
-- Order of status signs showing in the linemode
|
|
|
|
|
order = 1500,
|
|
|
|
|
}
|
|
|
|
|
require("full-border"):setup()
|
2026-04-11 14:21:41 -04:00
|
|
|
require("recycle-bin"):setup()
|
2026-04-04 16:46:30 -04:00
|
|
|
'';
|
2026-04-11 14:21:41 -04:00
|
|
|
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";
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
};
|
2026-04-04 16:46:30 -04:00
|
|
|
settings = {
|
|
|
|
|
plugin = {
|
|
|
|
|
# Disable all preset previewers, preloaders
|
|
|
|
|
# This is recommended by yazi when working with network shares
|
|
|
|
|
preloaders = [ ];
|
|
|
|
|
previewers = [ ];
|
|
|
|
|
|
|
|
|
|
prepend_fetchers = [
|
|
|
|
|
{
|
|
|
|
|
id = "git";
|
|
|
|
|
url = "*";
|
|
|
|
|
run = "git";
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
id = "git";
|
|
|
|
|
url = "*/";
|
|
|
|
|
run = "git";
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|