68 lines
2.3 KiB
Nix
68 lines
2.3 KiB
Nix
{ pkgs, ... }:
|
|
let
|
|
yazi-plugins = pkgs.fetchFromGitHub {
|
|
owner = "yazi-rs";
|
|
repo = "plugins";
|
|
rev = "02d18be03812415097e83c6a912924560e4cec6d";
|
|
hash = "sha256-1FZ8wcf2VVp6ZWY27vm1dUU1KAL32WwoYbNA/8RUAog=";
|
|
};
|
|
in
|
|
{
|
|
programs = {
|
|
yazi = {
|
|
enable = true;
|
|
enableZshIntegration = true;
|
|
shellWrapperName = "y";
|
|
plugins = {
|
|
chmod = "${yazi-plugins}/chmod.yazi";
|
|
full-border = "${yazi-plugins}/full-border.yazi";
|
|
git = "${yazi-plugins}/git.yazi";
|
|
smart-enter = "${yazi-plugins}/smart-enter.yazi";
|
|
starship = pkgs.fetchFromGitHub {
|
|
owner = "Rolv-Apneseth";
|
|
repo = "starship.yazi";
|
|
rev = "af8bf6f82165b83272b6501ce7445cf2c61fbf51";
|
|
hash = "sha256-L7MkZZqJ+t+A61ceC4Q1joLF6ytoWdgx9BwZWAGAoCA=";
|
|
};
|
|
mediainfo = pkgs.fetchFromGitHub {
|
|
owner = "boydaihungst";
|
|
repo = "mediainfo.yazi";
|
|
rev = "e2a7cfd750226ce4adc3acc42b4cf75c79fe9f0e";
|
|
hash = "sha256-MW0pawBT2S0rOoclCQahiYzLX5JZPuiALCG0ZzOqvM4=";
|
|
};
|
|
};
|
|
initLua = ''
|
|
require("full-border"):setup()
|
|
require("starship"):setup()
|
|
require("git"):setup()
|
|
require("smart-enter"):setup({
|
|
open_multi = true,
|
|
})
|
|
'';
|
|
settings = {
|
|
sort_by = "name";
|
|
sort_dir_first = true;
|
|
sort_reverse = false;
|
|
plugin = {
|
|
prepend_fetchers = [
|
|
{ id = "git"; name = "*"; run = "git"; }
|
|
{ id = "git"; name = "*/"; run = "git"; }
|
|
];
|
|
prepend_previewers = [
|
|
{ mime = "{image,audio,video}/*"; run = "mediainfo"; }
|
|
{ mime = "application/subrip"; run = "mediainfo"; }
|
|
];
|
|
};
|
|
};
|
|
keymap = {
|
|
manager.prepend_keymap = [
|
|
{ run = "cd /media/net/svartalbenheim/media_data/"; on = [ "g" "m" ]; desc = "Cd to media_data"; }
|
|
{ run = "cd /media/net/svartalbenheim/media_data/media/Video"; on = [ "g" "v" ]; desc = "Cd to media_data"; }
|
|
{ run = "cd /media/net/svartalbenheim/media_data/media/Audio"; on = [ "g" "a" ]; desc = "Cd to media_data"; }
|
|
{ run = "plugin smart-enter"; on = [ "l" ]; desc = "Enter the child directory, or open the file"; }
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|