1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-19 00:09:48 +01:00
home-manager/tests/modules/programs/yazi/settings.nix
XYenon 90e62f96c7
programs.yazi: add module (#4373)
add module for yazi https://github.com/sxyazi/yazi a terminal rust file browser akin to ranger or joshuto
2023-08-27 20:47:47 +02:00

84 lines
1.6 KiB
Nix

{ ... }:
{
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";
}
];
};
};
};
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}
'';
}