GLib Notification
| Schemes | glib://, gio:// |
| Cargo feature | service-glib |
| Service | https://lazka.github.io/pgi-docs/Gio-2.0/classes/DBusProxy.html |
| 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 glib://, gio://.
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):
glib://
glib://_/
glib://_/?x=0&y=0
glib://?image=yes
glib://?urgency=2
glib://?x=100&y=200
glib://?priority=low
gio://?urgency=high&x=1&y=2
Rejected URLs:
glib://_/?x=5
glib://_/?y=5
glib://_/?x=a&y=5
glib://_/?x=1.5&y=5
Send one from the command line:
mercurio -t 'Backup' -b 'Finished in 42s' 'glib://'
Notes
GLib/Gio (glib://, gio://): desktop notifications through org.freedesktop.Notifications.Notify.
Like dbus://, mercurio 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
- Apprise uses a
Gio.DBusProxy, while mercurio speaks D-Bus itself; the call is the same. - Apprise attaches the icon as
icon_datapixels (GdkPixbuf), while mercurio passes the icon file asapp_icon.