feat(shell): setup yazi file manager.

This commit is contained in:
CronyAkatsuki 2025-11-05 18:10:11 +01:00
parent cd3e60e3cc
commit b9413da4b9
3 changed files with 65 additions and 0 deletions

View file

@ -0,0 +1,12 @@
local function setup()
ps.sub("cd", function()
local cwd = cx.active.current.cwd
if cwd:ends_with("downs") then
ya.emit("sort", { "mtime", reverse = true, dir_first = false })
else
ya.emit("sort", { "natural", reverse = false, dir_first = true })
end
end)
end
return { setup = setup }

View file

@ -0,0 +1,7 @@
--- @sync entry
return {
entry = function()
local h = cx.active.current.hovered
ya.emit("tab_create", h and h.cha.is_dir and { h.url } or { current = true })
end,
}