From 689cc061cdde8ba5fe5400a8d7dadc2f57eedd41 Mon Sep 17 00:00:00 2001 From: David Chen Date: Thu, 15 Jan 2026 15:13:53 -0800 Subject: [PATCH] yazi config fix --- yazi/keymap.toml | 33 ++++++++------------------------- yazi/yazi.toml | 20 +++++++++++--------- 2 files changed, 19 insertions(+), 34 deletions(-) diff --git a/yazi/keymap.toml b/yazi/keymap.toml index cec6f61..ba3a335 100644 --- a/yazi/keymap.toml +++ b/yazi/keymap.toml @@ -3,32 +3,15 @@ "$schema" = "https://yazi-rs.github.io/schemas/keymap.json" [mgr] -prepend_keymap = [ - { on = "i", run = 'plugin smart-enter' }, - { on = "", 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 = "", 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 = "", run = "escape", desc = "Exit visual mode, clear selected, or cancel search" }, { on = "", run = "escape", desc = "Exit visual mode, clear selected, or cancel search" }, #{ on = "q", run = "quit", desc = "Exit the process" }, diff --git a/yazi/yazi.toml b/yazi/yazi.toml index 52cd6d2..7739128 100644 --- a/yazi/yazi.toml +++ b/yazi/yazi.toml @@ -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]