feat: Add yazi config

This commit is contained in:
Fabio Lenherr / DashieTM 2023-10-09 17:08:16 +02:00
parent fc6a4dea97
commit 7cacef1705
20 changed files with 505 additions and 808 deletions

78
yazi/yazi.toml Normal file
View file

@ -0,0 +1,78 @@
[manager]
layout = [ 1, 4, 3 ]
sort_by = "modified"
sort_sensitive = true
sort_reverse = true
sort_dir_first = true
show_hidden = false
show_symlink = true
[preview]
tab_size = 2
max_width = 600
max_height = 900
cache_dir = ""
[opener]
folder = [
{ exec = 'open -R "$@"', orphan = true, display_name = "Reveal in Finder" },
{ exec = '$EDITOR "$@"', orphan = true },
]
archive = [
{ exec = 'unar "$1"', display_name = "Extract here" },
]
text = [
{ exec = '$EDITOR "$@"', orphan = true },
]
image = [
{ exec = 'imv "$@"', orphan = true, display_name = "Open" },
{ exec = '''exiftool "$1"; echo "Press enter to exit"; read''', block = true, display_name = "Show EXIF" },
]
pdf = [
{ exec = 'zathura "$@"', orphan = true, display_name = "Open" },
]
video = [
{ exec = 'mpv "$@"', orphan = true },
{ exec = '''mediainfo "$1"; echo "Press enter to exit"; read''', block = true, display_name = "Show media info" },
]
audio = [
{ exec = 'xdg-open "$@"', orphan = true },
{ exec = '''mediainfo "$1"; echo "Press enter to exit"; read''', block = true, display_name = "Show media info" },
]
fallback = [
{ exec = 'xdg-open "$@"', orphan = true, display_name = "Open" },
{ exec = 'xdg-open -R "$@"', orphan = true, display_name = "Reveal in Finder" },
]
[open]
rules = [
{ name = "*/", use = "folder" },
{ mime = "text/*", use = "text" },
{ mime = "image/*", use = "image" },
{ mime = "application/pdf", use = "pdf" },
{ mime = "video/*", use = "video" },
{ mime = "audio/*", use = "audio" },
{ mime = "inode/x-empty", use = "text" },
{ mime = "application/json", use = "text" },
{ mime = "*/javascript", use = "text" },
{ mime = "application/zip", use = "archive" },
{ mime = "application/gzip", use = "archive" },
{ mime = "application/x-tar", use = "archive" },
{ mime = "application/x-bzip", use = "archive" },
{ mime = "application/x-bzip2", use = "archive" },
{ mime = "application/x-7z-compressed", use = "archive" },
{ mime = "application/x-rar", use = "archive" },
{ mime = "*", use = "fallback" },
]
[tasks]
micro_workers = 5
macro_workers = 10
bizarre_retry = 5
[log]
enabled = false