385 lines
13 KiB
TOML
385 lines
13 KiB
TOML
# A TOML linter such as Tombi can use this schema to validate your config.
|
|
# If you encounter any problems, please file an issue at https://github.com/yazi-rs/schemas.
|
|
|
|
#:schema https://yazi-rs.github.io/schemas/yazi.json
|
|
|
|
[mgr]
|
|
ratio = [1, 2, 3]
|
|
sort_by = "alphabetical"
|
|
sort_sensitive = false
|
|
sort_reverse = false
|
|
sort_dir_first = true
|
|
sort_translit = false
|
|
sort_fallback = "alphabetical"
|
|
linemode = "none"
|
|
show_hidden = true
|
|
show_symlink = true
|
|
scrolloff = 5
|
|
mouse_events = ["click", "scroll", "drag"]
|
|
|
|
[preview]
|
|
wrap = "no"
|
|
tab_size = 2
|
|
max_width = 800
|
|
max_height = 1200
|
|
cache_dir = ""
|
|
image_delay = 30
|
|
image_filter = "triangle"
|
|
image_quality = 75
|
|
ueberzug_scale = 1
|
|
ueberzug_offset = [0, 0, 0, 0]
|
|
|
|
[opener]
|
|
edit = [
|
|
{ run = "${EDITOR:-vi} %s", desc = "$EDITOR", for = "unix", block = true },
|
|
{ run = "code %s", desc = "code", for = "windows", orphan = true },
|
|
{ run = "code -w %s", desc = "code (block)", for = "windows", block = true },
|
|
]
|
|
play = [
|
|
{ run = "xdg-open %s1", desc = "Play", for = "linux", orphan = true },
|
|
{ run = "open %s", desc = "Play", for = "macos" },
|
|
{ run = 'start "" %s1', desc = "Play", for = "windows", orphan = true },
|
|
{ run = "termux-open %s1", desc = "Play", for = "android" },
|
|
{ run = "mediainfo %s1; echo 'Press enter to exit'; read _", block = true, desc = "Show media info", for = "unix" },
|
|
{ run = "mediainfo %s1 & pause", block = true, desc = "Show media info", for = "windows" },
|
|
]
|
|
open = [
|
|
{ run = "xdg-open %s1", desc = "Open", for = "linux" },
|
|
{ run = "open %s", desc = "Open", for = "macos" },
|
|
{ run = 'start "" %s1', desc = "Open", for = "windows", orphan = true },
|
|
{ run = "termux-open %s1", desc = "Open", for = "android" },
|
|
]
|
|
reveal = [
|
|
{ run = "xdg-open %d1", desc = "Reveal", for = "linux" },
|
|
{ run = "open -R %s1", desc = "Reveal", for = "macos" },
|
|
{ run = "explorer /select,%s1", desc = "Reveal", for = "windows", orphan = true },
|
|
{ run = "termux-open %d1", desc = "Reveal", for = "android" },
|
|
{ run = "clear; exiftool %s1; echo 'Press enter to exit'; read _", desc = "Show EXIF", for = "unix", block = true },
|
|
]
|
|
extract = [{ run = "ya pub extract --list %s", desc = "Extract here" }]
|
|
download = [
|
|
{ run = "ya emit download --open %S", desc = "Download and open" },
|
|
{ run = "ya emit download %S", desc = "Download" },
|
|
]
|
|
trash = [
|
|
{ run = "ya pub trash-restore --list %S", desc = "Restore selected files" },
|
|
{ run = "ya pub trash-empty --list %S", desc = "Empty trash bin" },
|
|
]
|
|
|
|
[open]
|
|
rules = [
|
|
# Folder
|
|
{ url = "*/", use = [
|
|
"edit",
|
|
"open",
|
|
"reveal",
|
|
] },
|
|
# Text
|
|
{ mime = "text/*", use = [
|
|
"edit",
|
|
"reveal",
|
|
] },
|
|
# Image
|
|
{ mime = "image/*", use = [
|
|
"open",
|
|
"reveal",
|
|
] },
|
|
# Media
|
|
{ mime = "{audio,video}/*", use = [
|
|
"play",
|
|
"reveal",
|
|
] },
|
|
# Code
|
|
{ mime = "application/{tex,json,ndjson,javascript,wine-extension-ini}", use = [
|
|
"edit",
|
|
"reveal",
|
|
] },
|
|
# Archive
|
|
{ mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", use = [
|
|
"extract",
|
|
"reveal",
|
|
] },
|
|
# Empty file
|
|
{ mime = "inode/empty", use = [
|
|
"edit",
|
|
"reveal",
|
|
] },
|
|
# Virtual file system
|
|
{ mime = "vfs/{absent,stale}", use = "download" },
|
|
# Trash
|
|
{ mime = "trash/**", use = [
|
|
"open",
|
|
"trash",
|
|
] },
|
|
# Fallback
|
|
{ url = "*", use = [
|
|
"open",
|
|
"reveal",
|
|
] },
|
|
]
|
|
|
|
[tasks]
|
|
file_workers = 3
|
|
plugin_workers = 5
|
|
fetch_workers = 5
|
|
preload_workers = 2
|
|
process_workers = 5
|
|
bizarre_retry = 3
|
|
# image_alloc = 536870912 # 512MB
|
|
image_bound = [10000, 10000]
|
|
suppress_preload = false
|
|
image_alloc = 1073741824 # = 1024*1024*1024 = 1024MB
|
|
|
|
[plugin]
|
|
fetchers = [
|
|
# MIME-type
|
|
{ url = "*/", run = "mime.dir", prio = "high", group = "mime" },
|
|
{ url = "local://*", run = "mime.local", prio = "high", group = "mime" },
|
|
{ url = "trash://*", run = "mime.trash", prio = "high", group = "mime" },
|
|
{ url = "remote://*", run = "mime.remote", prio = "high", group = "mime" },
|
|
# ### current-size ###
|
|
# { id = "current-size", name = "*/", run = "current-size", prio = "normal" },
|
|
# { id = "current-size", name = "*", run = "current-size", prio = "normal" },
|
|
]
|
|
|
|
prepend_fetchers = [
|
|
#####################################################################
|
|
### git ###
|
|
#####################################################################
|
|
{ url = "*", run = "git", group = "git" },
|
|
{ url = "*/", run = "git", group = "git" },
|
|
#####################################################################
|
|
### mime-ext ###
|
|
#####################################################################
|
|
{ url = "local://*", run = "mime-ext.local", prio = "high", group = "mime" },
|
|
{ url = "remote://*", run = "mime-ext.remote", prio = "high", group = "mime" },
|
|
]
|
|
|
|
|
|
spotters = [
|
|
# Multi-file
|
|
{ mime = "multi/*", run = "multi" },
|
|
# Trash
|
|
{ mime = "trash/**", run = "trash" },
|
|
# Folder
|
|
{ url = "*/", run = "folder" },
|
|
# Code
|
|
{ mime = "text/*", run = "code" },
|
|
{ mime = "application/{mbox,javascript,wine-extension-ini}", run = "code" },
|
|
# Image
|
|
{ mime = "image/{avif,hei?,jxl}", run = "magick" },
|
|
{ mime = "image/svg+xml", run = "svg" },
|
|
{ mime = "image/*", run = "image" },
|
|
# Video
|
|
{ mime = "video/*", run = "video" },
|
|
# Virtual file system
|
|
{ mime = "vfs/*", run = "vfs" },
|
|
# Error
|
|
{ mime = "null/*", run = "null" },
|
|
# Fallback
|
|
{ url = "*", run = "file" },
|
|
]
|
|
|
|
append_spotters = [{ url = "*", run = "file-extra-metadata" }]
|
|
|
|
preloaders = [
|
|
# Image
|
|
{ mime = "image/{avif,hei?,jxl}", run = "magick" },
|
|
{ mime = "image/svg+xml", run = "svg" },
|
|
{ mime = "image/*", run = "image" },
|
|
# Video
|
|
{ mime = "video/*", run = "video" },
|
|
# PDF
|
|
{ mime = "application/pdf", run = "pdf" },
|
|
# Font
|
|
{ mime = "font/*", run = "font" },
|
|
{ mime = "application/ms-opentype", run = "font" },
|
|
# Trash
|
|
{ mime = "trash/**", run = "trash" },
|
|
]
|
|
|
|
prepend_preloaders = [
|
|
#####################################################################
|
|
### piper ###
|
|
#####################################################################
|
|
{ url = "*.md", run = 'faster-piper -- CLICOLOR_FORCE=1 glow -w=$w -s=dracula -- "$1"' },
|
|
{ url = "*.tar*", run = 'faster-piper -- tar tf "$1"' },
|
|
{ url = "*.txt.gz", run = 'faster-piper -- gzip -dc "$1"' },
|
|
#####################################################################
|
|
### mediainfo ###
|
|
#####################################################################
|
|
# Replace magick, image, video with mediainfo
|
|
{ mime = "{audio,video,image}/*", run = "mediainfo" },
|
|
# .srt subtitle, adobe illustrator, adobe photoshop file
|
|
{ mime = "application/{subrip,postscript,illustrator,dvb.ait,vnd.adobe.illustrator,eps}", run = "mediainfo" },
|
|
# Sometimes AI file is recognized as "application/pdf". Lmao.
|
|
# In this case use file extension instead:
|
|
{ url = "*.{ai,eps,ait}", run = "mediainfo" },
|
|
# Hide metadata by default.
|
|
# Example for image mimetype:
|
|
{ mime = "{image}/*", run = "mediainfo --no-metadata" },
|
|
# Hide image preview by default.
|
|
# Example for video mimetype:
|
|
{ mime = "{video}/*", run = "mediainfo --no-preview" },
|
|
# NOTE: Use both --no-metadata and --no-preview will display nothing. :)
|
|
# Make sure both of your previewers and preloaders has the same arguments (--no-metadata and --no-preview)
|
|
]
|
|
|
|
previewers = [
|
|
{ url = "*/", run = "folder" },
|
|
# Code
|
|
{ mime = "text/*", run = "code" },
|
|
{ mime = "application/{mbox,javascript,wine-extension-ini}", run = "code" },
|
|
# JSON
|
|
{ mime = "application/{json,ndjson}", run = "json" },
|
|
# Image
|
|
{ mime = "image/{avif,hei?,jxl}", run = "magick" },
|
|
{ mime = "image/svg+xml", run = "svg" },
|
|
{ mime = "image/*", run = "image" },
|
|
# Video
|
|
{ mime = "video/*", run = "video" },
|
|
# PDF
|
|
{ mime = "application/pdf", run = "pdf" },
|
|
# Archive
|
|
{ mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", run = "archive" },
|
|
{ mime = "application/{debian*-package,redhat-package-manager,rpm,android.package-archive}", run = "archive" },
|
|
{ url = "*.{AppImage,appimage}", run = "archive" },
|
|
# Virtual Disk / Disk Image
|
|
{ mime = "application/{iso9660-image,qemu-disk,ms-wim,apple-diskimage}", run = "archive" },
|
|
{ mime = "application/virtualbox-{vhd,vhdx}", run = "archive" },
|
|
{ url = "*.{img,fat,ext,ext2,ext3,ext4,squashfs,ntfs,hfs,hfsx}", run = "archive" },
|
|
# Font
|
|
{ mime = "font/*", run = "font" },
|
|
{ mime = "application/ms-opentype", run = "font" },
|
|
# Empty file
|
|
{ mime = "inode/empty", run = "empty" },
|
|
# Virtual file system
|
|
{ mime = "vfs/*", run = "vfs" },
|
|
# Trash
|
|
{ mime = "trash/**", run = "trash" },
|
|
# Error
|
|
{ mime = "null/*", run = "null" },
|
|
# Fallback
|
|
{ url = "*", run = "file" },
|
|
]
|
|
|
|
append_previewers = [
|
|
#####################################################################
|
|
### extra-metadata ###
|
|
#####################################################################
|
|
{ url = "*", run = "file-extra-metadata" },
|
|
# Setup keybind for spotter: https://github.com/sxyazi/yazi/pull/1802
|
|
]
|
|
|
|
prepend_previewers = [
|
|
####################################################################
|
|
### piper ###
|
|
#####################################################################
|
|
{ url = "*.md", run = 'faster-piper -- CLICOLOR_FORCE=1 glow -w=$w -s=dracula -- "$1"' },
|
|
{ url = "*.tar*", run = 'faster-piper -- tar tf "$1"' },
|
|
{ url = "*.txt.gz", run = 'faster-piper -- gzip -dc "$1"' },
|
|
####################################################################
|
|
### rich-preview ###
|
|
#####################################################################
|
|
{ url = "*.csv", run = "rich-preview" }, # for csv files
|
|
{ url = "*.md", run = "rich-preview" }, # for markdown (.md) files
|
|
{ url = "*.rst", run = "rich-preview" }, # for restructured text (.rst) files
|
|
{ url = "*.ipynb", run = "rich-preview" }, # for jupyter notebooks (.ipynb)
|
|
{ url = "*.json", run = "rich-preview" }, # for json (.json) files
|
|
# { url = "*.lang_type", run = "rich-preview"} # for particular language files eg. .py, .go., .lua, etc.
|
|
#####################################################################
|
|
### eza-preview ###
|
|
#####################################################################
|
|
{ url = "*/", run = "eza-preview" },
|
|
#####################################################################
|
|
### mediainfo ###
|
|
#####################################################################
|
|
# Replace magick, image, video with mediainfo
|
|
{ mime = "{audio,video,image}/*", run = "mediainfo" },
|
|
# .srt subtitle, adobe illustrator, adobe photoshop file
|
|
{ mime = "application/{subrip,postscript,illustrator,dvb.ait,vnd.adobe.illustrator,eps}", run = "mediainfo" },
|
|
# Sometimes AI file is recognized as "application/pdf". Lmao.
|
|
# In this case use file extension instead:
|
|
{ url = "*.{ai,eps,ait}", run = "mediainfo" },
|
|
# Hide metadata by default.
|
|
# Example for image mimetype:
|
|
{ mime = "{image}/*", run = "mediainfo --no-metadata" },
|
|
# Hide image preview by default.
|
|
# Example for video mimetype:
|
|
{ mime = "{video}/*", run = "mediainfo --no-preview" },
|
|
# NOTE: Use both --no-metadata and --no-preview will display nothing. :)
|
|
# Make sure both of your previewers and preloaders has the same arguments (--no-metadata and --no-preview)
|
|
]
|
|
|
|
[input]
|
|
cursor_blink = false
|
|
|
|
# cd
|
|
cd_title = "Change directory:"
|
|
cd_origin = "top-center"
|
|
cd_offset = [0, 2, 50, 3]
|
|
|
|
# create
|
|
create_title = ["Create:", "Create (dir):"]
|
|
create_origin = "top-center"
|
|
create_offset = [0, 2, 50, 3]
|
|
|
|
# rename
|
|
rename_title = "Rename:"
|
|
rename_origin = "hovered"
|
|
rename_offset = [0, 1, 50, 3]
|
|
|
|
# filter
|
|
filter_title = "Filter:"
|
|
filter_origin = "top-center"
|
|
filter_offset = [0, 2, 50, 3]
|
|
|
|
# find
|
|
find_title = ["Find next:", "Find previous:"]
|
|
find_origin = "top-center"
|
|
find_offset = [0, 2, 50, 3]
|
|
|
|
# search
|
|
search_title = "Search via {n}:"
|
|
search_origin = "top-center"
|
|
search_offset = [0, 2, 50, 3]
|
|
|
|
# shell
|
|
shell_title = ["Shell:", "Shell (block):"]
|
|
shell_origin = "top-center"
|
|
shell_offset = [0, 2, 50, 3]
|
|
|
|
[confirm]
|
|
# trash
|
|
trash_title = "Trash {n} selected file{s}?"
|
|
trash_origin = "center"
|
|
trash_offset = [0, 0, 70, 20]
|
|
|
|
# delete
|
|
delete_title = "Permanently delete {n} selected file{s}?"
|
|
delete_origin = "center"
|
|
delete_offset = [0, 0, 70, 20]
|
|
|
|
# overwrite
|
|
overwrite_title = "Overwrite file?"
|
|
overwrite_body = "Will overwrite the following file:"
|
|
overwrite_origin = "center"
|
|
overwrite_offset = [0, 0, 50, 15]
|
|
|
|
# quit
|
|
quit_title = "Quit?"
|
|
quit_body = "There are unfinished tasks, quit anyway?\n(Open task manager with default key 'w')"
|
|
quit_origin = "center"
|
|
quit_offset = [0, 0, 50, 15]
|
|
|
|
[pick]
|
|
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
|