dnotify is an abstraction of libnotify for the D programming language.
Just compile your sources with
deimos.notify.notify.d and you can use it.
External libraries are automatically linked in with
you can disable this with the
Furthermore there is a
-version=NoGdk switch, which will disable the support
for loading images from the filesystem with
but it also removes the
dnotify takes care of calling the
libnotify initializer and finalizer. The application name
is by default
"dnotify.d", to change this, call
set_app_name(in char name).
To create a notification bubble you have to instantiate the
Notification class is an abstraction of NotifyNotification.
auto n = new Notification("headline/summary", "body", "icon");
A list of available icons can be found here
/usr/share/icons/gnome/scalable/status. Instead of passing one of the predefined
icons you can also pass a full path to a .sqv/.png/.jpg. If the path or name does not exist
an empty notification bubble is displayed.
To display the notification you have to call the
auto n = new Notification("headline/summary", "body", "icon"); n.show()
Possible errors in
.set_image are translated into D exceptions and will
Beside the NotifyNotification abstraction dnotify also provides an abstraction for the
Notification API. It also
takes care of freeing the allocated objects from
Notification.set_image currently results in a segmentation fault.