astrand / xclip

Command line interface to the X11 clipboard
GNU General Public License v2.0
1.04k stars 75 forks source link

Copy to different targets #32

Open Nixola opened 7 years ago

Nixola commented 7 years ago

Right now, the -t option allows you to select a "target" for whatever you're copying, but what if I wanted to copy more than one thing to more than one target, as browsers do when you copy stuff from a webpage, copying both the HTML to text/html and the unformatted text to text/plain?

lilydjwg commented 6 years ago

I tried to do xclip -t text/plain a -t text/html b but a get all of a and b in HTML. Hope this can be added.

Nixola commented 6 years ago

I don't know if it's against this repo's guidelines (for I haven't found any), but I'd like to bump the issue since it hasn't had any answer in months.

astrand commented 6 years ago

The problem is just that xclip, just like most other open source projects, depends on volunteer work. Unfortunately, it seems like this particular problem is not a showstopper for me or any other developer, thus no fix has been created. Depending on your skills, you might try to fix the problem yourself, or raise funds via for example Bountysource or similar services.

MyriaCore commented 4 years ago

Just wanna bump this, multiple -t options would be super useful, I ended up finding this issue via this SO comment. I'm willing to poke around in the code and submit a PR if necessary, although I'm not too familiar with programming for X.

vvs- commented 4 years ago

I think it should not be too difficult. Just needs modification of the command line parsing. So that each specified file would be stored into each target sequentially and the rest would go to default target as usual.

But as astrand said above there is just not enough motivation for that change yet.

phillipberndt commented 1 year ago

I thought I'd need this, too, but then noticed while thinking further about it that the only must-have addition for me is to set the STRING target together with other text formats like text/html, since some applications won't allow you to paste rich text unless the STRING target is set as well. I just implemented that and opened PR #142.