refactoring
This commit is contained in:
parent
74ae1150a3
commit
69400c1aa3
142 changed files with 11 additions and 70 deletions
12
modules/home/yazi/plugins/dir-rules.yazi/main.lua
Normal file
12
modules/home/yazi/plugins/dir-rules.yazi/main.lua
Normal file
|
@ -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