mirror of
https://github.com/sxyazi/yazi.git
synced 2026-05-13 08:16:40 +00:00
Some checks failed
Cachix / Publish Flake (push) Has been cancelled
Cachix / Publish Flake-1 (push) Has been cancelled
Check / clippy (push) Has been cancelled
Check / rustfmt (push) Has been cancelled
Check / stylua (push) Has been cancelled
Draft / build-unix (gcc-aarch64-linux-gnu, ubuntu-latest, aarch64-unknown-linux-gnu) (push) Has been cancelled
Draft / build-unix (gcc-i686-linux-gnu, ubuntu-latest, i686-unknown-linux-gnu) (push) Has been cancelled
Draft / build-unix (gcc-riscv64-linux-gnu, ubuntu-latest, riscv64gc-unknown-linux-gnu) (push) Has been cancelled
Draft / build-unix (gcc-sparc64-linux-gnu, ubuntu-latest, sparc64-unknown-linux-gnu) (push) Has been cancelled
Draft / build-unix (macos-latest, aarch64-apple-darwin) (push) Has been cancelled
Draft / build-unix (macos-latest, x86_64-apple-darwin) (push) Has been cancelled
Draft / build-unix (ubuntu-latest, x86_64-unknown-linux-gnu) (push) Has been cancelled
Draft / build-windows (windows-latest, aarch64-pc-windows-msvc) (push) Has been cancelled
Draft / build-windows (windows-latest, x86_64-pc-windows-msvc) (push) Has been cancelled
Draft / build-musl (aarch64-unknown-linux-musl) (push) Has been cancelled
Draft / build-musl (x86_64-unknown-linux-musl) (push) Has been cancelled
Draft / build-snap (amd64, ubuntu-latest) (push) Has been cancelled
Draft / build-snap (arm64, ubuntu-24.04-arm) (push) Has been cancelled
Test / test (macos-latest) (push) Has been cancelled
Test / test (ubuntu-latest) (push) Has been cancelled
Test / test (windows-latest) (push) Has been cancelled
Draft / snap (push) Has been cancelled
Draft / draft (push) Has been cancelled
Draft / nightly (push) Has been cancelled
Co-authored-by: sxyazi <sxyazi@gmail.com>
247 lines
7.3 KiB
TOML
247 lines
7.3 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, 4, 3 ]
|
|
sort_by = "alphabetical"
|
|
sort_sensitive = false
|
|
sort_reverse = false
|
|
sort_dir_first = true
|
|
sort_translit = false
|
|
sort_fallback = "alphabetical"
|
|
linemode = "none"
|
|
show_hidden = false
|
|
show_symlink = true
|
|
scrolloff = 5
|
|
mouse_events = [ "click", "scroll", "drag" ]
|
|
|
|
[preview]
|
|
wrap = "no"
|
|
tab_size = 2
|
|
max_width = 600
|
|
max_height = 900
|
|
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" },
|
|
]
|
|
|
|
[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/{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" },
|
|
# 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
|
|
|
|
[plugin]
|
|
fetchers = [
|
|
# MIME-type
|
|
{ url = "*/", run = "mime.dir", prio = "high", group = "mime" },
|
|
{ url = "local://*", run = "mime.local", prio = "high", group = "mime" },
|
|
{ url = "remote://*", run = "mime.remote", prio = "high", group = "mime" },
|
|
]
|
|
spotters = [
|
|
# Multi-file
|
|
{ mime = "multi/*", run = "multi" },
|
|
# 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" },
|
|
]
|
|
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" },
|
|
]
|
|
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" },
|
|
# Error
|
|
{ mime = "null/*", run = "null" },
|
|
# Fallback
|
|
{ url = "*", run = "file" },
|
|
]
|
|
|
|
[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
|