add yazi
This commit is contained in:
parent
ad286ec3f7
commit
04e857d96e
9 changed files with 800 additions and 0 deletions
120
.config/yazi/yazi.toml
Normal file
120
.config/yazi/yazi.toml
Normal file
|
@ -0,0 +1,120 @@
|
|||
[manager]
|
||||
ratio = [1, 4, 3]
|
||||
sort_by = "natural"
|
||||
sort_sensitive=false
|
||||
|
||||
#sort_dir_first=true
|
||||
sort_dir_first=false
|
||||
|
||||
#linemode="mtime"
|
||||
linemode="size"
|
||||
|
||||
show_hidden=false
|
||||
show_symlink=true
|
||||
|
||||
[opener]
|
||||
edit = [
|
||||
{ exec = '$EDITOR "$@"', block = true, desc="Edit", for = "unix" },
|
||||
]
|
||||
open = [
|
||||
{ exec = 'xdg-open "$@"', desc = "Open", for = "linux" },
|
||||
{ exec = 'open "$@"', desc = "Open", for = "macos" },
|
||||
{ exec = 'start "" "%1"', orphan = true, desc = "Open", for = "windows" }
|
||||
]
|
||||
extract = [
|
||||
{ exec = '7z x "$1"', desc = "Extract here", for = "unix" },
|
||||
]
|
||||
play = [
|
||||
{ exec = 'mpv "$@"', orphan = true, desc = "Play", for = "unix" },
|
||||
{ exec = 'mpv "%1"', orphan = true, desc = "Play", for = "windows" },
|
||||
]
|
||||
info = [
|
||||
{ exec = '''ffprobe -hide_banner "$1"; echo "Press enter to exit"; read''', block = true, desc = "Show ffprobe info", for = "unix" },
|
||||
{ exec = '''ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "$1"; echo "Press enter to exit"; read''', block = true, desc = "Show duration", for = "unix"}
|
||||
]
|
||||
|
||||
[open]
|
||||
rules = [
|
||||
{ name = "*/", use = [ "edit", "open" ] },
|
||||
|
||||
{ mime = "text/*", use = [ "edit" ] },
|
||||
{ mime = "image/*", use = [ "open" ] },
|
||||
{ mime = "video/*", use = [ "play", "info" ] },
|
||||
{ mime = "audio/*", use = [ "play", "info" ] },
|
||||
{ mime = "inode/x-empty", use = [ "edit" ] },
|
||||
|
||||
{ mime = "application/json", use = [ "edit" ] },
|
||||
{ mime = "*/javascript", use = [ "edit" ] },
|
||||
|
||||
{ mime = "application/zip", use = [ "extract" ] },
|
||||
{ mime = "application/gzip", use = [ "extract" ] },
|
||||
{ mime = "application/x-tar", use = [ "extract" ] },
|
||||
{ mime = "application/x-bzip", use = [ "extract" ] },
|
||||
{ mime = "application/x-bzip2", use = [ "extract" ] },
|
||||
{ mime = "application/x-7z-compressed", use = [ "extract" ] },
|
||||
{ mime = "application/x-rar", use = [ "extract" ] },
|
||||
{ mime = "application/xz", use = [ "extract" ] },
|
||||
|
||||
{ mime = "*", use = [ "open" ] },
|
||||
]
|
||||
|
||||
[tasks]
|
||||
micro_workers = 10
|
||||
macro_workers = 25
|
||||
bizarre_retry = 5
|
||||
image_alloc = 536870912 # 512MB
|
||||
image_bound = [ 0, 0 ]
|
||||
suppress_preload = false
|
||||
|
||||
[plugin]
|
||||
prepend_previewers = [
|
||||
{ name = "*.md", exec = "glow" },
|
||||
]
|
||||
|
||||
preloaders = [
|
||||
{ name = "*", cond = "!mime", exec = "mime", multi = true, prio = "high" },
|
||||
# Image
|
||||
{ mime = "image/vnd.djvu", exec = "noop" },
|
||||
{ mime = "image/*", exec = "image" },
|
||||
# Video
|
||||
{ mime = "video/*", exec = "video" },
|
||||
# PDF
|
||||
{ mime = "application/pdf", exec = "pdf" },
|
||||
]
|
||||
previewers = [
|
||||
{ name = "*/", exec = "folder", sync = true },
|
||||
# Code
|
||||
{ mime = "text/*", exec = "code" },
|
||||
{ mime = "*/xml", exec = "code" },
|
||||
{ mime = "*/javascript", exec = "code" },
|
||||
{ mime = "*/x-wine-extension-ini", exec = "code" },
|
||||
# JSON
|
||||
{ mime = "application/json", exec = "json" },
|
||||
# Image
|
||||
{ mime = "image/vnd.djvu", exec = "noop" },
|
||||
{ mime = "image/*", exec = "image" },
|
||||
# Video
|
||||
{ mime = "video/*", exec = "video" },
|
||||
# PDF
|
||||
{ mime = "application/pdf", exec = "pdf" },
|
||||
# Archive
|
||||
{ mime = "application/zip", exec = "7z" },
|
||||
{ mime = "application/gzip", exec = "7z" },
|
||||
{ mime = "application/x-tar", exec = "7z" },
|
||||
{ mime = "application/x-bzip", exec = "7z" },
|
||||
{ mime = "application/x-bzip2", exec = "7z" },
|
||||
{ mime = "application/x-7z-compressed", exec = "7z" },
|
||||
{ mime = "application/x-rar", exec = "7z" },
|
||||
{ mime = "application/xz", exec = "7z" },
|
||||
{ mime = "application/x-bittorrent;", exec = "imdl" },
|
||||
{ name = "*.torrent", exec = "imdl" },
|
||||
|
||||
{ mime = "application/octet-stream", exec = "hexyl" },
|
||||
# Fallback
|
||||
{ name = "*", exec = "file" },
|
||||
]
|
||||
|
||||
[select]
|
||||
open_title = "Open with:"
|
||||
open_origin = "hovered"
|
||||
open_offset = [ 0, 1, 50, 7 ]
|
Loading…
Add table
Add a link
Reference in a new issue