dir specific sorting for yazi
This commit is contained in:
parent
88c784ebf8
commit
73b4bad6de
2 changed files with 13 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
|||
require("git"):setup()
|
||||
require("yatline-symlink"):setup()
|
||||
|
||||
require("dir-rules"):setup()
|
||||
require("yatline"):setup({
|
||||
--theme = my_theme,
|
||||
section_separator = { open = "", close = "" },
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
local function setup()
|
||||
ps.sub("cd", function()
|
||||
local cwd = cx.active.current.cwd
|
||||
if cwd:ends_with("Downloads") then
|
||||
ya.manager_emit("sort", { "mtime", reverse = true, dir_first = false })
|
||||
else
|
||||
ya.manager_emit("sort", { "alphabetical", reverse = false })
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
return { setup = setup }
|
Loading…
Add table
Add a link
Reference in a new issue