update yazi config to fix breaking changes
This commit is contained in:
parent
519e658693
commit
945b87e85d
7 changed files with 266 additions and 280 deletions
|
|
@ -11,6 +11,9 @@ sort_dir_first = true
|
|||
linemode = "mtime"
|
||||
show_hidden = true
|
||||
show_symlink = true
|
||||
scrolloff = 5
|
||||
mouse_events = [ "click", "scroll" ]
|
||||
title_format = "Yazi: {cwd}"
|
||||
|
||||
[preview]
|
||||
tab_size = 2
|
||||
|
|
@ -25,51 +28,55 @@ ueberzug_offset = [ 0, 0, 0, 0 ]
|
|||
|
||||
[opener]
|
||||
edit = [
|
||||
{ exec = '[ -n "$EDITOR" ] && $EDITOR "$@"', desc = "$EDITOR", block = true, for = "unix" },
|
||||
{ exec = 'code "%*"', orphan = true, for = "windows" },
|
||||
{ run = '[ -n "$EDITOR" ] && $EDITOR "$@"', desc = "$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 = 'ya pub extract --list "$@"', desc = "Extract here", for = "unix" },
|
||||
{ run = 'ya pub extract --list %*', 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]
|
||||
rules = [
|
||||
# Folder
|
||||
{ name = "*/", use = [ "edit", "open", "reveal" ] },
|
||||
|
||||
# Text
|
||||
{ mime = "text/*", use = [ "edit", "reveal" ] },
|
||||
|
||||
# Archive
|
||||
{ mime = "application/{,g}zip", use = [ "extract", "reveal" ] },
|
||||
{ mime = "application/x-{tar,bzip*,7z-compressed,xz,rar}", use = [ "extract", "reveal" ] },
|
||||
|
||||
# Image
|
||||
{ mime = "image/*", use = [ "open", "reveal" ] },
|
||||
{ mime = "video/*", use = [ "play", "reveal" ] },
|
||||
{ mime = "audio/*", use = [ "play", "reveal" ] },
|
||||
|
||||
# Media
|
||||
{ mime = "{audio,video}/*", use = [ "play", "reveal" ] },
|
||||
{ mime = "inode/x-empty", use = [ "edit", "reveal" ] },
|
||||
|
||||
# JSON
|
||||
{ mime = "application/json", use = [ "edit", "reveal" ] },
|
||||
{ mime = "*/javascript", use = [ "edit", "reveal" ] },
|
||||
|
||||
{ mime = "application/zip", use = [ "extract", "reveal" ] },
|
||||
{ mime = "application/gzip", use = [ "extract", "reveal" ] },
|
||||
{ mime = "application/x-tar", use = [ "extract", "reveal" ] },
|
||||
{ mime = "application/x-bzip", use = [ "extract", "reveal" ] },
|
||||
{ mime = "application/x-bzip2", use = [ "extract", "reveal" ] },
|
||||
{ mime = "application/x-7z-compressed", use = [ "extract", "reveal" ] },
|
||||
{ mime = "application/x-rar", use = [ "extract", "reveal" ] },
|
||||
{ mime = "application/xz", use = [ "extract", "reveal" ] },
|
||||
# Empty file
|
||||
{ mime = "inode/x-empty", use = [ "edit", "reveal" ] },
|
||||
|
||||
# Fallback
|
||||
{ mime = "*", use = [ "open", "reveal" ] },
|
||||
]
|
||||
|
||||
|
|
@ -83,46 +90,49 @@ suppress_preload = false
|
|||
|
||||
[plugin]
|
||||
|
||||
fetchers = [
|
||||
# Mimetype
|
||||
{ id = "mime", name = "*", run = "mime", if = "!mime", prio = "high" },
|
||||
]
|
||||
preloaders = [
|
||||
{ name = "*", cond = "!mime", exec = "mime", multi = true, prio = "high" },
|
||||
# Image
|
||||
{ mime = "image/vnd.djvu", exec = "noop" },
|
||||
{ mime = "image/*", exec = "image" },
|
||||
# example
|
||||
{ mime = "image/{avif,heic,jxl,svg+xml}", run = "magick" },
|
||||
{ mime = "image/*", run = "image" },
|
||||
# Video
|
||||
{ mime = "video/*", exec = "video" },
|
||||
{ mime = "video/*", run = "video" },
|
||||
# PDF
|
||||
{ mime = "application/pdf", exec = "pdf" },
|
||||
{ mime = "application/pdf", run = "pdf" },
|
||||
# Font
|
||||
{ mime = "font/*", run = "font" },
|
||||
{ mime = "application/vnd.ms-opentype", run = "font" },
|
||||
]
|
||||
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,javascript,x-wine-extension-ini}", run = "code" },
|
||||
# JSON
|
||||
{ mime = "application/json", exec = "json" },
|
||||
{ mime = "application/{json,x-ndjson}", run = "json" },
|
||||
# Image
|
||||
{ mime = "image/vnd.djvu", exec = "noop" },
|
||||
{ mime = "image/*", exec = "image" },
|
||||
{ mime = "image/{avif,hei?,jxl,svg+xml}", run = "magick" },
|
||||
{ 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/{,g}zip", run = "archive" },
|
||||
{ mime = "application/x-{tar,bzip*,7z-compressed,xz,rar,iso9660-image}", run = "archive" },
|
||||
# Font
|
||||
{ mime = "font/*", run = "font" },
|
||||
{ mime = "application/vnd.ms-opentype", run = "font" },
|
||||
# Fallback
|
||||
{ name = "*", exec = "file" },
|
||||
{ name = "*", run = "file" },
|
||||
]
|
||||
|
||||
[input]
|
||||
cursor_blink = false
|
||||
|
||||
# cd
|
||||
cd_title = "Change directory:"
|
||||
cd_origin = "top-center"
|
||||
|
|
@ -187,6 +197,7 @@ open_offset = [ 0, 1, 50, 7 ]
|
|||
sort_by = "none"
|
||||
sort_sensitive = false
|
||||
sort_reverse = false
|
||||
sort_translit = false
|
||||
|
||||
[log]
|
||||
enabled = false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue