DBus Notification
| Schemes | qt://, kde://, dbus:// |
| Cargo feature | service-dbus |
| Service | http://www.freedesktop.org/Software/dbus/ |
| Body formats | text (first is the default) |
| Attachments | no |
| Title length | 250 characters |
| Body length | 32,768 characters |
| Body lines | 10 lines |
| Request throttle | none |
| Vendor URLs accepted | no |
URL formats
{schema}://
{schema} is one of qt://, kde://, dbus://.
Query parameters
| Parameter | Meaning | Type | Default | Notes |
|---|---|---|---|---|
image | Include Image | bool | yes | |
urgency | Urgency | choice | 1 | also priority; one of 0, 1, 2 |
x | X-Axis | int, min 0 | ||
y | Y-Axis | int, min 0 |
The common URL parameters (format, overflow, verify, redirect, cto, rto, retry, wait, store, tag, tz, user, password, port, optional, emojis) apply as well.
Examples
Accepted URLs (tokens are fake):
kde://
dbus://
dbus://_/
dbus://_/?x=0&y=0
dbus://?image=yes
dbus://?urgency=2
qt://?urgency=low
dbus://?x=100&y=200
Rejected URLs:
dbus://_/?x=5
dbus://_/?y=5
dbus://_/?x=a&y=5
dbus://_/?x=1.5&y=5
Send one from the command line:
mercurio -t 'Backup' -b 'Finished in 42s' 'kde://'
Notes
D-Bus (dbus://, kde://, qt://): desktop notifications through org.freedesktop.Notifications on the session bus.
Mercurio has no D-Bus dependency and runs no program: it connects to the session bus itself (DBUS_SESSION_BUS_ADDRESS, else $XDG_RUNTIME_DIR/bus; unix:path= and Linux unix:abstract= addresses), authenticates with EXTERNAL and calls Notify with these arguments: app name, replaces-id 0, the icon (the bundled SVG or image_path_mask; empty with ?image=no), title, body, no actions, {urgency: byte, x: int32, y: int32} hints and a 13 s timeout.
Differences with Apprise
kde:///qt://select a Qt/GLib main loop in Apprise, while in mercurio all schemes behave alike.- Apprise attaches the icon as
icon_datapixels (GdkPixbuf), while mercurio passes the icon file asapp_icon.