-
-
Notifications
You must be signed in to change notification settings - Fork 93
new lib: clipboard #62
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
base: main
Are you sure you want to change the base?
Conversation
|
I'm anticipating to see this |
occured sometimes when used by multiple libs at the same time
|
What's the status of this PR? I see that it's abandoned for a few months. The Clipboard library will be very helpful for some of us, and we won't have to rely on |
|
I wasn't able to work much on astal lately, as I got occupied with other stuff and improving existing libs is more important that adding new ones IMHO, so my time went there. This was just a proof of concept. I definitely want to revive this PR. But its gonna be a complete rewrite, there are some flaws with the approach in this PR. I did some work on redesigning how Wayland protocols should be implemented in astal libs. wl-vapi-gen and #371 are key here. So before revisiting this I want to finish the astal-wl PR first and maybe implement a simpler protocol first, eg foreign-toplevel. |
Adds a clipboard library using the wlr-data-control protocol. As this uses a wlr protocol, only wlroots based compositors will be supported.
Edit: The wlr-data-control has been adopted into the wayland protocols as ext-data-control, support in compositors is still low, but this lib will support it.
The clipboard mechanism included in the wayland core protocol only allows to get clipboard changes while the client has focus. As this lib will be used mostly in bars, which don't have focus most of the time, it is basically impossible to implement a clipboard history, as many selection events will be missed. This is fixed by using the wlroots protocol, which gets these events regardless of focus. For non-wlroots compositors I would recommend using
Gtk.Clipboard, which implements the clipboard using the core wayland protocol.TODO:
This PR depends on #371