julienXX / terminal-notifier

Send User Notifications on macOS from the command-line.
Other
6.37k stars 330 forks source link

Keep notification on screen while timeout is active #179

Closed martinvandiemen closed 7 years ago

martinvandiemen commented 7 years ago

The notification message disappears after 5 seconds. Could this be matched with timeout? So if a timeout of 30 seconds is set the notifications stays on the screen for 30 seconds?

Thanks again!

kootenpv commented 7 years ago

Very surprised that indeed "timeout" did not do what I expected it to do. Might it have to do with the fact that I installed it from Ruby gem?

julienXX commented 7 years ago

You have to set your notification to Alert type for it to work.

martinvandiemen commented 7 years ago

Hi @julienXX, could you please give me an example? Thanks!

julienXX commented 7 years ago

@martinvandiemen in your preferences, you must set you notifications for terminal-notifier like this https://www.dropbox.com/s/n2kt0in8q6syiu6/Screenshot%202016-10-11%2014.27.27.png?dl=0

martinvandiemen commented 7 years ago

@julienXX, sorry I was looking at one of the options. This makes sense although it's hard to manage those setting via terminal. Each sender has it's own item in Notifications. Would it be possible to manage the alert option via terminal-notifier? Thanks again!

julienXX commented 7 years ago

@martinvandiemen I haven't found how to manage those settings so far.

rr0ss0rr commented 7 years ago

I have Alerter set up as "Alerts" in notification center and Terminal-notifier as "Banners". I was hopeful that with the new code, I would be able to have a "Banner" act as an "Alert". Alerter is used only in the situations where I want the message to stay on the screen until I click on it. For the most part, I just want Terminal-notifier to act as "Banners" so I don't want to set Terminal-Notifier messages to be Alerts in Notification center.

julienXX commented 7 years ago

@rr0ss0rr unfortunately it's not possible, OSX Banner notification have a default timeout of 5 seconds. It works if you set the -timeout to less than 5 seconds but that's not very useful. So in Banner mode -timeout option is kinda useless.

rr0ss0rr commented 7 years ago

Can terminal-notifier some how be registered twice in Notification Center? Then you can set one as alerts and the other as banners. Probably not.

julienXX commented 7 years ago

Probably not but I'll check.

kootenpv commented 7 years ago

@rr0ss0rr Ironically I have like 5 versions showing up there. Somehow they are not removed from there (notification preferences) when we uninstall previous versions. So, I'm actually pretty convinced it should be possible: just install 2 different versions and make sure they do not collide (then again, I'm not at all associated with this project, so what do I know).

julienXX commented 7 years ago

@rr0ss0rr @kootenpv yes you have a terminal-notifier per terminal-notifier version so maybe there is something to be done here.

rr0ss0rr commented 7 years ago

Perhaps there is a way to create a separate bootstrap that calls terminal-notifier where it could have it's own notification center entry .. ie terminal-notifier-alert