Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Added a destroyer for the Notification ptr. Mar 22, 2019
tests First commit Mar 14, 2019
.gitignore Ignore the binary. Mar 14, 2019
LICENSE Add LICENSE Mar 14, 2019
README.md Included a small binary to send notifications. Mar 22, 2019
notify.nimble Added a destroyer for the Notification ptr. Mar 22, 2019

README.md

notify-nim

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

Usage

import notify

var n: Notification = create("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

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
You can’t perform that action at this time.