Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

GLib Notification

Schemesglib://, gio://
Cargo featureservice-glib
Servicehttps://lazka.github.io/pgi-docs/Gio-2.0/classes/DBusProxy.html
Body formatstext (first is the default)
Attachmentsno
Title length250 characters
Body length32,768 characters
Body lines10 lines
Request throttlenone
Vendor URLs acceptedno

URL formats

{schema}://

{schema} is one of glib://, gio://.

Query parameters

ParameterMeaningTypeDefaultNotes
imageInclude Imageboolyes
urgencyUrgencychoice1also priority; one of 0, 1, 2
xX-Axisint, min 0
yY-Axisint, 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_data pixels (GdkPixbuf), while mercurio passes the icon file as app_icon.