2023-08-27 18:47:47 +00:00
|
|
|
{ ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
programs.yazi = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
keymap = {
|
|
|
|
input.keymap = [
|
|
|
|
{
|
|
|
|
exec = "close";
|
|
|
|
on = [ "<C-q>" ];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
exec = "close --submit";
|
|
|
|
on = [ "<Enter>" ];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
exec = "escape";
|
|
|
|
on = [ "<Esc>" ];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
exec = "backspace";
|
|
|
|
on = [ "<Backspace>" ];
|
|
|
|
}
|
|
|
|
];
|
|
|
|
manager.keymap = [
|
|
|
|
{
|
|
|
|
exec = "escape";
|
|
|
|
on = [ "<Esc>" ];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
exec = "quit";
|
|
|
|
on = [ "q" ];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
exec = "close";
|
|
|
|
on = [ "<C-q>" ];
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
settings = {
|
|
|
|
log = { enabled = false; };
|
|
|
|
manager = {
|
|
|
|
show_hidden = false;
|
|
|
|
sort_by = "modified";
|
|
|
|
sort_dir_first = true;
|
|
|
|
sort_reverse = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
theme = {
|
|
|
|
filetype = {
|
|
|
|
rules = [
|
|
|
|
{
|
|
|
|
fg = "#7AD9E5";
|
|
|
|
mime = "image/*";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
fg = "#F3D398";
|
|
|
|
mime = "video/*";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
fg = "#F3D398";
|
|
|
|
mime = "audio/*";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
fg = "#CD9EFC";
|
|
|
|
mime = "application/x-bzip";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
2024-05-29 03:01:52 +00:00
|
|
|
initLua = ./init.lua;
|
2024-06-03 17:39:00 +00:00
|
|
|
plugins = {
|
2024-06-05 19:24:18 +00:00
|
|
|
testplugin = ./plugin;
|
|
|
|
## Produces warning
|
|
|
|
#"plugin-with-suffix.yazi" = ./plugin;
|
|
|
|
## Fails assertion
|
|
|
|
#single-file-plugin = ./plugin/init.lua;
|
|
|
|
#empty-dir-plugin = ./empty;
|
|
|
|
};
|
|
|
|
flavors = {
|
|
|
|
testflavor = ./flavor;
|
|
|
|
## Produces warning
|
|
|
|
#"flavor-with-suffix.yazi" = ./flavor;
|
|
|
|
## Fails assertion
|
|
|
|
#single-file-flavor = ./flavor/init.lua;
|
|
|
|
#empty-dir-flavor = ./empty;
|
2024-06-03 17:39:00 +00:00
|
|
|
};
|
2023-08-27 18:47:47 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
test.stubs.yazi = { };
|
|
|
|
|
|
|
|
nmt.script = ''
|
|
|
|
assertFileContent home-files/.config/yazi/keymap.toml \
|
|
|
|
${./keymap-expected.toml}
|
|
|
|
assertFileContent home-files/.config/yazi/yazi.toml \
|
|
|
|
${./settings-expected.toml}
|
|
|
|
assertFileContent home-files/.config/yazi/theme.toml \
|
|
|
|
${./theme-expected.toml}
|
2024-05-29 03:01:52 +00:00
|
|
|
assertFileContent home-files/.config/yazi/init.lua \
|
|
|
|
${./init.lua}
|
2024-06-05 19:24:18 +00:00
|
|
|
assertFileContent home-files/.config/yazi/plugins/testplugin.yazi/init.lua \
|
2024-06-03 17:39:00 +00:00
|
|
|
${./plugin/init.lua}
|
2024-06-05 19:24:18 +00:00
|
|
|
assertFileContent home-files/.config/yazi/flavors/testflavor.yazi/init.lua \
|
2024-05-29 03:01:52 +00:00
|
|
|
${./flavor/init.lua}
|
2023-08-27 18:47:47 +00:00
|
|
|
'';
|
|
|
|
}
|