yazi/config/preset/yazi.toml
2023-08-12 23:08:39 +08:00

63 lines
1.7 KiB
TOML

[manager]
sort_by = "modified"
sort_reverse = true
sort_dir_first = true
show_hidden = false
[preview]
tab_size = 2
max_width = 600
max_height = 900
[opener]
folder = [
{ exec = 'open -R "$@"', display_name = "Reveal in Finder" },
{ exec = 'vim "$@"' },
]
archive = [
{ exec = 'unar "$1"', display_name = "Extract here" },
]
text = [
{ exec = 'vim "$@"', block = true },
]
image = [
{ exec = 'open "$@"', display_name = "Open" },
{ exec = '''exiftool "$1"; echo "Press enter to exit"; read''', block = true, display_name = "Show EXIF" },
]
video = [
{ exec = 'mpv "$@"' },
{ exec = '''mediainfo "$1"; echo "Press enter to exit"; read''', block = true, display_name = "Show media info" },
]
audio = [
{ exec = 'mpv "$@"' },
{ exec = '''mediainfo "$1"; echo "Press enter to exit"; read''', block = true, display_name = "Show media info" },
]
fallback = [
{ exec = 'open "$@"', display_name = "Open" },
{ exec = 'open -R "$@"', display_name = "Reveal in Finder" },
]
[open]
rules = [
{ name = "*/", use = "folder" },
{ name = "*.html", use = "fallback" },
{ mime = "text/*", use = "text" },
{ mime = "image/*", use = "image" },
{ mime = "video/*", use = "video" },
{ mime = "audio/*", use = "audio" },
{ mime = "inode/x-empty", use = "text" },
{ mime = "application/json", use = "text" },
{ mime = "application/x-bzip", use = "archive" },
{ mime = "application/x-bzip2", use = "archive" },
{ mime = "application/gzip", use = "archive" },
{ mime = "application/vnd.rar", use = "archive" },
{ mime = "application/x-tar", use = "archive" },
{ mime = "application/zip", use = "archive" },
{ mime = "application/x-7z-compressed", use = "archive" },
]
[log]
enabled = false