node-notifier
node-notifier copied to clipboard
Sticky on MacOS?
Hi guys,
How to force it to be sticky until user clicks on MacOS?
Tried:
timeout: 999999
reply: true
reply: true, timeout: 999999
and
timeout: 999999
}, function () {
console.log(arguments);
}
Did not work for me. Thanks.
I don't think sticky is supported yet. There has been an issue with timeout settings in terminal-notifier (used to do notifications), so it might work better when new version is released. Have you tried the master branch and seen what the results are there?
It looks like sticky is supported in the version of terminal-notifier
you have vendored in. For example, if I clone the repo and run npm install
, I can run:
./vendor/terminal-notifier -message hello
The problem I seem to have is that your NotificationCenter
code has this:
timeout = setTimeout(
function() {
cp.kill('SIGTERM');
},
FAILSAFE_TIMEOUT
);
which prevents me from having a notification open for more than 30 seconds. Can you please make this configurable?
This is due to a memory leak in the terminal-notifier which has been patched (and is in master), but there are some breaking changes in the way terminal-notifier handles icons which hasn't been resolved yet. The master branch now has the memory leak workaround removed, as the master uses the 1.8 version of terminal-notifier.
@mikaelbr Thanks for the context. Is there a task filed against https://github.com/julienXX/terminal-notifier that is tracking this?
Hmm, so it looks like the 2.0.0 release of terminal-notifier drops support for sticky notifications and says alerter should be used for those instead?
https://github.com/julienXX/terminal-notifier/releases/tag/2.0.0
alerter seems to be a fairly small, native macOS project:
https://github.com/vjeantet/alerter
I think we need to get off of terminal-notifier
since it hasn't had a release since Nov 1, 2017
and seems to apparently still have reduced functionality.
Open to suggestions for alternatives.