wl-clipboard
wl-clipboard copied to clipboard
Add support for type conversions
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.
Actually no, the least surprising way this could work is:
- For text formats such as HTML,
wl-copyshould always advertise the original text content, no matter the mime type, astext/plain, in addition to that mime type- This is unlike copying from a browser, where you'd expect
text/plainandtext/htmlto actually differ
- This is unlike copying from a browser, where you'd expect
wl-pasteshould prefer pastingtext/plainunless the mime type is explicitly specified with-tor inferred from the file we're pasting intowl-copyshould attempt to do the conversion for binary types such as images and not offertext/plainat all
If we have an
image/jpeg, we should also advertiseimage/pngand 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.