node-notifier icon indicating copy to clipboard operation
node-notifier copied to clipboard

Don't use notify-send on linux

Open RedHatter opened this issue 7 years ago • 3 comments

notify-send on linux while convenient, is slow and doesn't support actions or notification timeout. A better option would be to use libnotify directly (with C bindings). Even better would be to use the DBus interface so as to not depend on the libnotify library. See below for some examples.

libnotify-ffil Uses libnotify directly. freedesktop-notifications Uses DBus.

The best thing to do might be to depend on freedesktop-notifications and simply pass along the information to their api for linux. Why reinvent the wheel, right?

RedHatter avatar Dec 24 '17 04:12 RedHatter

Hi! If you would be interested I would happily accept a PR on this.

mikaelbr avatar Jan 13 '18 11:01 mikaelbr

Hello there, yes you're right @RedHatter, in linux node-notifier just wraps the notify-send command.

It is enough if we wan't only to push notifications without managing actions on notifications. But in my case I need it. I can test it a provide a PR if you are interested @mikaelbr. I saw that lots of people have forked this project, don't know if it has already been done ;)

albinscode avatar Oct 10 '20 09:10 albinscode

Hi all, this is my desktop notification library for Linux, it uses dbus to create notifications and has full functionality. i will consider merging it into this project, but try it first if needed.

node-dbus-notifier

Hill-98 avatar Feb 16 '22 20:02 Hill-98