Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support to copy to clipboard in wsl #83

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jhonnyV-V
Copy link

Add to dependencies to get system info, to check if is wsl and the current pretty name of the distro.

If wsl is getting used, this should create the image as a temp file inside wsl, then use powershell to copy it to the clipboard, and then it deletes the image from the tmp directory.

this is my first time doing rust so sorry if the code does not follow some good practice, I'm open to any kind of feedback, if something needs to be changed to match the standard in the rest of the codebase just leave a comment and I will fix it

add to dependencies to get system info, to check if is wsl and the
current pretty name of the distro.

if wsl is getting used, this should create the image as a temp file
inside of wsl, then use powershell to copy it to the clipboard and then
it deletes the image from the tmp directory
@mistricky
Copy link
Owner

Hey @jhonnyV-V, thx for this PR. Can you run CodeSnap.nvim on WSL? there are a few issues describe that they can't run CodeSnap.nvim on WSL, it would be great if you could add some documents for the WSL install/usage guide

@jhonnyV-V
Copy link
Author

Hi @mistricky, yes I can run it without problems and configuring things inside of WSL, I could give it a try

@jhonnyV-V jhonnyV-V mentioned this pull request Apr 15, 2024
@mistricky
Copy link
Owner

Hi @jhonnyV-V, is there any update for #73 (comment)? It seems like not work perfectly.

@jhonnyV-V
Copy link
Author

Hi @mistricky I haven't been able to try to tackle this issue, I will try this week, it seems like a rust issue, where rust fails to access the clipboard, I have to test this more,

@mgastonportillo
Copy link

WSL's clipboard is tricky. Hopefully this brings some light: https://lib.rs/crates/clipboard-anywhere

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.

None yet

3 participants