diff --git a/homes/emenel/dotfiles/dot_config/yazi/init.lua b/homes/emenel/dotfiles/dot_config/yazi/init.lua index f02629e..6b1cc51 100644 --- a/homes/emenel/dotfiles/dot_config/yazi/init.lua +++ b/homes/emenel/dotfiles/dot_config/yazi/init.lua @@ -88,6 +88,7 @@ require("yatline"):setup({ section_c = { {type = "string", custom = false, name = "hovered_file_extension", params = {true}}, {type = "coloreds", custom = false, name = "permissions"}, + {type = "string", custom = false, name = "hovered_ownership"} } } } diff --git a/homes/emenel/dotfiles/dot_config/yazi/plugins/arrow.yazi/main.lua b/homes/emenel/dotfiles/dot_config/yazi/plugins/arrow.yazi/main.lua new file mode 100644 index 0000000..fc8c173 --- /dev/null +++ b/homes/emenel/dotfiles/dot_config/yazi/plugins/arrow.yazi/main.lua @@ -0,0 +1,8 @@ +--- @sync entry +return { + entry = function(_, job) + local current = cx.active.current + local new = (current.cursor + job.args[1]) % #current.files + ya.manager_emit("arrow", { new - current.cursor }) + end, +} diff --git a/modules/home/yazi.nix b/modules/home/yazi.nix index 4117873..2181f06 100644 --- a/modules/home/yazi.nix +++ b/modules/home/yazi.nix @@ -22,11 +22,17 @@ { on = "p"; run = "plugin smart-paste"; desc = "Paste into the hovered directory or CWD"; } { on = ["g" "l"]; run = "plugin lazygit"; desc = "lazygit"; } { on = "F"; run = "plugin jump-to-char"; desc = "jump to char"; } + { on = "k"; run = "plugin arrow -1"; desc = "up"; } + { on = "j"; run = "plugin arrow 1"; desc = "down"; } + { on = ""; run = "plugin arrow -1"; desc = "up"; } + { on = ""; run = "plugin arrow 1"; desc = "down"; } ]; }; settings = { manager = { sort_dir_first = false; + linemode = "mtime"; + show_symlink = true; }; opener = { edit = [ @@ -38,6 +44,10 @@ ]; }; plugin = { + prepend_preloaders = [ + { name = "/mnt/**"; run = "noop"; } + { name = "/home/emenel/mnt/**"; run = "noop"; } + ]; append_previewers = [ { name = "*"; run = "file-extra-metadata"; } { name = "*.md"; run = "glow"; }