xclip
xclip copied to clipboard
Copy to different targets
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?
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.
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.
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.
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.
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.
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.