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

support WSL (windows subsystem for linux) #45

Merged
merged 2 commits into from
Apr 17, 2024
Merged

Conversation

hhaensel
Copy link
Contributor

Currently clipboard_img() fails when running under WSL, because xclip doesn't support the windows clipboard for images.

However, the function _powershell() can easily handle the clipboard even when called from WSL. The only necessary modification is that the extension .exe needs to be explicitly added to the powershell command, which does not break functioning for windows.

Moreover, a check whether running under WSL needs to be added. I chose to check for the environment variable "WSLENV".

@hyrodium
Copy link
Owner

Thank you for the PR! I will try the changes on my WSL environment.

@hyrodium
Copy link
Owner

Is it possible to update .github/workflows/CI.yml to run WSL on GitHub Actions?

@hhaensel
Copy link
Contributor Author

Not that I knew, but I'm not an expert.

@hhaensel
Copy link
Contributor Author

It seems that this is possible, see https://github.com/ubuntu/wsl-actions-example
But it's nothing I'd contribute my time to, currently. I think manual testing is ok for this purpose.

BUT: I just tested the other direction (copying a julia picture to the clipboard) and that failed. So it needs some more tweaking.

@hhaensel
Copy link
Contributor Author

Found a solution, hang on...

@hhaensel
Copy link
Contributor Author

Please test ...

Copy link
Owner

@hyrodium hyrodium left a comment

Choose a reason for hiding this comment

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

I have confirmed that the changes work correctly in my environment! Thank you for the great PR!

@hyrodium hyrodium merged commit 23a77a2 into hyrodium:main Apr 17, 2024
7 checks passed
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

2 participants