-
Notifications
You must be signed in to change notification settings - Fork 57
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
wl-paste --watch: support multiple MIME types? #124
Comments
Hey! As far as I can tell, there are two main problems with providing several MIME types.
|
Good points.
|
Yeah, I imagine applications do the conversion even before they hand out the fd to the compositor.
I'm not sure this can quite work unfortunately. Some applications do export only a single format (e.g.
I'm afraid that by the time wl-paste gets the first fd all others are already inaccessible. But I agree it's not a particularly usual case. |
Currently,
wl-paste --watch
only makes a single representation of the data available to the program, based on the MIME type selected with--type
.Would it make sense to make multiple/all MIME type representations available? That would make it easy to enhance clipboard managers like clipman to maintain them all in their history, rather than only maintaining the plain text versions. And in particular, it would make it easy to implement a more comprehensive workaround for the "clipboard is cleared when client exits" issue (I'm aware of related discussion in #93).
Simplest design I can think of:
wl-paste --watch-all PROGRAM
invokesPROGRAM
with the list of available MIME types as arguments, and with the corresponding file descriptors made available to it in the same order beginning from fd 3.Alternatively, if we want to be more consistent with the proposal in #93 that makes use of environment variables, we could communicate the MIME types separated by newlines in an environment variable, e.g.
CLIPBOARD_MIMETYPES
, and optionally perhaps we could haveCLIPBOARD_FDS
listing the corresponding file descriptors.The text was updated successfully, but these errors were encountered: