Open CesarPazzi opened 3 years ago
For Windows, it sounds easy to implement: https://stackoverflow.com/questions/59990706/how-to-capture-users-click-action-when-clicking-on-notifications
No idea how hard would it be to do for Linux. Also, this feature is a +1 from me, I could really use something like this.
@DevilXD Were you able to implement this feature for any platform? IMO the feature can be implemented on some platforms only, and raise NotImplementedError
on unsupported platforms.
@sohang3112 As I've mentioned in my message, Windows implementation should be possible, per that SO thread. I haven't been able to implement it anywhere myself, I merely pointed out that it should be possible to do so on Windows, relatively easily, by hooking up an additional window manager event to a function call. Again, no idea how it'd work on Linux or other platforms.
I'm on Windows 10 20H2 19042.685 Python version Python 3.8.2
I just download and started using pystray and just a suggestion... It would be nice to execute a function when notification is clicked.
Something like:
icon.notify("Notification Text", title="Notification Title", MyFunction)
Or if you point me where to look in the code I would like to get my hands on and when I get something I will do a PR