Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ramhejazi/dunst

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

14 Commits

Repository files navigation

dunst

Simple node wrapper for dunstify (dunst notification daemon)

Installation

$ npm i dunst

Usage

const notifier = require('dunst').spawn({
 // dunstify "-r" flag, optional
 id: 123, 
 // title of the notification
 title: 'my app',
 /* 
 optional formatter for manipulating notification's body
 called before showing notifications
 */ 
 formatter(data) { 
 data.content = '[prefix] ' + data.content;
 return data;
 }
})
notifier.show({
 // overwrite instance id, optional
 id: 124,
 // urgency of notification, dunstify -u flag, optional
 type: 'normal', 
 // overwrite instance title, optional
 title: 'my app'
 /* 
 body of notification, will be passed to optional formatter function.
 useful for creating pango markup supported by dunst
 */ 
 content: '...'
})

License

MIT

About

JS library for sending notifications via dunst

Resources

License

Stars

Watchers

Forks

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /