Skip to content

Commit

Permalink
feat(yazi): the exec will be deprecated in the future version
Browse files Browse the repository at this point in the history
  • Loading branch information
0xRichardH committed Jul 2, 2024
1 parent 05f33f1 commit c677e9e
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion config/yazi/theme.toml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ separator_style = { fg = "#585b70" }

[help]
on = { fg = "#eb6f92" }
exec = { fg = "#9ccfd8" }
run = { fg = "#9ccfd8" }
desc = { fg = "#9399b2" }
hovered = { bg = "#585b70", bold = true }
footer = { fg = "#2A273F", bg = "#e0def4" }
Expand Down
72 changes: 36 additions & 36 deletions config/yazi/yazi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,27 @@ ueberzug_offset = [0, 0, 0, 0]

[opener]
edit = [
{ exec = '$EDITOR "$@"', block = true, for = "unix" },
{ exec = 'code "%*"', orphan = true, for = "windows" },
{ run = '$EDITOR "$@"', block = true, for = "unix" },
{ run = 'code "%*"', orphan = true, for = "windows" },
]
open = [
{ exec = 'xdg-open "$@"', desc = "Open", for = "linux" },
{ exec = 'open "$@"', desc = "Open", for = "macos" },
{ exec = 'start "" "%1"', orphan = true, desc = "Open", for = "windows" },
{ run = 'xdg-open "$@"', desc = "Open", for = "linux" },
{ run = 'open "$@"', desc = "Open", for = "macos" },
{ run = 'start "" "%1"', orphan = true, desc = "Open", for = "windows" },
]
reveal = [
{ exec = 'open -R "$1"', desc = "Reveal", for = "macos" },
{ exec = 'explorer /select, "%1"', orphan = true, desc = "Reveal", for = "windows" },
{ exec = '''exiftool "$1"; echo "Press enter to exit"; read''', block = true, desc = "Show EXIF", for = "unix" },
{ run = 'open -R "$1"', desc = "Reveal", for = "macos" },
{ run = 'explorer /select, "%1"', orphan = true, desc = "Reveal", for = "windows" },
{ run = '''exiftool "$1"; echo "Press enter to exit"; read''', block = true, desc = "Show EXIF", for = "unix" },
]
extract = [
{ exec = 'unar "$1"', desc = "Extract here", for = "unix" },
{ exec = 'unar "%1"', desc = "Extract here", for = "windows" },
{ run = 'unar "$1"', desc = "Extract here", for = "unix" },
{ run = 'unar "%1"', desc = "Extract here", for = "windows" },
]
play = [
{ exec = 'mpv "$@"', orphan = true, for = "unix" },
{ exec = 'mpv "%1"', orphan = true, for = "windows" },
{ exec = '''mediainfo "$1"; echo "Press enter to exit"; read''', block = true, desc = "Show media info", for = "unix" },
{ run = 'mpv "$@"', orphan = true, for = "unix" },
{ run = 'mpv "%1"', orphan = true, for = "windows" },
{ run = '''mediainfo "$1"; echo "Press enter to exit"; read''', block = true, desc = "Show media info", for = "unix" },
]

[open]
Expand Down Expand Up @@ -132,40 +132,40 @@ suppress_preload = false

[plugin]
preloaders = [
{ name = "*", cond = "!mime", exec = "mime", multi = true, prio = "high" },
{ name = "*", cond = "!mime", run = "mime", multi = true, prio = "high" },
# Image
{ mime = "image/vnd.djvu", exec = "noop" },
{ mime = "image/*", exec = "image" },
{ mime = "image/vnd.djvu", run = "noop" },
{ mime = "image/*", run = "image" },
# Video
{ mime = "video/*", exec = "video" },
{ mime = "video/*", run = "video" },
# PDF
{ mime = "application/pdf", exec = "pdf" },
{ mime = "application/pdf", run = "pdf" },
]
previewers = [
{ name = "*/", exec = "folder", sync = true },
{ name = "*/", run = "folder", sync = true },
# Code
{ mime = "text/*", exec = "code" },
{ mime = "*/xml", exec = "code" },
{ mime = "*/javascript", exec = "code" },
{ mime = "*/x-wine-extension-ini", exec = "code" },
{ mime = "text/*", run = "code" },
{ mime = "*/xml", run = "code" },
{ mime = "*/javascript", run = "code" },
{ mime = "*/x-wine-extension-ini", run = "code" },
# JSON
{ mime = "application/json", exec = "json" },
{ mime = "application/json", run = "json" },
# Image
{ mime = "image/vnd.djvu", exec = "noop" },
{ mime = "image/*", exec = "image" },
{ mime = "image/vnd.djvu", run = "noop" },
{ mime = "image/*", run = "image" },
# Video
{ mime = "video/*", exec = "video" },
{ mime = "video/*", run = "video" },
# PDF
{ mime = "application/pdf", exec = "pdf" },
{ mime = "application/pdf", run = "pdf" },
# Archive
{ mime = "application/zip", exec = "archive" },
{ mime = "application/gzip", exec = "archive" },
{ mime = "application/x-tar", exec = "archive" },
{ mime = "application/x-bzip", exec = "archive" },
{ mime = "application/x-bzip2", exec = "archive" },
{ mime = "application/x-7z-compressed", exec = "archive" },
{ mime = "application/x-rar", exec = "archive" },
{ mime = "application/xz", exec = "archive" },
{ mime = "application/zip", run = "archive" },
{ mime = "application/gzip", run = "archive" },
{ mime = "application/x-tar", run = "archive" },
{ mime = "application/x-bzip", run = "archive" },
{ mime = "application/x-bzip2", run = "archive" },
{ mime = "application/x-7z-compressed", run = "archive" },
{ mime = "application/x-rar", run = "archive" },
{ mime = "application/xz", run = "archive" },
]

[input]
Expand Down

0 comments on commit c677e9e

Please sign in to comment.