159 lines
5.1 KiB
TOML
159 lines
5.1 KiB
TOML
# A TOML linter such as https://taplo.tamasfe.dev/ can use this schema to validate your config.
|
|
# If you encounter any issues, please make an issue at https://github.com/yazi-rs/schemas.
|
|
"$schema" = "https://yazi-rs.github.io/schemas/yazi.json"
|
|
|
|
[mgr]
|
|
ratio = [2, 4, 4]
|
|
sort_by = "natural"
|
|
sort_sensitive = false
|
|
sort_reverse = false
|
|
sort_dir_first = true
|
|
sort_translit = false
|
|
linemode = "size"
|
|
show_hidden = true
|
|
show_symlink = true
|
|
scrolloff = 5
|
|
mouse_events = ["click", "scroll"]
|
|
title_format = "Yazi: {cwd}"
|
|
|
|
[preview]
|
|
tab_size = 4
|
|
max_width = 600
|
|
max_height = 900
|
|
cache_dir = ""
|
|
# image_delay = 30
|
|
image_filter = "triangle"
|
|
image_quality = 75
|
|
sixel_fraction = 15
|
|
ueberzug_scale = 1
|
|
ueberzug_offset = [0, 0, 0, 0]
|
|
|
|
[opener]
|
|
edit = [
|
|
{ run = '${EDITOR:-vi} "$@"', desc = "$EDITOR", block = true, for = "unix" },
|
|
{ run = 'code %*', orphan = true, desc = "code", for = "windows" },
|
|
{ run = 'code -w %*', block = true, desc = "code (block)", for = "windows" },
|
|
]
|
|
open = [
|
|
{ run = 'xdg-open "$1"', desc = "Open", for = "linux" },
|
|
{ run = 'open "$@"', desc = "Open", for = "macos" },
|
|
{ run = 'start "" "%1"', orphan = true, desc = "Open", for = "windows" },
|
|
]
|
|
reveal = [
|
|
{ run = 'xdg-open "$(dirname "$1")"', desc = "Reveal", for = "linux" },
|
|
{ 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 = [
|
|
{ run = 'ouch d -y "%*"', desc = "Extract here with ouch", for = "windows" },
|
|
{ run = 'ouch d -y "$@"', desc = "Extract here with ouch", for = "unix" },
|
|
]
|
|
play = [
|
|
{ run = 'mpv --force-window "$@"', orphan = true, for = "unix" },
|
|
{ run = 'mpv --force-window %*', 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"] },
|
|
# Image
|
|
{ mime = "image/*", use = ["open", "reveal"] },
|
|
# Media
|
|
{ mime = "{audio,video}/*", use = ["play", "reveal"] },
|
|
# Archive
|
|
{ mime = "application/{,g}zip", use = ["extract", "reveal"] },
|
|
{ mime = "application/x-{tar,bzip*,7z-compressed,xz,rar}", use = ["extract", "reveal"] },
|
|
# JSON
|
|
{ mime = "application/{json,x-ndjson,jsonl}", use = ["edit", "reveal"] },
|
|
{ mime = "*/javascript", use = ["edit", "reveal"] },
|
|
# Empty file
|
|
{ mime = "inode/x-empty", use = ["edit", "reveal"] },
|
|
# Fallback
|
|
{ name = "*", use = ["open", "reveal"] },
|
|
]
|
|
|
|
[tasks]
|
|
micro_workers = 10
|
|
macro_workers = 25
|
|
bizarre_retry = 5
|
|
image_alloc = 536870912 # 512MB
|
|
image_bound = [0, 0]
|
|
suppress_preload = false
|
|
|
|
[plugin]
|
|
fetchers = [
|
|
# Mimetype
|
|
{ id = "mime", name = "*", run = "mime", if = "!mime", prio = "high" },
|
|
]
|
|
preloaders = [
|
|
# Image
|
|
{ mime = "image/{avif,hei?,jxl,svg+xml}", run = "magick" },
|
|
{ mime = "image/*", run = "image" },
|
|
# Video
|
|
{ mime = "video/*", run = "video" },
|
|
# PDF
|
|
{ mime = "application/pdf", run = "pdf" },
|
|
# Font
|
|
{ mime = "font/*", run = "font" },
|
|
{ mime = "application/vnd.ms-opentype", run = "font" },
|
|
]
|
|
previewers = [
|
|
{ name = "*/", run = "folder", sync = true },
|
|
# Code
|
|
{ mime = "text/*", run = "code" },
|
|
{ mime = "*/{xml,javascript,x-wine-extension-ini}", run = "code" },
|
|
# JSON
|
|
{ mime = "application/{json,x-ndjson}", run = "json" },
|
|
# Image
|
|
{ mime = "image/{avif,hei?,jxl,svg+xml}", run = "magick" },
|
|
{ mime = "image/*", run = "image" },
|
|
# Video
|
|
{ mime = "video/*", run = "video" },
|
|
# PDF
|
|
{ mime = "application/pdf", run = "pdf" },
|
|
# 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" },
|
|
# Empty file
|
|
{ mime = "inode/x-empty", run = "empty" },
|
|
# Fallback
|
|
{ name = "*", run = "file" },
|
|
]
|
|
prepend_previewers = [
|
|
{ mime = "application/*zip", run = "ouch" },
|
|
{ mime = "application/x-tar", run = "ouch" },
|
|
{ mime = "application/x-bzip2", run = "ouch" },
|
|
{ mime = "application/x-7z-compressed", run = "ouch" },
|
|
{ mime = "application/x-rar", run = "ouch" },
|
|
{ mime = "application/x-xz", run = "ouch" },
|
|
{ name = "*.csv", run = "rich-preview"}, # for csv files
|
|
{ name = "*.md", run = "rich-preview" }, # for markdown (.md) files
|
|
{ name = "*.rst", run = "rich-preview"}, # for restructured text (.rst) files
|
|
{ name = "*.ipynb", run = "rich-preview"}, # for jupyter notebooks (.ipynb)
|
|
{ name = "*.json", run = "rich-preview"}, # for json (.json) files
|
|
{ name = "*.jsonl", run = "rich-preview"}, # for json (.json) files
|
|
{ name = "*/", run = "eza-preview"}
|
|
]
|
|
|
|
[select]
|
|
open_title = "Open with:"
|
|
open_origin = "hovered"
|
|
open_offset = [0, 1, 50, 7]
|
|
|
|
[which]
|
|
sort_by = "none"
|
|
sort_sensitive = false
|
|
sort_reverse = false
|
|
sort_translit = false
|
|
|
|
[log]
|
|
enabled = false
|