You are not logged in.

#1 2021-12-13 11:49:01

Arciere
Member
Registered: 2020-10-07
Posts: 59

.

.

Last edited by Arciere (2025-04-30 08:42:04)

Offline

#2 2021-12-13 12:19:21

seth
Member
Registered: 2012-09-03
Posts: 63,377

Re: .

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

#3 2021-12-13 15:00:14

Arciere
Member
Registered: 2020-10-07
Posts: 59

Re: .

.

Last edited by Arciere (2025-04-30 08:41:53)

Offline

#4 2021-12-13 15:12:32

seth
Member
Registered: 2012-09-03
Posts: 63,377

Re: .

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

#5 2021-12-13 16:18:06

Arciere
Member
Registered: 2020-10-07
Posts: 59

Re: .

.

Last edited by Arciere (2025-04-30 08:41:45)

Offline

#6 2021-12-13 16:28:23

seth
Member
Registered: 2012-09-03
Posts: 63,377

Re: .

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

Board footer

Powered by FluxBB