mikaelbr / node-notifier-cli

CLI API for node-notifier as separate package.
143 stars 13 forks source link

Terminal hangs for like 10 seconds #18

Open Zashy opened 4 years ago

Zashy commented 4 years ago

Was hoping to send a notification, and carry on with some other tasks, but found that this hangs in the terminal. It used to work how I was hoping from v1.1.2 and earlier though, so I'll use that for now.

Input:

notify --title "Doing stuff" --message "Hang on"

Output after 10 seconds or so:

timeout
n18l commented 4 years ago

I noticed the same thing after trying this out today. Based on the documentation from the main package, it looks like the timeout is intentional:

As of Version 6.0 there is a default timeout set of 10 to ensure that the application closes properly. In order to remove the timeout and have an instantly closing notification (does not support actions), set timeout to false. If you are using action it is recommended to set timeout to a high value to ensure the user has time to respond.

Unfortunately the CLI version doesn't yet appear to have support for a --timeout flag to disable this behaviour.

moshfeu commented 4 years ago

Maybe instead of a timeout flag, there will be a flag for something like "Don't wait for click" because the timeout is because the user doesn't click on the notification. Click on the notification ends the process.

cdeutsch commented 3 years ago

FWIW, v1.1.0 doesn't have the issue and most of the core functionality is there.