Support printing and overriding notification ID, so that it's possible
to replace a notification that is currently showing with an updated
content.
Based on patch as provided by Paul Collins in the following bug
report:
https://bugs.launchpad.net/ubuntu/+source/libnotify/+bug/257135/comments/8
Co-authored-by: Marco Trevisan (Treviño) <mail@3v1n0.net>
Fixes#19
Do not cut off an icon filename (passed to -i) at the first comma
character. The original motivation probably was to support a list of
icon names in -i separated by comma. However, this has never been
implemented and the help text for -i also only mentions "an icon".
Hence, no functionality is lost by this change. In contrast, -i now
supports commas in icon filepaths.
https://gitlab.gnome.org/GNOME/libnotify/-/issues/16
While some hints like image-path or sound-file supports parameters using the
file:// protocol, it's impossible to pass such hints to notify-send, because
it splits the passed argument so that it can have an unlimited number of colons,
while only 3 should be there (as per TYPE:NAME:VALUE format).
So, make `g_strsplit` to accept only 3 tokens as maximum, while pass the
remaining parameters all-together.
So now it's possible to do
notify-send -h string:image-path:file:///usr/share/icons/foo.png