New answers tagged notifications
1
From CLI, you can display and close a notification pop-up via gdbus/qdbus.
Here's how to that with gdbus:
gdbus call --session --dest org.freedesktop.Notifications --object-path /org/freedesktop/Notifications --method org.freedesktop.Notifications.Notify my_app_name 42 audio-card "Message" "Body" [] {} 20
this will output something like:
(uint32 72,)
...
3
Use update method and call show method again:
#!/usr/bin/python
# -*- coding: utf-8 -*-
import pynotify
import time
pynotify.init("Basic")
n = pynotify.Notification("Title1", "body1", "dialog-warning")
n.show()
time.sleep(1)
n.update("Title2", "body2", "dialog-warning")
n.show()
Update:
There is close method but... it doesn't work at all. ...
Top 50 recent answers are included