YaLTeR / wl-clipboard-rs

A safe Rust crate for working with the Wayland clipboard.
Apache License 2.0
223 stars 16 forks source link

Implement wl-paste --watch #5

Open YaLTeR opened 4 years ago

YaLTeR commented 4 years ago

Feature parity with wl-clipboard 2.0.

An API for this sort of stuff would be nice, I imagine something like an event iterator interface?

bugaevc commented 4 years ago

😀

ghost commented 4 years ago

Note: wl-paste --watch only offers one mime type for each copy item (random or chosen by user). This is the most practical choice for a CLI command used to paste the clipboard into a program, but a generic library should allow to get the content of all offered mime types at once (my use case for example is a clipboard manager).

bugaevc commented 4 years ago

FYI if you don't care about atomicity, you can call wl-paste -l and wl-paste -t any/type from within the wl-paste -w handler.

ibrahimkettaneh commented 5 months ago

This functionality would enable the utility of wl-paste-rs for users who utilize clipboard managers such as cliphist. The following commands are necessary to update the clipboard history.

wl-paste --type text --watch cliphist store
wl-paste --type image --watch cliphist store

Incorporating this feature into this crate would be highly beneficial and greatly appreciated. Your hard work and dedication are truly valued.

imgurbot12 commented 3 months ago

another library exists that has implemented a lot of the same features including watching, but its not nearly as polished or complete as this library. it would nice to see this feature added as it would avoid my need for redundant packages for the clipboard manager I am writing. https://github.com/Decodetalkers/wayland-clipboard-listener/tree/master