[yazi] Add nav in parent dir

This commit is contained in:
aloslider committed 2026-07-26 19:13:30 +03:00
1 parent a7e0f242c2
commit 6dec3bf52d
2 files changed
+39 -7

No files matched your search

+27 -7
View File
@@ -1,7 +1,27 @@
[mgr]
prepend_keymap = [
{ on = "\\", run = "plugin split-tabs spl_toggle", desc = "Dual-pane: toggle" },
{ on = "<Tab>", run = "plugin split-tabs spl_switch_tab", desc = "Dual-pane: switch pane" },
{ on = "P", run = "plugin split-tabs spl_preview", desc = "Dual-pane: toggle bottom preview" },
{ on = "<C-g>", run = "shell -- rofi -theme fullscreen-preview -show filebrowser -filebrowser-command \"ya emit reveal\" -filebrowser-directory \"$(pwd)\"", desc = "Grid view" },
]
[[mgr.prepend_keymap]]
on = "\\"
run = "plugin split-tabs spl_toggle"
desc = "Dual-pane: toggle"
[[mgr.prepend_keymap]]
on = "<Tab>"
run = "plugin split-tabs spl_switch_tab"
desc = "Dual-pane: switch pane"
[[mgr.prepend_keymap]]
on = "P"
run = "plugin split-tabs spl_preview"
desc = "Dual-pane: toggle bottom preview"
[[mgr.prepend_keymap]]
on = "<C-g>"
run = "shell -- rofi -theme fullscreen-preview -show filebrowser -filebrowser-command \"ya emit reveal\" -filebrowser-directory \"$(pwd)\""
desc = "Grid view"
[[mgr.prepend_keymap]]
on = "K"
run = "plugin parent-arrow -1"
[[mgr.prepend_keymap]]
on = "J"
run = "plugin parent-arrow 1"
@@ -0,0 +1,12 @@
--- @sync entry
local function entry(_, job)
local parent = cx.active.parent
if not parent then return end
local target = parent.files[parent.cursor + 1 + job.args[1]]
if target and target.cha.is_dir then
ya.emit("cd", { target.url })
end
end
return { entry = entry }