Closed briancordanyoung closed 11 years ago
Totally goofed on this one. I see now that the user can do this themselves. doh! This issue should be closed.
Do you mean globally configuring terminal-notifier
to always use 'sticky' notifications, via System Preferences?
I'd still love a way to control 'stickiness' on a per-invocation basis, analogous to what growlnotify
offers for Growl.
Like you, however, I don't know if the Notification Center APIs allow that.
+1 for per-notification stickiness
There does not appear to be a sanctioned API for this, in case anyone finds a solution let me know.
Currently you are using Banners which doesn't use sticky but Alerts does by default.
@cdenneen Are you saying that this can be done through the APIs? If so, please let us know or submit a patch.
It's possible to use Alerts by default by adding this key to Terminal Notifier-Info.plist:
<key>NSUserNotificationAlertStyle</key>
<string>alert</string>
But I don't see how we could switch styles on demand.
It would definitely be nice to have a command line option for stickiness, instead of having to set it globally in System Preferences.
Absolutely agree. This is the only reason I still use growlnotify for some things
On May 2, 2014, at 2:21 PM, ceilingcat notifications@github.com wrote:
It would definitely be nice to have a command line option for stickiness, instead of having to set it globally in System Preferences.
— Reply to this email directly or view it on GitHub.
Wouldn't it work if you change globally to Alerts from Banners, then accept an expiration option (and default it if not set), then use a LaunchAgent to clean up expired notifcations?
But alerts "steal focus" right? That would be exactly what I do not. I just want something to stay there until I can deal with it.
Alerts don't appear to steal focus. I checked by running this sleep 5 && terminal-notifier -message test
and then switching to a few different apps before the notification was activated. It didn't steal focus from any of them.
+1 for per-notification stickiness
You can use the -timeout
flag to dismiss the notification automatically after a duration. This works with the alert style notification. Another idea (which is far from ideal) is to make a copy of the terminal-notifier app and set original to alert style, and the copied one to banner style (shrug).
Here's a PR to add a note about the system preference to the README: https://github.com/julienXX/terminal-notifier/pull/244
I don't know if apples API's allow for it, and I didn't see anyone else ask yet, but it would be great if an option was added to make the notification 'sticky' like the Reminders.app can do. I assume it would be based on the group id, but that group id would stay on screen until the user dismissed it. Is this possible?