wl-clipboard icon indicating copy to clipboard operation
wl-clipboard copied to clipboard

Add support for type conversions

Open bugaevc opened this issue 7 years ago • 2 comments

E.g. if we have text/html content and it gets pasted as text/plain, we may want to do the conversion somewhere in the middle (or not — need an option to control this). If we have an image/jpeg, we should also advertise image/png and use some converter under the hood, and so on.

bugaevc avatar Oct 03 '18 22:10 bugaevc

Actually no, the least surprising way this could work is:

  • For text formats such as HTML, wl-copy should always advertise the original text content, no matter the mime type, as text/plain, in addition to that mime type
    • This is unlike copying from a browser, where you'd expect text/plain and text/html to actually differ
  • wl-paste should prefer pasting text/plain unless the mime type is explicitly specified with -t or inferred from the file we're pasting into
  • wl-copy should attempt to do the conversion for binary types such as images and not offer text/plain at all

bugaevc avatar Oct 04 '18 04:10 bugaevc

If we have an image/jpeg, we should also advertise image/png and use some converter under the hood, and so on.

Uhh, please no, image manipulation and conversion is way out of scope of simple console copy/paste utilities.

YaLTeR avatar Oct 25 '18 10:10 YaLTeR