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 support for wayland copy/paste #5450

Merged
merged 1 commit into from Jan 2, 2019
Merged

Conversation

SMillerDev
Copy link
Contributor

Description

This PR adds support for an xclip alternative for wayland: https://github.com/bugaevc/wl-clipboard

TODOs:

  • Changes to fish usage are reflected in user documentation/manpages.
  • Tests have been added for regressions fixed
  • User-visible changes noted in CHANGELOG.md

@faho
Copy link
Member

faho commented Dec 30, 2018

What happens if you have both installed?

If you are running X, it'll pick the x thing, but what if you're running wayland?

I'm not entirely up-to-date here (every kwin release I try it to see that it still doesn't support scripts, and then I go back), is there an accepted standard for detecting wayland? E.g. some $DISPLAY alternative? Or $XDG_SESSION_TYPE? That's set to "x11" on my system.

@faho faho added this to the fish-3.1 milestone Dec 30, 2018
@SMillerDev
Copy link
Contributor Author

echo $XDG_SESSION_TYPE
wayland

I'm not sure if there's an official standard but this could work. I'd guess people with wayland would uninstall xclip though? So it would fall through to wl-*?

@mqudsi
Copy link
Contributor

mqudsi commented Dec 31, 2018

You could check for the X11 DISPLAY environment variable. xclip won't work without it, and it won't be set if you're using wayland. For more reliable than depending on wayland users not to have xclip installed.

@faho
Copy link
Member

faho commented Dec 31, 2018

it won't be set if you're using wayland

I'm not sure on that. What about if you have xwayland? Though xclip will probably work then.

@SMillerDev
Copy link
Contributor Author

The DISPLAY variable is set for me on Wayland. But that might be something wrong in my setup. XDG_SESSION_TYPE is able to identity Wayland though.

@faho
Copy link
Member

faho commented Dec 31, 2018

The DISPLAY variable is set for me on Wayland. But that might be something wrong in my setup.

Yeah, no. XWayland is supposed to be transparent to applications, so I'm pretty sure $DISPLAY needs to be set.

@mqudsi
Copy link
Contributor

mqudsi commented Dec 31, 2018

I didn't consider xwayland. You can disregard my suggestion :)

@faho
Copy link
Member

faho commented Jan 2, 2019

Okay, I'm merging this now, because it'll fix the case where wayland users don't have any of the X utilities, and as far as I know the X things still work on wayland via XWayland.

@faho faho merged commit 41b3331 into fish-shell:master Jan 2, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants