Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

58 lines (34 sloc) 1.487 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, iodata()}, {body, iodata()}, {icon, iodata()},
                    {category, iodata()}, {urgency, integer()},
                    {timeout, integer()}, Hints]
            Hints = [atom() | {atom(), Value}]
            Value = [iodata() | integer() | float() | Byte]
            Byte = {byte, byte()}

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().
Jump to Line
Something went wrong with that request. Please try again.