ms7m / notify-py

:speech_balloon: | A simple Python Module for sending cross-platform desktop notifications on Windows, macOS and Linux
MIT License
262 stars 26 forks source link

Add on click callback #61

Open SuperZombi opened 7 months ago

SuperZombi commented 7 months ago

Hello. Could you add a cross-platform callback implementation when the notification is clicked (or add a button in notifications). I think this would be very useful.

SuperZombi commented 7 months ago

Example:

from notifypy import Notify

notification = Notify(...)

def callback(notification):
    print(notification.message)

notification.send(on_click=callback)