0.4.0 • Published 9 months ago

dunst v0.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

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 fn
    // useful for creating pango markup supported by dunst dynamically
    content: '...'
})

License

MIT

0.3.0

9 months ago

0.2.0

9 months ago

0.4.0

9 months ago

0.1.0

2 years ago