2025-02-09 23:11:13 -05:00
|
|
|
local function setup()
|
|
|
|
ps.sub("cd", function()
|
|
|
|
local cwd = cx.active.current.cwd
|
|
|
|
if cwd:ends_with("Downloads") then
|
2025-04-04 15:38:54 -04:00
|
|
|
ya.mgr_emit("sort", { "mtime", reverse = true, dir_first = false })
|
2025-02-09 23:11:13 -05:00
|
|
|
else
|
2025-04-04 15:38:54 -04:00
|
|
|
ya.mgr_emit("sort", { "alphabetical", reverse = false, dir_first = true })
|
2025-02-09 23:11:13 -05:00
|
|
|
end
|
|
|
|
end)
|
|
|
|
end
|
|
|
|
|
|
|
|
return { setup = setup }
|