reNixos/hand7s/programs/yazi.nix
s0me1newithhand7s e4e1b03c7e
treewide: upstreaming changes
Signed-off-by: s0me1newithhand7s <117505144+s0me1newithhand7s@users.noreply.github.com>
2025-10-24 21:03:46 +03:00

109 lines
3 KiB
Nix

{
pkgs,
lib,
...
}: {
programs = {
yazi = {
enable = true;
enableFishIntegration = true;
shellWrapperName = "yz";
settings = {
mgr = {
sort_by = "natural";
sort_sensitive = true;
sort_reverse = false;
sort_translit = true;
linemode = "size";
show_hidden = true;
show_symlink = true;
prepend_keymap = [
{
on = "R";
run = "plugin rsync";
desc = "Copy files using rsync";
}
{
on = "c, m";
run = "plugin chmod";
desc = "Chmod on selected files";
}
];
};
preview = {
tab_size = 4;
image_filter = "lanczos3";
image_quality = 90;
};
opener = {
play = [
{
run = "${lib.getExe pkgs.mpv} ''$@''";
block = true;
for = "unix";
}
];
edit = [
{
run = "${lib.getExe pkgs.helix} ''$@''";
block = true;
for = "unix";
}
];
open = [
{
run = "${lib.getExe' pkgs.xdg-utils "xdg-open"} ''$@''";
block = true;
for = "unix";
}
];
};
input = {
cursor_blink = true;
};
plugin = {
prepend_fetchers = [
{
id = "git";
name = "*";
run = "git";
}
{
id = "git";
name = "*/";
run = "git";
}
];
};
};
plugins = {
inherit
(pkgs.yaziPlugins)
starship
rsync
git
chmod
full-border
;
};
initLua = ''
require("full-border"):setup({ type = ui.Border.ROUNDED })
require("starship"):setup()
require("git"):setup()
'';
};
};
}