neodotfiles/config/yazi/yazi.toml

202 lines
5.6 KiB
TOML
Raw Permalink Normal View History

2024-03-27 06:07:02 +00:00
# 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"
[manager]
ratio = [ 1, 4, 3 ]
sort_by = "natural"
2024-03-27 06:07:02 +00:00
sort_sensitive = false
2024-09-28 03:08:07 +00:00
sort_reverse = false
2024-07-26 17:43:09 +00:00
sort_dir_first = true
2024-09-28 03:08:07 +00:00
sort_translit = false
2024-03-27 06:07:02 +00:00
linemode = "none"
show_hidden = false
show_symlink = true
scrolloff = 5
2024-09-28 03:08:07 +00:00
mouse_events = [ "click", "scroll" ]
title_format = "Yazi: {cwd}"
2024-03-27 06:07:02 +00:00
[preview]
tab_size = 2
max_width = 600
max_height = 900
cache_dir = ""
image_filter = "triangle"
image_quality = 75
sixel_fraction = 15
ueberzug_scale = 1
ueberzug_offset = [ 0, 0, 0, 0 ]
[opener]
edit = [
2024-09-28 03:08:07 +00:00
{ 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" },
2024-03-27 06:07:02 +00:00
]
open = [
2024-09-28 03:08:07 +00:00
{ run = 'xdg-open "$1"', desc = "Open", for = "linux" },
{ run = 'open "$@"', desc = "Open", for = "macos" },
{ run = 'start "" "%1"', orphan = true, desc = "Open", for = "windows" },
2024-03-27 06:07:02 +00:00
]
reveal = [
2024-09-28 03:08:07 +00:00
{ 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" },
2024-03-27 06:07:02 +00:00
{ run = '''exiftool "$1"; echo "Press enter to exit"; read _''', block = true, desc = "Show EXIF", for = "unix" },
]
extract = [
2024-09-28 03:08:07 +00:00
{ run = 'ya pub extract --list "$@"', desc = "Extract here", for = "unix" },
{ run = 'ya pub extract --list %*', desc = "Extract here", for = "windows" },
2024-03-27 06:07:02 +00:00
]
play = [
2024-09-28 03:08:07 +00:00
{ run = 'mpv --force-window "$@"', orphan = true, for = "unix" },
{ run = 'mpv --force-window %*', orphan = true, for = "windows" },
2024-03-27 06:07:02 +00:00
{ run = '''mediainfo "$1"; echo "Press enter to exit"; read _''', block = true, desc = "Show media info", for = "unix" },
]
[open]
rules = [
2024-09-28 03:08:07 +00:00
# Folder
2024-03-27 06:07:02 +00:00
{ name = "*/", use = [ "edit", "open", "reveal" ] },
2024-09-28 03:08:07 +00:00
# Text
{ mime = "text/*", use = [ "edit", "reveal" ] },
# Image
2024-03-27 06:07:02 +00:00
{ mime = "image/*", use = [ "open", "reveal" ] },
2024-09-28 03:08:07 +00:00
# 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}", use = [ "edit", "reveal" ] },
{ mime = "*/javascript", use = [ "edit", "reveal" ] },
# Empty file
2024-03-27 06:07:02 +00:00
{ mime = "inode/x-empty", use = [ "edit", "reveal" ] },
2024-09-28 03:08:07 +00:00
# Fallback
{ name = "*", use = [ "open", "reveal" ] },
2024-03-27 06:07:02 +00:00
]
[tasks]
micro_workers = 10
macro_workers = 25
bizarre_retry = 5
image_alloc = 536870912 # 512MB
image_bound = [ 0, 0 ]
suppress_preload = false
[plugin]
2024-09-28 03:08:07 +00:00
fetchers = [
# Mimetype
{ id = "mime", name = "*", run = "mime", if = "!mime", prio = "high" },
]
2024-03-27 06:07:02 +00:00
preloaders = [
# Image
2024-09-28 03:08:07 +00:00
{ mime = "image/{avif,hei?,jxl,svg+xml}", run = "magick" },
{ mime = "image/*", run = "image" },
2024-03-27 06:07:02 +00:00
# Video
{ mime = "video/*", run = "video" },
# PDF
{ mime = "application/pdf", run = "pdf" },
2024-09-28 03:08:07 +00:00
# Font
{ mime = "font/*", run = "font" },
{ mime = "application/vnd.ms-opentype", run = "font" },
2024-03-27 06:07:02 +00:00
]
previewers = [
{ name = "*/", run = "folder", sync = true },
# Code
2024-09-28 03:08:07 +00:00
{ mime = "text/*", run = "code" },
{ mime = "*/{xml,javascript,x-wine-extension-ini}", run = "code" },
2024-03-27 06:07:02 +00:00
# JSON
2024-09-28 03:08:07 +00:00
{ mime = "application/{json,x-ndjson}", run = "json" },
2024-03-27 06:07:02 +00:00
# Image
2024-09-28 03:08:07 +00:00
{ mime = "image/{avif,hei?,jxl,svg+xml}", run = "magick" },
{ mime = "image/*", run = "image" },
2024-03-27 06:07:02 +00:00
# Video
{ mime = "video/*", run = "video" },
# PDF
{ mime = "application/pdf", run = "pdf" },
# Archive
2024-09-28 03:08:07 +00:00
{ 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" },
2024-03-27 06:07:02 +00:00
# Fallback
{ name = "*", run = "file" },
]
[input]
2024-09-28 03:08:07 +00:00
cursor_blink = false
2024-03-27 06:07:02 +00:00
# cd
cd_title = "Change directory:"
cd_origin = "top-center"
cd_offset = [ 0, 2, 50, 3 ]
# create
create_title = "Create:"
create_origin = "top-center"
create_offset = [ 0, 2, 50, 3 ]
# rename
rename_title = "Rename:"
rename_origin = "hovered"
rename_offset = [ 0, 1, 50, 3 ]
# trash
trash_title = "Move {n} selected file{s} to trash? (y/N)"
trash_origin = "top-center"
trash_offset = [ 0, 2, 50, 3 ]
# delete
delete_title = "Delete {n} selected file{s} permanently? (y/N)"
delete_origin = "top-center"
delete_offset = [ 0, 2, 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 ]
# overwrite
overwrite_title = "Overwrite an existing file? (y/N)"
overwrite_origin = "top-center"
overwrite_offset = [ 0, 2, 50, 3 ]
# quit
quit_title = "{n} task{s} running, sure to quit? (y/N)"
quit_origin = "top-center"
quit_offset = [ 0, 2, 50, 3 ]
[select]
open_title = "Open with:"
open_origin = "hovered"
open_offset = [ 0, 1, 50, 7 ]
[which]
2024-09-28 03:08:07 +00:00
sort_by = "none"
2024-03-27 06:07:02 +00:00
sort_sensitive = false
2024-09-28 03:08:07 +00:00
sort_reverse = false
sort_translit = false
2024-03-27 06:07:02 +00:00
[log]
enabled = false