Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 59 lines (35 sloc) 1.495 kb

An Erlang NIF interface to the libnotify library. libnotify is used to send desktop notification bubbles. See:

https://wiki.ubuntu.com/NotifyOSD

SCREENSHOTS

Default Notification

Default Notification

Using a libnotify icon

To see the available icons:

dpkg -L notify-osd-icons

Then:

> notify:osd([{icon, "notification-gpm-phone-020"}]).

Default Notification

RSS Feed

Default Notification

HOW TO BUILD IT

sudo apt-get install libnotify-dev
make

HOW TO USE IT

osd(Options) -> ok | {error,enomem}
    Types   Options = [Opt]
            Opt = [{summary, string()}, {body, string()}, {icon, string()},
                    {category, string()}, {urgency, int()}, {timeout, int()},
                    Hints]
            Hints = [string() | {string(), Value}]
            Value = [string() | integer() | double() | Byte]
            Byte = {byte, uchar()}

EXAMPLES

> notify:osd([]).
> notify:osd([{summary, "hello"}, {body, "world"}]).

> notify:osd([{icon, "notification-audio-volume-medium"},
        {hints, [{"value", 75}, "x-canonical-private-synchronous"]},
        {summary, "Volume"},
        {body, ""}]).

> rss:start().

TODO

Something went wrong with that request. Please try again.