-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
- Desktop Notifier version: 3.5.6
- Python version: 3.8
- Operating System: Windows 3.10
Description
I am trying the callback mechanism using the Et tu brutus example on Windows. There is no feedback after responding to the notification, I checked if the terminal was hanging by hitting enter a few times, but no, the callbacks don't seem to be executed.
Any special things I forgot for Windows? It works on my mac...
This script saved as send.py
import asyncio
from desktop_notifier import DesktopNotifier, Urgency, Button, ReplyField
notifier = DesktopNotifier()
async def main():
await notifier.send(
title="Julius Caesar",
message="Et tu, Brute?",
urgency=Urgency.Critical,
buttons=[
Button(
title="Mark as read",
on_pressed=lambda: print("Marked as read")),
],
reply_field=ReplyField(
title="Reply",
button_title="Send",
on_replied=lambda text: print("Brutus replied:", text),
),
on_clicked=lambda: print("Notification clicked"),
on_dismissed=lambda: print("Notification dismissed"),
sound=True,
)
loop = asyncio.get_event_loop()
loop.create_task(main())
loop.run_forever()
Executed
python send.py
Then entered answer in the textbox and clicked send
Metadata
Metadata
Assignees
Labels
No labels
