Skip to content
simla33Public

About

Integrates yazi copy/paste with system clipboard similar to GUI file managers.

Resources

Stars

33 stars

Watchers

0 watching

Forks

Latest commit

 

History

46 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ucp.yazi

Copy files between Yazi and desktop apps. Paste files, save clipboard images, or turn text into a new file.

Yazi 26.8.15+ · MIT

Install

ya pkg add simla33/ucp
Platform Requirements and verification
X11 xclip. Tested with real Yazi and a private X11 clipboard.
Wayland wl-clipboard. Tested with real Yazi and headless Sway.
macOS osascript/AppKit and pbpaste.
Windows Built-in powershell.exe 5.1. Native tests run in a disposable VM.

Linux/macOS also need realpath, cp, chmod, and mktemp. Windows needs an interactive desktop and an ACL-capable filesystem. Platform details

Keys

Add these entries to your existing [mgr].prepend_keymap in keymap.toml, then restart Yazi:

[mgr]
prepend_keymap = [
    { on = "y", run = "plugin ucp -- copy notify", desc = "Copy to clipboard" },
    { on = "p", run = "plugin ucp -- paste notify", desc = "Paste files, images or text" },
]

Only y and p invoke ucp. Native Yazi keys and an optional clipboard bypass

Remove notify for fewer notifications; keep -- when passing multiple arguments. Config locations and options

Demos

Copying a selected file from Yazi into a desktop file manager.

Paste files · Resolve collisions and save text

Paste behavior

Native cuts win. Otherwise, clipboard files, images, then text take priority. With no supported readable clipboard data, ucp uses Yazi's native yank. Text asks for a filename; images use a timestamped name.

Collision key Action
o / O Overwrite one / all later collisions.
c / C Create a uniquely named copy, such as note_copy.txt, once / for all later collisions.
m Merge directories, preserving unrelated entries.
q / Escape Skip one item; cancel a text/image save.
Q Stop the remaining file batch.

Text/image dialogs offer o, c, and q/Escape. In the filename prompt, Enter submits and Ctrl-C cancels.

Diagnostics

~/.config/yazi/plugins/ucp.yazi/ucp doctor

No keybinding, no running Yazi, no clipboard payload reads. The report shows helper/session metadata and recognized formats—not paths, environment values, or unknown format names.

Use ucp doctor from PATH or Windows PowerShell · Troubleshooting

Limits and safety

Local search results work. Remote files must be downloaded locally before external copy. Flatpak copying has optional portal support.

Transfers are staged, not crash-atomic. Keep any backup named in a recovery warning. Safety and recovery · Tests and verification limits

Update with ya pkg upgrade simla33/ucp, then restart Yazi.

Thanks

About

Integrates yazi copy/paste with system clipboard similar to GUI file managers.

Resources

Stars

33 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages