You are not logged in.
Pages: 1
.
Last edited by Arciere (2025-04-30 08:42:04)
Offline
Whatever is the notification server (dunst, gnome, …), but this is not how this is done at all.
=> https://specifications.freedesktop.org/ … 01s09.html
When you request a notification, the notification server hands you back a cookie (well, it's a glorified integer…) that you can use on subsequent invocations.
"notify-send" is a cheap fire-and-forget tool, it won't allow you to do so.
dbus-send does unfortunately not support all types required by the interface, so you could use gdbus or qdbus.
Offline
.
Last edited by Arciere (2025-04-30 08:41:53)
Offline
There's a gdbus example in https://wiki.archlinux.org/title/Deskto … tions#Bash
Make the timeout on the first call "0" and on the second one "1" (this replaces the message w/ a 1ms timeout)
You'll either have to use a static UID (and hope that it's not in use) or read the output of the first call and use that later on.
W/o details on what *exactly* you want to achieve, that's all I can tell - if you've both dbus calls in the same script, you can use a variable for the UID - otherwise you'll have to store it in a temporary file.
Offline
.
Last edited by Arciere (2025-04-30 08:41:45)
Offline
1. Generic/invalid/unused cookie uid
2. https://specifications.freedesktop.org/ … 01s09.html ("actions") - nothing
3. Yes
4. You make a second notification appear that replaces the first one but only lives for a milisecond. There's no API to just withdraw notifications.
5. I've no idea (not a huge fan of icons…), but I guess just the path to the png.
6. "I ask because trying it gives me an error." - https://bbs.archlinux.org/viewtopic.php?id=57855
Offline
Pages: 1