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

Sticky on MacOS?

Open AlexanderTserkovniy opened this issue 7 years ago • 7 comments

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.

AlexanderTserkovniy avatar Jul 13 '17 19:07 AlexanderTserkovniy

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?

mikaelbr avatar Aug 01 '17 09:08 mikaelbr

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?

bolinfest avatar Sep 02 '17 23:09 bolinfest

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 avatar Sep 03 '17 09:09 mikaelbr

@mikaelbr Thanks for the context. Is there a task filed against https://github.com/julienXX/terminal-notifier that is tracking this?

bolinfest avatar Sep 08 '17 18:09 bolinfest

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

bolinfest avatar Nov 17 '17 18:11 bolinfest

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.

kevinelliott avatar Mar 05 '19 22:03 kevinelliott

Open to suggestions for alternatives.

mikaelbr avatar Mar 08 '19 18:03 mikaelbr