feat: provision yazi (TUI file manager) with previews - #3
Open
Chikimuras wants to merge 2 commits into
Open
Chikimuras wants to merge 2 commits into
Chikimuras wants to merge 2 commits into
Conversation
Ports the macOS setup to the Ubuntu provisioning so both machines get the same file manager: - install yazi + ya from the upstream release zip (not packaged for 24.04), following the jira-cli pattern: download, locate the binaries with find so the archive's internal layout doesn't matter, install into ~/.local/bin - add the preview dependencies to the apt list: ffmpeg (video), poppler-utils (PDF), imagemagick (raster), unzip (to unpack the release itself) - new `yazi` stow package holding a config shared by both OSes; the openers are split with `for = "macos"` / `for = "linux"` rather than forked into two files, so there is a single config to keep in sync - new `y` shell function: yazi cannot change its parent shell's cwd, so it writes the last directory to --cwd-file and the wrapper cds there. It calls `command rm`, because a bare `rm` is aliased to `trash` in this config and zsh expands aliases when a function is *defined*, which would send every temp cwd file to the trash - tmux: allow-passthrough on, without which the kitty graphics protocol is swallowed by tmux and image previews silently never render - cover the new stow package in the CI conflict check Verified locally on macOS: shellcheck clean (the exact CI command), config parses under yazi 26.9.1, `y` cds correctly. The Ubuntu paths (apt, the release download, stow) are only exercised by CI. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Under --dry-run, run() only prints, so nothing is downloaded or unzipped and the find over the temp dir is legitimately empty. The diagnostic fired anyway and every dry-run logged two warnings that looked like an upstream layout change. Keep the warning for real runs, where it is the useful signal. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Porte le setup yazi du Mac vers le provisioning Ubuntu, pour que les deux machines aient le même gestionnaire de fichiers.
Ce que ça ajoute
install/10-packages.sh— section 9 :yazi+yadepuis le zip upstream. Yazi n'est pas packagé sur Ubuntu 24.04, donc même schéma que jira-cli (download →install -m 0755dans~/.local/bin). Les binaires sont localisés avecfind, ce qui rend le script insensible à la structure interne de l'archive.ffmpeg(vidéo),poppler-utils(PDF),imagemagick(raster),unzip(pour dépaqueter la release elle-même).dotfiles/yazi/— nouveau package stow. Config partagée entre macOS et Ubuntu : les openers sont splittés avecfor = "macos"/for = "linux"plutôt que forkés en deux fichiers, donc il n'y a qu'une config à maintenir.dotfiles/zsh/.zsh/functions/40-yazi.zsh— la fonctiony.dotfiles/tmux/—allow-passthrough on..github/workflows/ci.yml— le check de conflits stow couvre le nouveau package.Deux détails qui ne sont pas du cosmétique
allow-passthrough ondans tmux. Les previews d'images de yazi passent par le protocole graphique kitty. Sans cette option, tmux avale les séquences et les previews ne s'affichent jamais — silencieusement, sans le moindre message d'erreur.command rmdans la fonctiony. Zsh expanse les alias à la définition d'une fonction, pas à son appel. Avecalias rm=trashdans la config, unrmnu se retrouve figé entrashdans le corps stocké, et chaque invocation deyenverrait son fichier temporaire--cwd-fileà la corbeille. Vérifiable avecwhence -f y.Vérifications
Fait en local (macOS) :
shellcheck -S warning -xvia la commande exacte de la CI → 0 problèmeci.ymlparseyfait bien lecden sortiePas vérifiable en local : les chemins Ubuntu — apt, le téléchargement de la release, le stow (
stown'est pas installé sur le Mac). C'est cette CI qui les exerce pour la première fois.🤖 Generated with Claude Code