mirror of
https://github.com/theniceboy/.config.git
synced 2026-04-09 02:05:19 +08:00
yazi config fix
This commit is contained in:
parent
4bc838c649
commit
689cc061cd
2 changed files with 19 additions and 34 deletions
|
|
@ -3,32 +3,15 @@
|
|||
"$schema" = "https://yazi-rs.github.io/schemas/keymap.json"
|
||||
|
||||
[mgr]
|
||||
prepend_keymap = [
|
||||
{ on = "i", run = 'plugin smart-enter' },
|
||||
{ on = "<Enter>", run = 'plugin smart-enter' },
|
||||
{ on = "S", run = 'shell "$SHELL" --block --confirm' },
|
||||
{ on = [
|
||||
"'",
|
||||
"a",
|
||||
], run = "plugin yamb save", desc = "Add bookmark" },
|
||||
{ on = [
|
||||
"'",
|
||||
"'",
|
||||
], run = "plugin yamb jump_by_fzf", desc = "Jump bookmark by fzf" },
|
||||
{ on = [
|
||||
"'",
|
||||
"r",
|
||||
], run = "plugin yamb delete_by_key", desc = "Delete bookmark by key" },
|
||||
{ on = [
|
||||
"P",
|
||||
], run = "spot", desc = "Open spotter" },
|
||||
{ on = [
|
||||
"c",
|
||||
"a",
|
||||
], run = "plugin compress", desc = "Archive selected files" },
|
||||
]
|
||||
|
||||
keymap = [
|
||||
{ on = "i", run = "plugin smart-enter", desc = "Smart enter" },
|
||||
{ on = "<Enter>", run = "plugin smart-enter", desc = "Smart enter" },
|
||||
{ on = "S", run = 'shell "$SHELL" --block --confirm', desc = "Shell" },
|
||||
{ on = ["'", "a"], run = "plugin yamb save", desc = "Add bookmark" },
|
||||
{ on = ["'", "'"], run = "plugin yamb jump_by_fzf", desc = "Jump bookmark by fzf" },
|
||||
{ on = ["'", "r"], run = "plugin yamb delete_by_key", desc = "Delete bookmark by key" },
|
||||
{ on = "P", run = "spot", desc = "Open spotter" },
|
||||
{ on = ["c", "a"], run = "plugin compress", desc = "Archive selected files" },
|
||||
{ on = "<Esc>", run = "escape", desc = "Exit visual mode, clear selected, or cancel search" },
|
||||
{ on = "<C-[>", run = "escape", desc = "Exit visual mode, clear selected, or cancel search" },
|
||||
#{ on = "q", run = "quit", desc = "Exit the process" },
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ play = [
|
|||
[open]
|
||||
rules = [
|
||||
# Folder
|
||||
{ name = "*/", use = ["edit", "open", "reveal"] },
|
||||
{ url = "*/", use = ["edit", "open", "reveal"] },
|
||||
# Text
|
||||
{ mime = "text/*", use = ["edit", "reveal"] },
|
||||
# Image
|
||||
|
|
@ -66,14 +66,14 @@ rules = [
|
|||
{ mime = "{audio,video}/*", use = ["play", "reveal"] },
|
||||
# Archive
|
||||
{ mime = "application/{,g}zip", use = ["extract", "reveal"] },
|
||||
{ mime = "application/{tar,bzip*,7z*,xz,rar}", use = ["extract", "reveal"] },
|
||||
{ mime = "application/x-{tar,bzip*,7z-compressed,xz,rar}", use = ["extract", "reveal"] },
|
||||
# JSON
|
||||
{ mime = "application/{json,ndjson}", use = ["edit", "reveal"] },
|
||||
{ mime = "application/{json,x-ndjson}", use = ["edit", "reveal"] },
|
||||
{ mime = "*/javascript", use = ["edit", "reveal"] },
|
||||
# Empty file
|
||||
{ mime = "inode/empty", use = ["edit", "reveal"] },
|
||||
{ mime = "inode/x-empty", use = ["edit", "reveal"] },
|
||||
# Fallback
|
||||
{ name = "*", use = ["edit", "open", "reveal"] },
|
||||
{ url = "*", use = ["open", "reveal"] },
|
||||
]
|
||||
|
||||
[tasks]
|
||||
|
|
@ -85,8 +85,10 @@ image_bound = [0, 0]
|
|||
suppress_preload = false
|
||||
|
||||
[plugin]
|
||||
fetchers = [{ id = "mime", name = "*", run = "mime", if = "!mime", prio = "high" }]
|
||||
prepend_fetchers = [{ id = "git", name = "*", run = "git" }, { id = "git", name = "*/", run = "git" }]
|
||||
prepend_fetchers = [
|
||||
{ id = "git", url = "*", run = "git" },
|
||||
{ id = "git", url = "*/", run = "git" },
|
||||
]
|
||||
preloaders = [
|
||||
# Image
|
||||
{ mime = "image/{avif,hei?,jxl,svg+xml}", run = "magick" },
|
||||
|
|
@ -100,7 +102,7 @@ preloaders = [
|
|||
{ mime = "application/vnd.ms-opentype", run = "font" },
|
||||
]
|
||||
previewers = [
|
||||
{ name = "*/", run = "folder", sync = true },
|
||||
{ url = "*/", run = "folder", sync = true },
|
||||
# Code
|
||||
{ mime = "text/*", run = "code" },
|
||||
{ mime = "*/{xml,javascript,x-wine-extension-ini}", run = "code" },
|
||||
|
|
@ -122,7 +124,7 @@ previewers = [
|
|||
# Empty file
|
||||
{ mime = "inode/x-empty", run = "empty" },
|
||||
# Fallback
|
||||
{ name = "*", run = "file" },
|
||||
{ url = "*", run = "file" },
|
||||
]
|
||||
|
||||
[input]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue