Skip to content

feat(linux): add Yazi file manager integration plugin - #1486

Open
manish0467 wants to merge 2 commits into
KnifeLemon:mainfrom
manish0467:feat/linux-yazi-integration
Open

manish0467 wants to merge 2 commits into
KnifeLemon:mainfrom
manish0467:feat/linux-yazi-integration

Conversation

@manish0467

Copy link
Copy Markdown

Summary

Adds an integration plugin for the Yazi terminal file manager under installer/linux/yazi/filee.yazi/.

Similar to the existing GNOME Shell extension, KWin script, and Hyprland rules in installer/linux/, this plugin enables Linux / terminal users to interact with Filee directly from within Yazi.

Features

  • Multi-target selection: Works on multi-file selections or falls back to the currently hovered file.
  • Interactive Quick-Convert Menu (ya.which):
    • Images: WebP, JPEG, PNG, AVIF, Remove Background
    • Documents: PDF, OCR to Markdown (.md), OCR to Plain Text (.txt)
    • Media: Extract Audio (MP3), Compress Video (MP4)
    • Archives: ZIP, Extract
    • Custom format prompt via ya.input
    • GUI: Open files directly in the interactive Filee Donut
  • Non-blocking asynchronous conversion: Runs conversions in the background without locking the terminal file manager.
  • Notifications: Uses Yazi's built-in ya.notify() for in-terminal progress/completion, and sends desktop notifications via standard freedesktop notify-send if installed.

Packaging & Documentation

  • Bundled into the Linux release package in build/build-portable.ps1.
  • Setup instructions and keybinding example documented in installer/linux/INSTALL.txt and installer/linux/yazi/filee.yazi/README.md.

- Add Yazi plugin in installer/linux/yazi/filee.yazi/ supporting quick conversion and Donut GUI trigger
- Bundle yazi integration in build/build-portable.ps1
- Document setup instructions and keybinding in installer/linux/INSTALL.txt

@KnifeLemon KnifeLemon left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @manish0467! A Yazi plugin fits well next to the KWin, GNOME and Hyprland pieces, and the CLI calls are right: filee convert … --to / --preset, and the remove-background and extract presets exist. The install path in INSTALL.txt matches where install.sh puts the app.

A few things before it can go in:

  1. Drop --- @sync entry (first line of init.lua). With it, entry runs in Yazi's sync context. But ya.which, ya.input and the ya.sync wrapper (get_targets) only work in the async context, so the menu can't open there. And cmd:output() in a sync entry would freeze Yazi until the conversion ends, which is the opposite of the "non-blocking" in the description. Without the annotation the entry runs async, get_targets through ya.sync is the right way to read the selection, and output() waits without blocking the UI.
  2. The keymap section. Yazi renamed manager to mgr in its config (25.5). Please use [[mgr.prepend_keymap]] in both INSTALL.txt and the plugin's README, and say which Yazi version the plugin needs.
  3. "Open in Filee Donut" fallbacks. ~/.local/bin/filee is the CLI (filee-cli), which has no --convert option, and install.sh doesn't put a Filee on PATH. The installed app path you try first is the right one. Please drop the two fallbacks, and show a ya.notify error when the app can't be started, instead of always reporting "Opened".
  4. Could you say which Yazi version you tested it with, and how (selection, hovered file, the custom-format prompt)? A short note in the PR is enough.

Thanks again!

- Remove @sync entry to keep execution asynchronous
- Update keymap to modern [[mgr.prepend_keymap]] (Yazi 25.5+) in docs
- Drop CLI fallbacks and notify on error if GUI launcher fails
@manish0467

Copy link
Copy Markdown
Author

Hi @KnifeLemon, thank you very much for the review and helpful pointers!

I have addressed all the feedback in the latest commit:

  1. Dropped --- @sync entry: Removed the annotation so M:entry() executes in Yazi's async context. The get_targets call via ya.sync still safely reads the selection/hover state from the UI thread, and CLI execution cmd:output() awaits asynchronously without freezing the UI.
  2. Keymap section & version requirements: Updated the keymap config in both INSTALL.txt and installer/linux/yazi/filee.yazi/README.md to use the modern [[mgr.prepend_keymap]] syntax, and noted the requirement for Yazi 25.5+ (along with the legacy fallback for older versions).
  3. Donut launcher cleanup & error notification: Dropped the CLI fallback commands and added an explicit ya.notify(..., "error") notification if launching the GUI fails or the binary is missing, rather than reporting success unconditionally.
  4. Testing details:
    • Tested on Yazi 26.9.1 (x86_64-unknown-linux-gnu).
    • Verified with:
      • Single hovered file conversion.
      • Multi-file visual selection (<Space> multi-select).
      • Custom format prompt via ya.input (e.g. svg, docx).
      • "Open in Filee Donut" launch with files passed to --convert.
      • In-terminal notifications via ya.notify() and system notifications via notify-send.

All unit tests (dotnet test tests/Filee.Platform.Tests) pass cleanly as well. Thanks again!

@github-actions github-actions Bot added build Build and release feature New features labels Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Build and release feature New features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants