No description
Find a file
2019-07-23 08:58:30 +02:00
src Added some protections to text input in the command line. 2019-07-23 08:58:30 +02:00
tests Added the OR op for strings. 2019-07-17 13:33:42 +02:00
.gitignore Added the OR op for strings. 2019-07-17 13:33:42 +02:00
LICENSE Add LICENSE 2019-03-14 13:29:02 +00:00
notify.nimble Re-generated the docs. 2019-07-17 13:42:56 +02:00
README.md Set the README.md to link to the current docs on githack.com. 2019-07-17 13:48:29 +02:00

notify-nim

A quick wrapper over libnotify, a library to show unobstrusive notifications in a Gnome environment.

Usage

import notify

var n: Notification = newNotification("Title", "Body of the notification", "dialog-information")
# Optionally set a timeout in milliseconds
n.timeout = 1000
discard n.show()

icon values are PNG files found in places like /usr/share/icons/gnome/. Some useful ones are:

dialog-error        avatar-default  user-invisible
dialog-information  computer-fail   user-available
dialog-warning      network-error
task-due            network-idle

Install

Best You can require it in your_program.nimble file:

requires "nim > 0.19.0", "notify"

Or you can install it with nimble:

nimble install notify

Requisites

You should have libnotify.so in your system, usually doing something like:

 [ubuntu]$ sudo apt install libnotify
 [fedora]$ sudo dnf install libnotify

What you get

You get a light wrapper and a notify binary to send notifications from the command line::

  $ notify Title "Body of the notification" task-due 2000

Docs

In the src dir, created from the code comments with nimble doc src/notify.nim. Viewable also with githack