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

Add wayland clipboard support #60

Merged
merged 3 commits into from Jan 25, 2021
Merged

Add wayland clipboard support #60

merged 3 commits into from Jan 25, 2021

Conversation

kamiyaa
Copy link
Contributor

@kamiyaa kamiyaa commented Jan 25, 2021

  • change paste_keys() to return a &'static str instead of a String

Not sure how reliable cli_clipboard is but it seems to be working as intended.
The problem might be that rooster will require wayland protocols to be installed in order to compile now (on Linux)

Open to feedback

@conradkleinespel
Copy link
Owner

conradkleinespel commented Jan 25, 2021

Hello @kamiyaa , thanks for your contribution !

I'm all for Wayland support, but reluctant of adding new dependencies because I can't review all of them for security. So instead of depending on cli-clipboard, would you mind making use of wl-clipboard (https://github.com/bugaevc/wl-clipboard), in the same way xsel / xclip are currently used ?

You'd need to:

  • add code that detects if the user is using Wayland, if so, call to wl-clipboard instead of xsel/xclip
  • in README.md, add instructions for how to install wl-clipboard for Wayland users

@kamiyaa
Copy link
Contributor Author

kamiyaa commented Jan 25, 2021

Okay, I changed it to make use of wl-copy and users can force wayland to be checked first via XDG_SESSION_TYPE=wayland environment variable

@conradkleinespel
Copy link
Owner

@kamiyaa Looks great, thanks!

Would you mind reverting the changes to Cargo.lock please? Then I'll merge.

If you want to appear in the contributors' list, feel free to add yourself to it in README.md in alphabetical order.

@kamiyaa
Copy link
Contributor Author

kamiyaa commented Jan 25, 2021

@conradkleinespel done!

@conradkleinespel
Copy link
Owner

Awesome, thanks a lot for your help !

@conradkleinespel conradkleinespel merged commit cc85601 into conradkleinespel:master Jan 25, 2021
@conradkleinespel
Copy link
Owner

@kamiyaa I just published this, along with other recent changes, as version 2.9.0 on crates.io and will update the Arch Linux package shortly as well. https://github.com/conradkleinespel/rooster/releases/tag/v2.9.0

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