Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/federicoceratto/nim-libnotify
A minimalistic libnotify wrapper
https://github.com/federicoceratto/nim-libnotify
libnotify nim nim-lang nim-libnotify notifications
Last synced: 6 days ago
JSON representation
A minimalistic libnotify wrapper
- Host: GitHub
- URL: https://github.com/federicoceratto/nim-libnotify
- Owner: FedericoCeratto
- License: lgpl-3.0
- Created: 2015-11-15T21:51:52.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2022-06-10T17:46:43.000Z (over 2 years ago)
- Last Synced: 2023-03-22T12:49:31.779Z (over 1 year ago)
- Topics: libnotify, nim, nim-lang, nim-libnotify, notifications
- Language: Nim
- Size: 32.2 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
### nim-libnotify
A minimalistic libnotify wrapper for Linux desktop notifications written in Nim.
#### Installation
.You need to install libglib2:
[source, bash]
----
sudo apt install libglib2.0-0
----.Then run:
[source, bash]
----
nimble install libnotify
----#### Usage
[source, bash]
----
import libnotifywhen 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
[source, bash]
----
cd .nimble/pkgs/libnotify- && nim c -r test_libnotify
----