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

Feature Request: Make wl-copy able to copy videos/gifs #178

Open
GiorgosAthanasopoulos opened this issue Jun 9, 2023 · 3 comments
Open

Comments

@GiorgosAthanasopoulos
Copy link

Hello everyone,
On my free time I enjoy watching some coding channels on twitch, such as prime and tj. I like the emotes that they use over at twitch, so much that I actually like to use them daily in my conversations on other messenger apps such as whatsapp and messenger. On windows, i can just copy them from the file explorer and they are interpreted correctly as vids/gifs. In linux, on the other hand, the best im able to do is copy raw and thats interpreted as an image (it copies the first frame) otherwise its interpreted as raw text (like opening the file in vim and copying raw text). So this is what my feature request is about. Make wl-copy able to copy gifs, as in windows, and interpreter them correctly as vids/gifs (not static images).

(Just a note: Ive tried using wl-clipboard, copyq, and some python libraries because of a script im writing and none of them seem to work. Seeing as wl-clipboard is the most famous option for a clipboard manager in hyprland right now, I thought this is the repo id do the feature request on.)

Thank you very much for your time,
George.

@bugaevc
Copy link
Owner

bugaevc commented Jun 13, 2023

Hi!

So this is what my feature request is about. Make wl-copy able to copy gifs, as in windows, and interpreter them correctly as vids/gifs (not static images).

Are you sure wl-copy cannot do that yet?

What wl-copy surely does not do is interpret binary content in any way, certainly it does not care whether it's a video or a static image. wl-copy's job is to copy the bytes from the input file to the Wayland clipboard. What most likely doesn't work for you is the client that you're trying to paste the GIF into -- that would be your browser, if that's how you watch Twitch.

Does wl-copy correctly set the MIME type to image/gif when copying? You can use wl-paste --list-types to verify, like this:

$ wl-copy < my-emote.gif
$ wl-paste --list-types
image/gif

So if it does, please file a bug against your browser that you use Twitch in, and tell them that they don't support pasting GIFs from the clipboard properly.

@aurelien-brabant
Copy link

Hey,

I also have this issue on Linux, where I can't get a paste offering image/gif to be interpreted as a proper gif paste on an Electron app (while uploading via their file uploader works).
This does not seem related to wl-copy though, as copying the data and pasting it back gives exactly the same file in the end.
So the only thing I can think of is an Electron bug at this point.

@aurelien-brabant
Copy link

To give an update on this, it really seems to be an Electron + Xwayland issue and by no mean a wl-copy related one.
Forcing electron apps to use the wayland platform solves it.
(Tested with Slack in my case)

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

No branches or pull requests

3 participants