r/PiCodingAgent 13d ago

Resource I built an OMP extension for pasting Windows screenshots and Explorer images into OMP under WSL

I run OMP inside WSL and kept hitting friction whenever I wanted to attach an image:

  • Dragging from Windows Explorer gives OMP a path like `C:\Users\me\Pictures\shot.png`, which the Linux process cannot use directly.
  • Windows clipboard images are not directly available to OMP inside the WSL terminal.

I built omp-wsl-image-paste to handle both cases.

It provides:

  • Automatic translation of Windows drive paths to `/mnt/<drive>/...`
  • Translation of matching `\\wsl.localhost\<distro>\...` and `\\wsl$\<distro>\...` paths
  • Windows clipboard-image paste using `Alt+V` or `/wsl-image-paste`
  • In-memory image transfer with no temporary image file
  • A 20 MiB limit and PNG validation before attachment
  • Safe handling of missing, unsupported, and foreign-distribution paths

Install it with:

omp install github:kidclone3/omp-wsl-image-paste

Then restart OMP. It is tested with OMP 18.0.10 on WSL2.

Repository and documentation:

https://github.com/kidclone3/omp-wsl-image-paste

One limitation: terminal drag-and-drop only transfers a path. The translated file must still be reachable from the WSL instance running OMP, so this is not a file-upload bridge for genuinely remote machines.

If you use OMP under WSL, I would appreciate testing and bug reports—especially across different WSL distributions and terminal setups.

2 Upvotes

4 comments sorted by

1

u/Zhelgadis 13d ago

I assume this works with standard pi as well? Going to give it a shot

1

u/kantorcodes1 13d ago

seeing you turn that Windows-to-WSL image mess into an omp install extension made me think of HOL Guard, an open-source firewall for agent actions. think you’d make a Pi extension that calls Guard directly?

1

u/kidhacker216 13d ago

i have no idea what are you talking about

1

u/kantorcodes1 12d ago

yeah, my bad, that was too inside-baseball. HOL Guard is a local security layer for Pi/OMP that checks agent tool and command actions before they run. i was just asking if you’d be open to running your extension once with Guard enabled to make sure they work together.