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
+41 -25

No files matched your search

-1
View File
@@ -85,7 +85,6 @@ The `[data]` table exposes `.name`, `.email`, and `.role` to every template. che
| `.chezmoi.os` | `run_onchange_before_10-packages.sh.tmpl` | pacman/paru on `linux`, Homebrew on `darwin` | | `.chezmoi.os` | `run_onchange_before_10-packages.sh.tmpl` | pacman/paru on `linux`, Homebrew on `darwin` |
| `.chezmoi.os` | `run_once_after_30-user-services.sh.tmpl` | systemd user units on `linux` only | | `.chezmoi.os` | `run_once_after_30-user-services.sh.tmpl` | systemd user units on `linux` only |
| `.chezmoi.os` | `run_onchange_after_40-post.sh.tmpl` | `fc-cache` on `linux` only | | `.chezmoi.os` | `run_onchange_after_40-post.sh.tmpl` | `fc-cache` on `linux` only |
| `.chezmoi.os` | `dot_config/yazi/yazi.toml.tmpl` | Yazi's `open` opener runs `open` on darwin, `xdg-open` elsewhere |
```ini dot_gitconfig.tmpl ```ini dot_gitconfig.tmpl
[user] [user]
+1 -1
View File
@@ -165,7 +165,7 @@ See [bash and zsh](/shell) for the rest of those files.
| `e.h` | not defined | `cd ~/.local/share/chezmoi/dot_config/hypr && yazi` | | `e.h` | not defined | `cd ~/.local/share/chezmoi/dot_config/hypr && yazi` |
| `e.k` | `yazi ~/.config/kitty` | `yazi ~/.local/share/chezmoi/dot_config/kitty` | | `e.k` | `yazi ~/.config/kitty` | `yazi ~/.local/share/chezmoi/dot_config/kitty` |
| `e.n` | `yazi ~/.config/niri` | `yazi ~/.local/share/chezmoi/dot_config/niri` | | `e.n` | `yazi ~/.config/niri` | `yazi ~/.local/share/chezmoi/dot_config/niri` |
| `e.y` | `yazi ~/.config/yazi` | `yazi ~/.local/share/chezmoi/dot_config/yazi` | | `e.y` | `yazi ~/.config/yazi` | `yazi ~/.local/share/chezmoi/yazi` |
| `e.t` | `nvim ~/.config/tmux/tmux.conf` | `nvim ~/.local/share/chezmoi/dot_config/tmux/tmux.conf` | | `e.t` | `nvim ~/.config/tmux/tmux.conf` | `nvim ~/.local/share/chezmoi/dot_config/tmux/tmux.conf` |
| `cdd` | `cd ~/Developer && yazi` | not defined | | `cdd` | `cd ~/Developer && yazi` | not defined |
| `,,` | not defined | `cd ~/.local/share/chezmoi && yazi` | | `,,` | not defined | `cd ~/.local/share/chezmoi && yazi` |
+1 -2
View File
@@ -67,14 +67,13 @@ Files at the source root that would otherwise land in `$HOME` as `~/README.md`,
| Pattern | Why | | Pattern | Why |
| --- | --- | | --- | --- |
| `.config/lazygit/.omc/**` | Tool state written inside the lazygit config dir | | `.config/lazygit/.omc/**` | Tool state written inside the lazygit config dir |
| `.config/yazi/plugins/**` | Installed by `ya pkg install` from `package.toml` ([script](/chezmoi/scripts#install-yazi-plugins)) |
| `.config/tmux/plugins/**`, except `!.config/tmux/plugins/tpm` | Plugins tpm installs with `prefix I`; tpm itself is the external above | | `.config/tmux/plugins/**`, except `!.config/tmux/plugins/tpm` | Plugins tpm installs with `prefix I`; tpm itself is the external above |
| `.config/fish/fish_variables` | fish universal variables, rewritten by fish at runtime | | `.config/fish/fish_variables` | fish universal variables, rewritten by fish at runtime |
| `.config/nvim/lazy-lock.json` | lazy.nvim lockfile inside the nvim external | | `.config/nvim/lazy-lock.json` | lazy.nvim lockfile inside the nvim external |
| `.config/nvim/.git`, `.config/nvim/.git/**` | The external's git metadata | | `.config/nvim/.git`, `.config/nvim/.git/**` | The external's git metadata |
| `.config/nvim/.omc/**`, `.config/nvim/.crush/**`, `.config/nvim/.understand-anything/**` | Agent tool state inside the nvim checkout | | `.config/nvim/.omc/**`, `.config/nvim/.crush/**`, `.config/nvim/.understand-anything/**` | Agent tool state inside the nvim checkout |
`.gitignore` covers the source side of the same problem: `dot_config/lazygit/dot_omc`, `dot_config/tmux/plugins`, and `__pycache__/` never get committed even though symlink mode lets tools write into the source tree. `.gitignore` covers the source side of the same problem: `dot_config/lazygit/dot_omc`, `dot_config/tmux/plugins`, `/yazi/plugins/*` (except the vendored `bunny.yazi`), and `__pycache__/` never get committed even though symlink mode lets tools write into the source tree.
### mise ### mise
+4 -3
View File
@@ -62,11 +62,12 @@ The repo is a [chezmoi](https://chezmoi.io) source directory. It lives at `~/.lo
- tmux/ - tmux/
- topgrade.toml - topgrade.toml
- waybar/ - waybar/
- yazi/ - symlink_yazi.tmpl
- zsh/ - zsh/
- dot_local/ - dot_local/
- bin/ - bin/
- dot_leetcode/ - dot_leetcode/
- yazi/
- docs/ - docs/
- public/ - public/
- blume.config.ts - blume.config.ts
@@ -101,8 +102,8 @@ chezmoi encodes target names and attributes in source file names. These are the
| `executable_` | Target gets the executable bit | 40 files: every script in `dot_local/bin/`, `dot_config/niri/scripts/`, `dot_config/tmux/executable_niri-title.sh` | | `executable_` | Target gets the executable bit | 40 files: every script in `dot_local/bin/`, `dot_config/niri/scripts/`, `dot_config/tmux/executable_niri-title.sh` |
| `exact_` | Directory is exact: entries in the target that are not in the source are deleted | `dot_config/niri/exact_config.d/` (numbered `10-…kdl` through `95-…kdl` fragments) | | `exact_` | Directory is exact: entries in the target that are not in the source are deleted | `dot_config/niri/exact_config.d/` (numbered `10-…kdl` through `95-…kdl` fragments) |
| `empty_` | File is kept even when empty | `dot_config/herdr/empty_dot_plugins.lock` | | `empty_` | File is kept even when empty | `dot_config/herdr/empty_dot_plugins.lock` |
| `symlink_` | Target is a symlink; file content is the link destination | `dot_config/kitty/symlink_current-theme.conf` (→ `themes/cyberdream.conf`), `dot_config/symlink_television.tmpl` | | `symlink_` | Target is a symlink; file content is the link destination | `dot_config/kitty/symlink_current-theme.conf` (→ `themes/cyberdream.conf`), `dot_config/symlink_television.tmpl`, `dot_config/symlink_yazi.tmpl` |
| `.tmpl` | Rendered with Go templates and chezmoi data | `dot_gitconfig.tmpl`, `dot_config/shell/aliases.sh.tmpl`, `dot_config/yazi/yazi.toml.tmpl`, all scripts, the config and ignore files | | `.tmpl` | Rendered with Go templates and chezmoi data | `dot_gitconfig.tmpl`, `dot_config/shell/aliases.sh.tmpl`, all scripts, the config and ignore files |
| `run_once_` / `run_onchange_` + `before_` / `after_` | Script, with run frequency and phase | See [Apply scripts](/chezmoi/scripts) | | `run_once_` / `run_onchange_` + `before_` / `after_` | Script, with run frequency and phase | See [Apply scripts](/chezmoi/scripts) |
Prefixes stack in chezmoi's fixed order, e.g. `private_dot_foo`, `executable_dot_bar`. No source file currently uses `encrypted_`, even though age encryption is configured. Prefixes stack in chezmoi's fixed order, e.g. `private_dot_foo`, `executable_dot_bar`. No source file currently uses `encrypted_`, even though age encryption is configured.
+2 -2
View File
@@ -28,7 +28,7 @@ Six scripts run during `chezmoi apply`. Four live in `.chezmoiscripts/`, a direc
| `.chezmoiscripts/run_once_after_30-user-services.sh.tmpl` | after | once | Runs once per distinct rendered content | | `.chezmoiscripts/run_once_after_30-user-services.sh.tmpl` | after | once | Runs once per distinct rendered content |
| `.chezmoiscripts/run_onchange_after_40-post.sh.tmpl` | after | onchange | Only edits to the script itself (or an OS change) | | `.chezmoiscripts/run_onchange_after_40-post.sh.tmpl` | after | onchange | Only edits to the script itself (or an OS change) |
| `run_onchange_after_build-bat-cache.sh.tmpl` | after | onchange | sha256 of `dot_config/bat/themes/cyberdream.tmTheme` and `dot_config/bat/config` | | `run_onchange_after_build-bat-cache.sh.tmpl` | after | onchange | sha256 of `dot_config/bat/themes/cyberdream.tmTheme` and `dot_config/bat/config` |
| `run_onchange_after_install-yazi-plugins.sh.tmpl` | after | onchange | sha256 of `dot_config/yazi/package.toml` | | `run_onchange_after_install-yazi-plugins.sh.tmpl` | after | onchange | sha256 of `yazi/package.toml` |
`run_onchange_` scripts re-run whenever their rendered content differs from the last successful run. The hash triggers work by writing a checksum of another file into a comment, so editing that file changes the script's content: `run_onchange_` scripts re-run whenever their rendered content differs from the last successful run. The hash triggers work by writing a checksum of another file into a comment, so editing that file changes the script's content:
@@ -115,4 +115,4 @@ Each step ignores failures (`|| true`). tpm is cloned by [`.chezmoiexternal.toml
## install-yazi-plugins [#install-yazi-plugins] ## install-yazi-plugins [#install-yazi-plugins]
`run_onchange_after_install-yazi-plugins.sh.tmpl` reinstalls yazi plugins whenever `dot_config/yazi/package.toml` changes. It exits quietly if `ya` is missing or `${XDG_CONFIG_HOME:-$HOME/.config}/yazi/package.toml` does not exist, and otherwise runs `ya pkg install`. The installed plugins land in `~/.config/yazi/plugins/`, which `.chezmoiignore.tmpl` excludes. The plugin list is on the [yazi page](/tools/yazi). `run_onchange_after_install-yazi-plugins.sh.tmpl` reinstalls yazi plugins whenever `yazi/package.toml` changes. It exits quietly if `ya` is missing or `${XDG_CONFIG_HOME:-$HOME/.config}/yazi/package.toml` does not exist, and otherwise runs `ya pkg install`. If that fails, it deletes ya's clone cache (`${XDG_CACHE_HOME:-$HOME/.cache}/yazi/packages`), since clones made by an older ya can break a newer one, and retries once. `~/.config/yazi` links to the source dir, so the plugins land in the repo's `yazi/plugins/`, which `.gitignore` excludes apart from the vendored `bunny.yazi`. The plugin list is on the [yazi page](/tools/yazi).
+1 -1
View File
@@ -351,7 +351,7 @@ omarchy-toggle-scratch [scratchpad|fastmail|beeper]
| --- | --- | --- | --- | | --- | --- | --- | --- |
| `scratchpad` | `special:scratchpad` | Apple Studio Display | `so.stencil.tern` → `tern` | | `scratchpad` | `special:scratchpad` | Apple Studio Display | `so.stencil.tern` → `tern` |
| `claude` | `special:claude` | Apple Studio Display | `com.anthropic.Claude` → `claude-desktop` | | `claude` | `special:claude` | Apple Studio Display | `com.anthropic.Claude` → `claude-desktop` |
| `fastmail` | `special:fastmail` | focused | `com.fastmail.Fastmail` → `gtk-launch fastmail` | | `fastmail` | `special:fastmail` | focused | `com.fastmail.Fastmail` → `gtk-launch com.fastmail.Fastmail` |
| `beeper` | `special:beeper` | focused | `Beeper` → `gtk-launch beeper` | | `beeper` | `special:beeper` | focused | `Beeper` → `gtk-launch beeper` |
If the workspace is visible, the script hides it. If not, it launches any resident with no window there, waits up to 8 s for the first new window, and reveals the workspace on the home monitor (or the focused one if the home monitor is absent). Launching only missing residents avoids duplicate web-app windows. Bound to `SUPER + CTRL + S`, `SUPER + A`, `SUPER + CTRL + ALT + E`, and `SUPER + CTRL + ALT + M`. If the workspace is visible, the script hides it. If not, it launches any resident with no window there, waits up to 8 s for the first new window, and reveals the workspace on the home monitor (or the focused one if the home monitor is absent). Launching only missing residents avoids duplicate web-app windows. Bound to `SUPER + CTRL + S`, `SUPER + A`, `SUPER + CTRL + ALT + E`, and `SUPER + CTRL + ALT + M`.
+1 -1
View File
@@ -41,7 +41,7 @@ A ✓ means the alias exists in that shell with the command shown. Where fish us
| `e.k` | `yazi ~/.config/kitty` | `yazi ~/.local/share/chezmoi/dot_config/kitty` | | `e.k` | `yazi ~/.config/kitty` | `yazi ~/.local/share/chezmoi/dot_config/kitty` |
| `e.n` | `yazi ~/.config/niri` | `yazi ~/.local/share/chezmoi/dot_config/niri` | | `e.n` | `yazi ~/.config/niri` | `yazi ~/.local/share/chezmoi/dot_config/niri` |
| `e.v` | `yazi ~/.config/nvim/lua` | ✓ | | `e.v` | `yazi ~/.config/nvim/lua` | ✓ |
| `e.y` | `yazi ~/.config/yazi` | `yazi ~/.local/share/chezmoi/dot_config/yazi` | | `e.y` | `yazi ~/.config/yazi` | `yazi ~/.local/share/chezmoi/yazi` |
| `e.t` | `nvim ~/.config/tmux/tmux.conf` | `nvim ~/.local/share/chezmoi/dot_config/tmux/tmux.conf` | | `e.t` | `nvim ~/.config/tmux/tmux.conf` | `nvim ~/.local/share/chezmoi/dot_config/tmux/tmux.conf` |
| `hx` | `helix` | ✓ (listed under Tools in fish) | | `hx` | `helix` | ✓ (listed under Tools in fish) |
+1 -1
View File
@@ -56,7 +56,7 @@ Closing a window only detaches its session; the shells keep running in the tmux
| `ctrl+plus` / `ctrl+minus` / `ctrl+zero` | Font size +1 / -1 / reset | | `ctrl+plus` / `ctrl+minus` / `ctrl+zero` | Font size +1 / -1 / reset |
| `ctrl+shift+.` | Reload Ghostty config | | `ctrl+shift+.` | Reload Ghostty config |
| `shift+enter` | Sends `ESC[13;2u` (CSI-u Shift+Enter), which tmux passes through to the pane, so coding agents such as omp and Claude Code insert a newline instead of submitting. Not `\n`: that is `ctrl+j`, tmux's pane-down key | | `shift+enter` | Sends `ESC[13;2u` (CSI-u Shift+Enter), which tmux passes through to the pane, so coding agents such as omp and Claude Code insert a newline instead of submitting. Not `\n`: that is `ctrl+j`, tmux's pane-down key |
| `ctrl+space` | Sends NUL (tmux `C-Space`): opens the [tmux command palette](/terminal/tmux#command-palette) | | `ctrl+space`, `ctrl+backspace` | Sends NUL (tmux `C-Space`): opens the [tmux command palette](/terminal/tmux#command-palette) |
| Key | Sends | tmux action | | Key | Sends | tmux action |
| --- | --- | --- | | --- | --- | --- |
+1 -1
View File
@@ -96,7 +96,7 @@ Labels longer than 27 characters end in `…`. The icon comes from tmux-nerd-fon
| File | Contents | | File | Contents |
| --- | --- | | --- | --- |
| `commands.json` | The kitty launchers ported as palette items: **Lazygit** (90% popup in the pane's cwd; kitty `ctrl+shift+g`), **Yazi** (new window; kitty `ctrl+shift+f`), **Neovim Split** (nvim in a split to the left, 60% of the pane; alias `nv`; kitty `ctrl+shift+e`), **Shell History (atuin)** (`atuin-pick` in a 25% split below; kitty `ctrl+shift+p`). Also **btop** (80% popup; aliases `top`, `htop`), **mandible** (80% popup running [`mandible-pick`](/shell/scripts#mandible-pick); alias `man`), **television** (`tv channels`, the [channel picker](/tools/television), in a new window in the pane's cwd; alias `tv`), **gitframe** (git diff viewer in a new window in the pane's cwd; alias `gf`), **omp** (the omp agent in a full-height split on the right, 33% of the window; aliases `agent`, `ai`), **Project Tasks** (opens the tasks palette), **Sessions (sessionx)**, **Save Sessions**, and **Restore Sessions** (resurrect). Programs are started with `exec`, so the tab icon is the program's, not the shell's | | `commands.json` | The kitty launchers ported as palette items: **Lazygit** (90% popup in the pane's cwd; kitty `ctrl+shift+g`), **Yazi** (new window; kitty `ctrl+shift+f`), **Neovim Split** (nvim in a split to the left, 60% of the pane; alias `nv`; kitty `ctrl+shift+e`), **Shell History (atuin)** (`atuin-pick` in a 25% split below; kitty `ctrl+shift+p`). Also **btop** (80% popup; aliases `top`, `htop`), **Lazydocker** (90% popup in the pane's cwd; alias `dd`), **mandible** (80% popup running [`mandible-pick`](/shell/scripts#mandible-pick); alias `man`), **television** (`tv channels`, the [channel picker](/tools/television), in a new window in the pane's cwd; alias `tv`), **gitframe** (git diff viewer in a new window in the pane's cwd; alias `gf`), **omp** (the omp agent in a full-height split on the right, 33% of the window; aliases `agent`, `ai`), **Project Tasks** (opens the tasks palette), **Sessions (sessionx)**, **Save Sessions**, and **Restore Sessions** (resurrect). Programs are started with `exec`, so the tab icon is the program's, not the shell's |
| `palettes/tasks.json` | The **Project Tasks** palette (`prefix t`, Ghostty `ctrl+shift+p` / `ctrl+shift+space`), fed by [`pj-palette`](/shell/scripts#pj-palette): `bun install`, `bun run dev`, `uv sync`, `uv run python`, `make`, `go run .`, `cargo run` as Quick items when the project has them, then every task `pj` finds, grouped by tool. Each runs in a full-width split along the bottom (25% of the window) in its directory. `ctrl-c` stops a running task; once it has exited, `enter` or `ctrl-c` closes the pane | | `palettes/tasks.json` | The **Project Tasks** palette (`prefix t`, Ghostty `ctrl+shift+p` / `ctrl+shift+space`), fed by [`pj-palette`](/shell/scripts#pj-palette): `bun install`, `bun run dev`, `uv sync`, `uv run python`, `make`, `go run .`, `cargo run` as Quick items when the project has them, then every task `pj` finds, grouped by tool. Each runs in a full-width split along the bottom (25% of the window) in its directory. `ctrl-c` stops a running task; once it has exited, `enter` or `ctrl-c` closes the pane |
| `hidden.json` | Hides the built-in **Switch Theme...** item, and with it the Appearance section: the palette stays on the fixed cyberdream `theme.json` | | `hidden.json` | Hides the built-in **Switch Theme...** item, and with it the Appearance section: the palette stays on the fixed cyberdream `theme.json` |
| `shortcuts.json` | Ghostty `ctrl+shift` chords shown next to the built-in items they trigger (New Window → `Ctrl+Shift+T`, …) | | `shortcuts.json` | Ghostty `ctrl+shift` chords shown next to the built-in items they trigger (New Window → `Ctrl+Shift+T`, …) |
+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) | | [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 | | [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 | | [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) | | [Lazygit](/tools/lazygit) | lazygit | `dot_config/lazygit/` | cyberdream colors (ii theme file shipped) |
| [Lazydocker](/tools/lazydocker) | lazydocker | `dot_config/lazydocker/config.yml` | cyberdream colors | | [Lazydocker](/tools/lazydocker) | lazydocker | `dot_config/lazydocker/config.yml` | cyberdream colors |
| [bat](/tools/bat) | bat | `dot_config/bat/` | cyberdream tmTheme | | [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. `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 :::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.
::: :::
+27 -10
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/` | | 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` | | 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` | | 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` | | 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> <FileTree>
- dot_config/yazi/ - yazi/
- yazi.toml.tmpl - yazi.toml
- keymap.toml - keymap.toml
- init.lua - init.lua
- package.toml - package.toml
@@ -28,12 +32,14 @@ description: Yazi file manager config — layout, openers, bat previews, keymap,
- flavor.toml - flavor.toml
- ii-auto.yazi/ - ii-auto.yazi/
- flavor.toml - flavor.toml
- plugins/
- bunny.yazi/
</FileTree> </FileTree>
## yazi.toml ## 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 ```toml ~/.config/yazi/yazi.toml
[mgr] [mgr]
@@ -47,7 +53,8 @@ edit = [
{ run = 'yazi-nvim-open %s', block = true, for = "unix" }, { run = 'yazi-nvim-open %s', block = true, for = "unix" },
] ]
open = [ 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] [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. | | `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.play` | `mpv`, detached from yazi (`orphan = true`). |
| `opener.edit` | `yazi-nvim-open`, blocking, so yazi waits for the editor. | | `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. | | `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. | | 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 ## 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 ```sh run_onchange_after_install-yazi-plugins.sh.tmpl
#!/bin/sh #!/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 set -eu
command -v ya >/dev/null 2>&1 || exit 0 command -v ya >/dev/null 2>&1 || exit 0
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/yazi/package.toml" ] || exit 0 [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/yazi/package.toml" ] || exit 0
# 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 ya pkg install
}
``` ```
The embedded hash makes chezmoi re-run the script whenever `package.toml` changes. 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 | | Plugin | Rev | Used by |
| --- | --- | --- | | --- | --- | --- |
| `yazi-rs/plugins:smart-filter` | `efa4d79` | <kbd>F</kbd> | | `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` | | `Rolv-Apneseth/starship` | `ea92cf4` | Installed; not set up in `init.lua` |
| `mikavilpas/easyjump.yazi:easyjump` | `4aa1a06` | Installed; not bound in `keymap.toml` | | `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> | | `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 | | `coder0x6675/osc7` | `ae73046` | Installed; not referenced in config |
| `WhoSowSee/mdv-previewer` | `ea4732b` | Installed; not referenced in `yazi.toml` | | `WhoSowSee/mdv-previewer` | `ea4732b` | Installed; not referenced in `yazi.toml` |
| `yazi-rs/plugins:vcs-files` | `efa4d79` | Installed; not bound in `keymap.toml` | | `yazi-rs/plugins:vcs-files` | `efa4d79` | Installed; not bound in `keymap.toml` |