feat: Configure yazi

This commit is contained in:
Sweetbread 2024-09-27 23:08:25 +03:00
parent 2bf3b6f5f0
commit 6049fec394
2 changed files with 57 additions and 0 deletions

View File

@ -7,6 +7,7 @@
./style.nix
./neofetch.nix
./syncthing.nix
./yazi.nix
./wms/hyprland.nix
./wms/waybar.nix

View File

@ -0,0 +1,56 @@
{ pkgs, lib, ... }: let
yazi-plugins = pkgs.fetchFromGitHub {
owner = "yazi-rs";
repo = "plugins";
rev = "c5785059611624e20a37ba573620f30acc28a26a";
hash = "sha256-wlSBtabIsEUJhuHmXwgpSnwZp9WaVQFBg6s1XXjubrE=";
};
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";
starship = pkgs.fetchFromGitHub {
owner = "Rolv-Apneseth";
repo = "starship.yazi";
rev = "77a65f5a367f833ad5e6687261494044006de9c3";
sha256 = "sha256-sAB0958lLNqqwkpucRsUqLHFV/PJYoJL2lHFtfHDZF8=";
};
};
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";
}
];
};
};
}