Skip to content

feat: add WSL support for Windows clipboard#3

Open
ddfonseca wants to merge 1 commit intojkhas8:masterfrom
ddfonseca:feat/wsl-support
Open

feat: add WSL support for Windows clipboard#3
ddfonseca wants to merge 1 commit intojkhas8:masterfrom
ddfonseca:feat/wsl-support

Conversation

@ddfonseca
Copy link
Copy Markdown

Summary

  • Add support for WSL (Windows Subsystem for Linux) environments
  • Use PowerShell to access the Windows clipboard when running in WSL
  • Maintain backward compatibility with existing X11 (xclip) and Wayland (wl-paste) support

Changes

The clipboard detection order is now:

  1. WSL (detected via /proc/version) → Uses PowerShell to access Windows clipboard
  2. Wayland (if wl-paste available) → Uses wl-paste
  3. X11 (if xclip available) → Uses xclip

Test plan

  • Tested on WSL2 with Windows 11
  • Verified image is saved correctly from Windows clipboard
  • Verified path is inserted into tmux pane

🤖 Generated with Claude Code

Detect WSL environment and use PowerShell to access the Windows
clipboard for pasting images. This allows the plugin to work
seamlessly in WSL without requiring xclip or wl-paste.

The detection order is now:
1. WSL (via /proc/version check) -> PowerShell
2. Wayland (if wl-paste available) -> wl-paste
3. X11 (if xclip available) -> xclip

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant