hoodie / notify-rust

☝️send desktop notifications from your Rust app.
Apache License 2.0
1.14k stars 73 forks source link

macOs notification listeners #145

Open pevers opened 2 years ago

pevers commented 2 years ago

Hi,

Thanks for your work! I really appreciate the project!

I was wondering if there are any plans to support listeners for notification click events to notify-rust. I see from the examples that it is not supported yet: https://github.com/hoodie/notify-rust/blob/main/examples/on_close.rs. The macOS dependency mac-notification-sys seems to support it by blocking the thread and waiting until the delegate returns a value. Would it be an option to support similar semantics? Like a blocking notification API?

Or do you think it would be better to explore options to make mac-notification-sys non-blocking? (Maybe by returning the delegate and asynchronously waiting for events?)

0rvar commented 1 year ago

I need this as well