62 lines
1.3 KiB
Nix
Raw Normal View History

2024-09-27 23:08:25 +03:00
{ pkgs, lib, ... }: let
yazi-plugins = pkgs.fetchFromGitHub {
owner = "yazi-rs";
repo = "plugins";
2025-02-08 18:38:55 +03:00
rev = "07258518f3bffe28d87977bc3e8a88e4b825291b";
hash = "sha256-axoMrOl0pdlyRgckFi4DiS+yBKAIHDhVeZQJINh8+wk=";
};
starship = pkgs.fetchFromGitHub {
owner = "Rolv-Apneseth";
repo = "starship.yazi";
rev = "d1cd0a38aa6a2c2e86e62a466f43e415f781031e";
sha256 = "sha256-XiEsykudwYmwSNDO41b5layP1DqVa89e6Emv9Qf0mz0=";
2024-09-27 23:08:25 +03:00
};
in {
programs.yazi = {
enable = true;
enableZshIntegration = true;
shellWrapperName = "y";
settings = {
manager = {
show_hidden = true;
};
preview = {
max_width = 1000;
max_height = 1000;
};
};
plugins = {
chmod = "${yazi-plugins}/chmod.yazi";
full-border = "${yazi-plugins}/full-border.yazi";
max-preview = "${yazi-plugins}/max-preview.yazi";
2025-02-08 18:38:55 +03:00
starship = starship;
2024-09-27 23:08:25 +03:00
};
initLua = ''
require("full-border"):setup()
require("starship"):setup()
'';
keymap = {
manager.prepend_keymap = [
{
on = "T";
run = "plugin --sync max-preview";
desc = "Maximize or restore the preview pane";
}
{
on = ["c" "m"];
run = "plugin chmod";
desc = "Chmod on selected files";
}
2024-12-17 22:27:15 +03:00
{
on = [ "<C-n>" ];
run = ''shell '${lib.getExe pkgs.xdragon} -x -i -T "$@"' --confirm'';
}
2024-09-27 23:08:25 +03:00
];
};
};
}