Skip to content

9898287/nim-libnotify

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nim-libnotify

A minimalistic libnotify wrapper for Linux desktop notifications written in Nim.

Installation

You need to install libglib2:
sudo apt install libglib2.0-0
Then run:
nimble install libnotify

Usage

import libnotify

when isMainModule:
  let n = newNotifyClient("foo")
  n.set_app_name("hello")

  n.send_new_notification("low", "no big deal", "file://usr/share/icons/gnome/scalable/apps/user-info-symbolic.svg",
    urgency=NotificationUrgency.Low, timeout=1)

  n.send_new_notification("normal", "hm", "STOCK_YES",
    urgency=NotificationUrgency.Normal, timeout=2)

  n.send_new_notification("crit", "uh-oh", "STOCK_NO",
    urgency=NotificationUrgency.Critical, timeout=3)

  n.uninit()
  echo "done"

Testing

cd .nimble/pkgs/libnotify-<version> && nim c -r test_libnotify

About

A minimalistic libnotify wrapper

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Nim 100.0%