yazi/config/docs/yazi.md

92 lines
2.3 KiB
Markdown
Raw Normal View History

2023-07-20 12:32:03 +03:00
# Yazi
## manager
2023-08-20 05:39:05 +03:00
- layout: Manager layout by ratio, 3-element array
- `[1, 4, 3]`: 1/8 width for parent, 4/8 width for current, 3/8 width for preview
2023-07-20 12:32:03 +03:00
- sort_by: File sorting method
2023-08-26 06:15:07 +03:00
- `"alphabetical"`: Sort alphabetically, e.g. `1.md` < `10.md` < `2.md`
2023-07-20 12:32:03 +03:00
- `"created"`: Sort by creation time
- `"modified"`: Sort by last modified time
2023-08-26 06:15:07 +03:00
- `"natural"`: Sort naturally, e.g. `1.md` < `2.md` < `10.md`
2023-07-20 12:32:03 +03:00
- `"size"`: Sort by file size
- sort_reverse: Display files in reverse order
- `true`: Reverse order
- `false`: Normal order
- sort_dir_first: Display directories first
- `true`: Directories first
- `false`: Respects `sort_by` and `sort_reverse` only
2023-07-20 12:32:03 +03:00
- show_hidden: Show hidden files
- `true`: Show
- `false`: Do not show
2023-08-17 09:58:46 +03:00
- show_symlink: Show the path of the symlink file point to, after the filename
- `true`: Show
- `false`: Do not show
2023-07-20 12:32:03 +03:00
## preview
- tab_size: Tab width
- max_width: Maximum preview width for images and videos
- max_height: Maximum preview height for images and videos
## opener
Configure available openers, for example:
```toml
[opener]
archive = [
{ exec = 'unar "$1"' },
2023-07-20 12:32:03 +03:00
]
text = [
{ exec = 'nvim "$@"', block = true },
2023-07-20 12:32:03 +03:00
]
# ...
```
Available parameters are as follows:
2023-08-12 12:48:18 +03:00
- exec: The command to open the selected files, with the following variables available:
- `$n`: The N-th selected file, starting from 1
- `$@`: All selected files
2023-08-12 12:48:18 +03:00
- `foo`: Literal string to be passed
2023-07-20 12:32:03 +03:00
- block: Open in a blocking manner. After setting this, Yazi will hide into a secondary screen and display the program on the main screen until it exits. During this time, it can receive I/O signals, which is useful for interactive programs.
## open
Set rules for opening specific files, for example:
```toml
[open]
rules = [
{ mime = "text/*", use = "text" },
{ mime = "image/*", use = "image" },
# { mime = "application/json", use = "text" },
{ name = "*.json", use = "text" },
]
```
Available rule parameters are as follows:
- name: Glob expression for matching the file name
- mime: Glob expression for matching the MIME type
- use: Opener name corresponding to the names in the opener section.
## tasks
- micro_workers: Maximum number of concurrent micro-tasks
- macro_workers: Maximum number of concurrent macro-tasks
- bizarre_retry: Maximum number of retries when a bizarre failure occurs