docs: revise Yazi paths and script references across documentation

This commit is contained in:
Prad Nukala committed 2026-10-13 09:45:56 -04:00
1 parent c8bd8d8bac
commit d0b313301d
12 files changed
+42 -26

No files matched your search

+1 -1
View File
@@ -16,7 +16,7 @@ Packages come from `.chezmoidata/packages.yaml` and are installed by `run_onchan
| [Git](/tools/git) | git, delta, diffnav, git-split-diffs | `dot_gitconfig.tmpl` | delta colors hand-tuned (dark) |
| [GitHub CLI](/tools/github-cli) | gh, gh extensions, gh-dash | `dot_config/gh/`, `dot_config/gh-dash/` | gh-dash defaults |
| [Neovim](/tools/neovim) | nvim (AstroNvim) | external repo via `.chezmoiexternal.toml` | managed in the nvim repo |
| [Yazi](/tools/yazi) | yazi file manager | `dot_config/yazi/` | cyberdream flavor (ii-auto flavor shipped) |
| [Yazi](/tools/yazi) | yazi file manager | `yazi/` (symlinked) | cyberdream flavor (ii-auto flavor shipped) |
| [Lazygit](/tools/lazygit) | lazygit | `dot_config/lazygit/` | cyberdream colors (ii theme file shipped) |
| [Lazydocker](/tools/lazydocker) | lazydocker | `dot_config/lazydocker/config.yml` | cyberdream colors |
| [bat](/tools/bat) | bat | `dot_config/bat/` | cyberdream tmTheme |
+1 -1
View File
@@ -74,5 +74,5 @@ Post-commands run after everything else:
`shelly upgrade-all -n` is also available as the `sua` alias. The post-commands assume CachyOS tooling (`shelly`, `cachy-update`) and the owner's own CLIs (`omp`, `hermes`, `herdr`); on machines without them those steps fail.
:::note
`chezmoi re-add` does not overwrite templates, so edits made directly to rendered files such as `~/.gitconfig` or `~/.config/yazi/yazi.toml` are not captured; change the `.tmpl` source instead.
`chezmoi re-add` does not overwrite templates, so edits made directly to rendered files such as `~/.gitconfig` are not captured; change the `.tmpl` source instead.
:::
+28 -11
View File
@@ -7,17 +7,21 @@ description: Yazi file manager config — layout, openers, bat previews, keymap,
| | |
| --- | --- |
| Source | `dot_config/yazi/` |
| Source | `yazi/` |
| Link | `dot_config/symlink_yazi.tmpl` → `~/.config/yazi` is a symlink to `{{ .chezmoi.sourceDir }}/yazi` |
| Target | `~/.config/yazi/` |
| Files | `yazi.toml.tmpl`, `keymap.toml`, `init.lua`, `package.toml`, `theme.toml`, `vfs.toml`, `flavors/{cyberdream,ii-auto}.yazi/flavor.toml` |
| Ignore | `.chezmoiignore.tmpl` lists `yazi`, so it is not copied to `~/yazi` |
| Files | `yazi.toml`, `keymap.toml`, `init.lua`, `package.toml`, `theme.toml`, `vfs.toml`, `flavors/{cyberdream,ii-auto}.yazi/flavor.toml`, `plugins/bunny.yazi/` (vendored) |
| Helper | `dot_local/bin/executable_yazi-nvim-open` → `~/.local/bin/yazi-nvim-open` |
| Packages | `yazi` plus preview backends `ffmpeg`, `ffmpegthumbnailer`, `poppler`, `resvg`, `imagemagick`, `7zip` (`sevenzip` on macOS), `unzip` |
| Plugins | `run_onchange_after_install-yazi-plugins.sh.tmpl` → `ya pkg install` |
The whole directory is a symlink into the source tree, so edits apply without `chezmoi apply`.
<FileTree>
- dot_config/yazi/
- yazi.toml.tmpl
- yazi/
- yazi.toml
- keymap.toml
- init.lua
- package.toml
@@ -28,12 +32,14 @@ description: Yazi file manager config — layout, openers, bat previews, keymap,
- flavor.toml
- ii-auto.yazi/
- flavor.toml
- plugins/
- bunny.yazi/
</FileTree>
## yazi.toml
The only template in the directory. The one OS condition is the `open` opener: macOS uses `open`, everything else uses `xdg-open`.
Plain TOML, not a template. The one OS difference is the `open` opener, which yazi itself picks with `for`: `xdg-open` on Linux, `open` on macOS.
```toml ~/.config/yazi/yazi.toml
[mgr]
@@ -47,7 +53,8 @@ edit = [
{ run = 'yazi-nvim-open %s', block = true, for = "unix" },
]
open = [
{ run = "{{ if eq .chezmoi.os "darwin" }}open{{ else }}xdg-open{{ end }} %s1", desc = "Open" },
{ run = "xdg-open %s1", desc = "Open", for = "linux" },
{ run = "open %s1", desc = "Open", for = "macos" },
]
[open]
@@ -69,7 +76,7 @@ run = 'piper -- bat -p --color=always --terminal-width=$w "$1"'
| `mgr.ratio = [0, 2, 6]` | Hides the parent column; the file list takes 2/8 of the width and the preview 6/8. |
| `opener.play` | `mpv`, detached from yazi (`orphan = true`). |
| `opener.edit` | `yazi-nvim-open`, blocking, so yazi waits for the editor. |
| `opener.open` | `open` (macOS) or `xdg-open` on the first selected file. |
| `opener.open` | `xdg-open` (Linux) or `open` (macOS) on the first selected file. |
| `open.prepend_rules` | Markdown files list `fry`, then `edit`, then `open`. No `fry` opener is defined in this file. |
| Previewers | Text MIME types, plus mbox, JavaScript, and wine `.ini`, preview through the `piper` plugin running `bat -p --color=always`, so previews use the [bat](/tools/bat) cyberdream theme. Markdown falls under `text/*` too. |
@@ -130,19 +137,29 @@ In the shell opened by <kbd>Shift</kbd>+<kbd>Tab</kbd>, the `q` function (fish,
## Plugins
`package.toml` pins every plugin to a commit and hash. `~/.config/yazi/plugins/**` is in `.chezmoiignore.tmpl`, so chezmoi never manages the installed code. The post-apply script reinstalls from the manifest:
`package.toml` pins every plugin to a commit and hash. Since `~/.config/yazi` links to the source dir, `ya pkg install` writes plugins into the repo's `yazi/plugins/`, which `.gitignore` excludes (`/yazi/plugins/*`, `!/yazi/plugins/bunny.yazi/`). The post-apply script reinstalls from the manifest:
```sh run_onchange_after_install-yazi-plugins.sh.tmpl
#!/bin/sh
# package.toml hash: {{ include "dot_config/yazi/package.toml" | sha256sum }}
# Install the yazi plugins pinned in yazi/package.toml whenever it changes.
# ~/.config/yazi links to the source dir, so they land in yazi/plugins/
# (gitignored, except the vendored bunny.yazi).
# package.toml hash: {{ include "yazi/package.toml" | sha256sum }}
set -eu
command -v ya >/dev/null 2>&1 || exit 0
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/yazi/package.toml" ] || exit 0
ya pkg install
# ya's clone cache is disposable and clones made by an older ya can break a
# newer one, so rebuild it once before giving up.
ya pkg install || {
rm -rf "${XDG_CACHE_HOME:-$HOME/.cache}/yazi/packages"
ya pkg install
}
```
The embedded hash makes chezmoi re-run the script whenever `package.toml` changes.
bunny is not in `package.toml`: it is vendored at `71b14a3` in `yazi/plugins/bunny.yazi/`, because its repo contains a Git symlink to a directory (`test/plugins/bunny.yazi -> ../..`) that `ya pkg` cannot materialize. To update it, re-copy the files from upstream.
| Plugin | Rev | Used by |
| --- | --- | --- |
| `yazi-rs/plugins:smart-filter` | `efa4d79` | <kbd>F</kbd> |
@@ -152,7 +169,7 @@ The embedded hash makes chezmoi re-run the script whenever `package.toml` change
| `Rolv-Apneseth/starship` | `ea92cf4` | Installed; not set up in `init.lua` |
| `mikavilpas/easyjump.yazi:easyjump` | `4aa1a06` | Installed; not bound in `keymap.toml` |
| `cap153/tv` | `b6b1f12` | <kbd>Ctrl</kbd>+<kbd>t</kbd>/<kbd>g</kbd>/<kbd>d</kbd>/<kbd>f</kbd> |
| `stelcodes/bunny` | `71b14a3` | <kbd>;</kbd> and <kbd>'</kbd>, configured in `init.lua` |
| `stelcodes/bunny` | `71b14a3` (vendored) | <kbd>;</kbd> and <kbd>'</kbd>, configured in `init.lua` |
| `coder0x6675/osc7` | `ae73046` | Installed; not referenced in config |
| `WhoSowSee/mdv-previewer` | `ea4732b` | Installed; not referenced in `yazi.toml` |
| `yazi-rs/plugins:vcs-files` | `efa4d79` | Installed; not bound in `keymap.toml` |