migrate to nix yazi
This commit is contained in:
parent
cc6e7c2b72
commit
872b594f2c
@ -32,11 +32,6 @@
|
||||
".config/mako".source = ../../configs/.config/mako;
|
||||
".config/kanshi".source = ../../configs/.config/kanshi;
|
||||
".config/rofi".source = ../../configs/.config/rofi;
|
||||
".config/yazi/init.lua".source = ../../configs/.config/yazi/init.lua;
|
||||
".config/yazi/package.toml".source = ../../configs/.config/yazi/package.toml;
|
||||
".config/yazi/keymap.toml".source = ../../configs/.config/yazi/keymap.toml;
|
||||
".config/yazi/theme.toml".source = ../../configs/.config/yazi/theme.toml;
|
||||
".config/yazi/yazi.toml".source = ../../configs/.config/yazi/yazi.toml;
|
||||
".config/tmux".source = ../../configs/.config/tmux;
|
||||
".config/alacritty".source = ../../configs/.config/alacritty;
|
||||
".config/nvim".source = ../../configs/.config/nvim;
|
||||
@ -45,4 +40,8 @@
|
||||
".zshenv".source = ../../configs/.zshenv;
|
||||
".editorconfig".source = ../../configs/.editorconfig;
|
||||
};
|
||||
|
||||
imports = [
|
||||
./yazi.nix
|
||||
];
|
||||
}
|
||||
|
||||
78
home/users/yazi.nix
Normal file
78
home/users/yazi.nix
Normal file
@ -0,0 +1,78 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.yazi = {
|
||||
enable = true;
|
||||
|
||||
# Основные настройки
|
||||
settings = {
|
||||
manager = {
|
||||
sort_by = "natural";
|
||||
sort_dir_first = false;
|
||||
linemode = "size_and_mtime";
|
||||
show_symlink = true;
|
||||
};
|
||||
|
||||
preview = {
|
||||
wrap = "no";
|
||||
tab_size = 4;
|
||||
};
|
||||
|
||||
opener = {
|
||||
play = [
|
||||
{
|
||||
run = "mpv %s";
|
||||
orphan = true;
|
||||
for = "unix";
|
||||
}
|
||||
];
|
||||
edit = [
|
||||
{
|
||||
run = ''cd "''${YAZI_ORIGINAL_CWD:-''${PWD}}" && "''${EDITOR:-nano}" %s'';
|
||||
block = true;
|
||||
for = "unix";
|
||||
}
|
||||
];
|
||||
open = [
|
||||
{
|
||||
run = "xdg-open %s1";
|
||||
desc = "Open";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
plugin.prepend_fetchers = [
|
||||
{ group = "git"; url = "*"; run = "git"; }
|
||||
{ group = "git"; url = "*/"; run = "git"; }
|
||||
];
|
||||
};
|
||||
|
||||
# Хоткеи
|
||||
keymap.mgr = {
|
||||
prepend_keymap = [
|
||||
{ on = "h"; run = "leave"; desc = "Назад (вверх по иерархии)"; }
|
||||
{ on = "n"; run = "arrow next"; desc = "Вниз"; }
|
||||
{ on = "e"; run = "arrow prev"; desc = "Вверх"; }
|
||||
{ on = "M"; run = "plugin mount"; }
|
||||
{ on = "F"; run = "plugin jump-to-char"; desc = "Jump to char"; }
|
||||
{ on = "i"; run = "plugin smart-enter"; desc = "Enter the child directory, or open the file"; }
|
||||
{ on = [ "c" "m" ]; run = "plugin chmod"; desc = "Chmod on selected files"; }
|
||||
{ on = [ "<C-n>" ]; run = "seek 1"; desc = "Scroll preview down 1 line"; }
|
||||
{ on = [ "<C-p>" ]; run = "seek -1"; desc = "Scroll preview up 1 line"; }
|
||||
];
|
||||
|
||||
append_keymap = [
|
||||
{ on = [ "c" "e" ]; run = "shell -- flipbit x %h"; desc = "Toggle execution mode on file"; }
|
||||
];
|
||||
};
|
||||
|
||||
# Плагины
|
||||
plugins = {
|
||||
git.package = pkgs.yaziPlugins.git;
|
||||
mount.package = pkgs.yaziPlugins.mount;
|
||||
jump-to-char.package = pkgs.yaziPlugins.jump-to-char;
|
||||
smart-enter.package = pkgs.yaziPlugins.smart-enter;
|
||||
chmod.package = pkgs.yaziPlugins.chmod;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user