Timestamp

29 views
Skip to first unread message

Garry Nevin

unread,
Dec 12, 2010, 12:01:53 PM12/12/10
to growld...@googlegroups.com
I want to know the time of a notification shown on the notification. I understand that it is a hidden feature and ran an applescript that was meant to display it but without success. Using growl was also unsuccessful.:) Pity it isn't an option check bow in preferences, should be easy to add (says I, knowing nothing!)!
Hope this clarifies my original post!

Garry

Christopher Forsythe

unread,
Dec 12, 2010, 5:23:28 PM12/12/10
to growld...@googlegroups.com
I'm still leaning to having a log file and to roll notifications into
a single one instead of having 40+ ones on screen, so you can review
the log. I think a time stamp on the notification might be useful, but
let's see if it's necessary after the logging functionality first.

Chris

> --
> You received this message because you are subscribed to the Google Groups "Growl Discuss" group.
> To post to this group, send email to growld...@googlegroups.com.
> To unsubscribe from this group, send email to growldiscuss...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/growldiscuss?hl=en.
>
>

Peter Hosey

unread,
Dec 12, 2010, 6:10:56 PM12/12/10
to growld...@googlegroups.com
On Dec 12, 2010, at 09:01:53, Garry Nevin wrote:
> I want to know the time of a notification shown on the notification. I understand that it is a hidden feature …

It isn't a feature at all: Growl does not have this, hidden or otherwise.

> … and ran an applescript that was meant to display it but without success.

What script was that?

> Pity it isn't an option check bow in preferences, should be easy to add …

The checkbox would be, yes. The implementation, not so much.

Scott

unread,
Apr 26, 2011, 10:24:47 AM4/26/11
to growld...@googlegroups.com
+1 here for adding a timestamp to Growl. 

The ability/option to show when an alert was actually posted would be incredibly useful as I have several alerts set to stay on screen so that I know certain processes occurred.  My guess is that many people would use this feature if offered - it sounds like a "microwave moment" to me (i.e., you didn't know you needed it until you had it).

Thanks for all your great work.

scott

unread,
Apr 26, 2011, 11:22:23 AM4/26/11
to growld...@googlegroups.com
I send the timestamp as part of the growl on applications that I feel
needs it (for the ones I write). Some things I dont care about the
timestamp (when Firefox finished downloading an .ISO or such, I just
care it was done).

my 2 cents

Scott

unread,
Apr 26, 2011, 11:49:19 AM4/26/11
to Growl Discuss
I appreciate your feedback but it doesn't seem to address the topic
unless I am misunderstanding your post. If I want to be able to
include a timestamp on a Growl notification that is posted on-screen
after a process is completed there doesn't appear to be an option to
do that. If there is a way to make that happen would you be kind
enough to explain?

Please note that I am not a developer and simply want the option to
include a timestamp in a standard-type notification. Modifying Growl
code or notifications is not something that I am capable of tackling.

Thanks.

scott

unread,
Apr 26, 2011, 12:01:50 PM4/26/11
to growld...@googlegroups.com
I do it from the other end. my applications write the timestamp as
part of the growl message. The option you are looking for is for
growl itself to rewrite the messages to include a timestamp.
Personally as a application developer I am not for that. but it isnt
something I would throw a fit over either.

scott

Message has been deleted

Scott Goldman

unread,
Apr 26, 2011, 12:18:53 PM4/26/11
to growld...@googlegroups.com
While that is understandable from the developer's viewpoint the average Growl user would benefit much more from the notification simply being able to indicate a timestamp of when it was posted.  

Christopher Forsythe

unread,
Apr 26, 2011, 12:39:34 PM4/26/11
to growld...@googlegroups.com
I'm ok with timestamps in the log viewer, but not in the notification itself. It seems like data you don't always need, just in certain situations which we're changing Growl to account for.

Chris

Scott Goldman

unread,
Apr 26, 2011, 12:48:25 PM4/26/11
to growld...@googlegroups.com
Well, all I'm asking for is an _option_ (e.g., a checkbox saying "Show timestamp for notification") in a display type or a specific display type that would show the timestamp, nothing more.  

While I'm not a developer it doesn't seem to me that this is the wholesale change that infer from you comment.  If you don't want to use it, fine, but offering an option to show when a notification was posted seems like a logical addition to me from a user's standpoint.  

Brian L. Matthews

unread,
Apr 26, 2011, 1:10:56 PM4/26/11
to growld...@googlegroups.com
On 4/26/11 9:39 AM, Christopher Forsythe wrote:
> I'm ok with timestamps in the log viewer, but not in the notification
> itself. It seems like data you don't always need, just in certain
> situations which we're changing Growl to account for.

It is data I don't always need. The problem is, if it's not there and I
need it, I'm out of luck. If it is there and I don't need it, I can
ignore it. I too would like the option.

Brian

Peter Hosey

unread,
Apr 26, 2011, 1:13:15 PM4/26/11
to growld...@googlegroups.com
On Apr 26, 2011, at 10:10:56, Brian L. Matthews wrote:
> It is data I don't always need. The problem is, if it's not there and I need it, I'm out of luck. If it is there and I don't need it, I can ignore it. I too would like the option.

What about having the timestamp in the notification log viewer? Would that address your needs? If not, why not?

Same question to Scott Goldman and anyone else who wants this option.

(And if we do implement it, it *will* be an option, probably per-display.)

Scott Goldman

unread,
Apr 26, 2011, 1:19:25 PM4/26/11
to growld...@googlegroups.com
No, that would be substantially less convenient. Average users (I consider myself one) will just want to see a timestamp on the notification itself and not have to take a secondary action such as opening another window or log file. An event occurs, a notification is posted onscreen, a user simply wants to know, "When did that happen? Oh, I see, about 10:00 AM" and then clicks it closed.

Anything else would make it much more cumbersome.

And an option would absolutely be preferred - I don't want it on every notification, just on some. Even if there's one notification that is designed for a timestamp (hey, you could even call it "Timestamp"!) I could select that for the events for which I want it and use the default for other events.

Many thanks for your attention to this.

Brian L. Matthews

unread,
Apr 26, 2011, 4:21:38 PM4/26/11
to growld...@googlegroups.com

Ok, I gave myself the option.

I use Christopher Lobay's excellent Mono style (with a few tweaks, the
text is too small for my terrible eyesight), so I modified it to add the
date and time when the notification is displayed. At the bottom of this
message are the diffs. A few notes:

- This uses the date the notification is *displayed*, which is different
than when the notification was *posted*. However, unless you're
receiving notifications over the network or are on a *really* slow/busy
machine, the two values should be close enough.
- It's not optional, it's there all the time.
- It uses JavaScript's default date format, which isn't all that
readable (if I do further tweaking, this is what I'll poke at first).
- As I'm just posting the diffs, you'll have to be able to apply the
changes to the files yourself.

You should probably make a backup of the style before starting, and
maybe shut down Growl, although Growl picks up the changes automatically
(nice!), so I just edited the files "live", then used growlnotify to
test. I suspect the worst that could happen if you mess something up
badly is Growl would stop displaying notifications until you fix things
(or switch to a different style).

If someone wants to take these changes and do something more with them,
feel free, they're pretty simple (so simple I'm wondering why I didn't
do this years ago :-) ).

Brian


The diffs:

diff -wrc Mono.growlStyle.orig/Contents/Resources/default.css
Mono.growlStyle/Contents/Resources/default.css
*** Mono.growlStyle.orig/Contents/Resources/default.css Sat Jul 3
15:50:38 2010
--- Mono.growlStyle/Contents/Resources/default.css Tue Apr 26
10:27:23 2011
***************
*** 6,11 ****
--- 6,12 ----
#title, #text, #textwrapper, #icon { position: relative;
-webkit-animation-iteration-count: 1; -webkit-animation-timing-function:
ease; }
#title, #text { text-align: left; text-shadow: 0px -1px 1px
rgba(0,0,0,0.7); width: 223px; z-index: 3; }
#title { color: rgba(255,255,255,0.99); font: bold 10pt "Helvetica
Neue"; letter-spacing: 0.7pt; -webkit-animation-duration: 0.7s;
-webkit-animation-name: 'titleIn'; line-height: 16px; }
+ #date { color: rgba(255,255,255,.5); font: normal 6pt "Helvetica
Neue"; margin: 2px 0 0 0; text-align: left; -webkit-animation-duration:
1.0s; -webkit-animation-name: 'textIn'; line-height: 12px; }
#text { color: rgba(255,255,255,.7); font: normal 8pt "Helvetica
Neue"; margin: 2px 0 0 0; text-align: left; -webkit-animation-duration:
1.0s; -webkit-animation-name: 'textIn'; line-height: 15px; }
#border { background: -webkit-gradient(linear, left top, left bottom,
from(rgba(255,255,255,0.0)), to(rgba(255,255,255,0.0)), color-stop(0.5,
rgba(255,255,255,0.2))); bottom: 0; left: 0; position: absolute; top: 0;
width: 1px; }
#textwrapper { padding: 0 0 0 11px; -webkit-animation-duration: 0.6s;
-webkit-animation-name: 'wrapperIn'; min-height: 34px; }
diff -wrc Mono.growlStyle.orig/Contents/Resources/template.html
Mono.growlStyle/Contents/Resources/template.html
*** Mono.growlStyle.orig/Contents/Resources/template.html Sat Dec 19
08:51:34 2009
--- Mono.growlStyle/Contents/Resources/template.html Tue Apr 26
10:18:53 2011
***************
*** 8,13 ****
--- 8,22 ----
<style type="text/css" media="all">
@import url("default.css");
</style>
+ <script type="text/javascript">
+ window.addEventListener('load', function()
+ {
+ var elem = document.getElementById('date');
+
+ if (elem)
+ elem.innerText = new Date();
+ }, true);
+ </script>
<title>Mono by Christopher Lobay</title>
</head>
<body>
***************
*** 18,23 ****
--- 27,33 ----
<div id="border"></div>
<div id="title">%title%</div>
<div id="text">%text%</div>
+ <div id="date"></div>
</div>
</div>
</div>

Scott Goldman

unread,
Apr 26, 2011, 5:53:07 PM4/26/11
to growld...@googlegroups.com
I do appreciate your efforts here, Brian. Thanks.

As a novice, though, I find this perplexing. Could you provide some additional instruction such as where to find these notification files? Are they somewhere in ~/Library, for example?

Also, once I locate the file can it be edited with a standard text editor such as TextWrangler?

Finally, rather than showing the delta - which makes sense from an analytical standpoint - would you be kind enough to post the entire code block for the notification that would include the date? I would duplicate one of the existing files, delete the text/code in it and replace it with whatever you recommend. Then I'd name it "Date notification" and relaunch Growl.

Make sense?

Again, many thanks.

____________________

Peter Hosey

unread,
Apr 26, 2011, 5:54:42 PM4/26/11
to growld...@googlegroups.com
On Apr 26, 2011, at 14:53:07, Scott Goldman wrote:
> As a novice, though, I find this perplexing. Could you provide some additional instruction such as where to find these notification files? Are they somewhere in ~/Library, for example?

Display plug-ins and styles are in ~/Library/Application Support/Growl/Plugins.

Christopher Forsythe

unread,
Apr 26, 2011, 6:28:16 PM4/26/11
to growld...@googlegroups.com
You said you want this on some but not all. Please talk about that further.

Chris

Scott Goldman

unread,
Apr 26, 2011, 7:21:01 PM4/26/11
to growld...@googlegroups.com
What I meant by that is to have one or more notification styles that would incorporate the timestamp. Probably not advisable to have the timestamp on every style  (even optionally) but to have it on one or two - or a new/special "timestamp" style would be terrific. 

Thanks to everyone for participating in this productive discussion. 

Christopher Forsythe

unread,
Apr 26, 2011, 7:27:44 PM4/26/11
to growld...@googlegroups.com
If it won't work on all display styles, it shouldn't go in.

Also, I'm not a fan of adding any more preferences like this for something that we're only guessing will address a large portion of the intended audience.

Thank you for bringing this up, we'll take it under consideration.

Chris

Scott Goldman

unread,
Apr 26, 2011, 7:56:39 PM4/26/11
to growld...@googlegroups.com
Whether it works as an option on one or all is entirely up to you as the developer. I thought that incorporating it into just a single or a few styles would be simpler; if it is easier to add it as a default selection to be shown on any notification I'd encourage you to do that. 

And from a personal usage standpoint I strongly believe that many users would find this option exceedingly useful. 

Thanks again.  

Peter Hosey

unread,
Apr 27, 2011, 12:55:17 AM4/27/11
to growld...@googlegroups.com
On Apr 26, 2011, at 16:56:39, Scott Goldman wrote:
> And from a personal usage standpoint I strongly believe that many users would find this option exceedingly useful.

I don't know about that, but you're not the first person to request this, so we know at least that there are many users who want it.

I've opened a ticket for further discussion of merits both of the feature in general and of specific possible implementations:

http://code.google.com/p/growl/issues/detail?id=193

All users who want this feature should star that ticket, and ideally should make their case for the feature and how they think it should work and why.

rjt-grow...@sandbar.river.com

unread,
Apr 27, 2011, 1:46:00 AM4/27/11
to growld...@googlegroups.com
On Tue, Apr 26, 2011 at 09:55:17PM -0700, Peter Hosey wrote:
> On Apr 26, 2011, at 16:56:39, Scott Goldman wrote:
> > And from a personal usage standpoint I strongly believe that many users would find this option exceedingly useful.
>
> I don't know about that, but you're not the first person to request this, so we know at least that there are many users who want it.
>
> http://code.google.com/p/growl/issues/detail?id=193

I'm unable to "sign in" to contribute on that site, but if my login worked
I would star the item and make the following point:

Analyzing my use of sticky notifications, I realize that each and every
time I come back to one on my screen, I'm then checking other sources of
info for when the notification was posted.

This is in fact why I have not upgraded past Growl 1.2. One of my sources
of "when did that notification get posted" information is the logs viewed
via Console.app. The extremely chatty debug info about display rect
calculation logged by Growl 1.2.1 caused me to back off to 1.2 in order to
have the necessary timing info still in the log files by the time I
checked for it. At the time, I believe I suggested operational vs. debug
logging be done.

Optional timestamps including dates in the sticky notifications would make
secondary checks for when the event happened less necessary for me.

Peter Hosey

unread,
Apr 27, 2011, 2:08:18 AM4/27/11
to growld...@googlegroups.com
On Apr 26, 2011, at 22:46:00, rjt-grow...@sandbar.river.com wrote:
> I'm unable to "sign in" to contribute on that site, but if my login worked
> I would star the item and make the following point: …

Since you're unable to sign in (I'm guessing you subscribed to the group via email), I've posted your comments there myself.

Christopher Forsythe

unread,
Apr 27, 2011, 2:34:12 AM4/27/11
to growld...@googlegroups.com
It also sounds like the rollup+log viewer approach would solve this for you as well though.

I'm not convinced that time stamps on notifications are needed at all. Let's see how the log viewer + rollup works first. If there is still a need after that we can revisit this thread though.

Peter Hosey

unread,
Apr 27, 2011, 2:42:43 AM4/27/11
to growld...@googlegroups.com
On Apr 26, 2011, at 23:34:12, Christopher Forsythe wrote:
> It also sounds like the rollup+log viewer approach would solve this for you as well though.

Oops; I forgot to mention that on the ticket. I have now done so.

Richard Johnson

unread,
Apr 27, 2011, 8:35:12 AM4/27/11
to growld...@googlegroups.com

Thanks, yes, that will work to replace using Console.app.

However, the rollup+log viewer approach would still involve the extra check
being done manually every time there's a sticky notification to
investigate. Putting the timestamp on select preconfigured sticky
notifications themselves would avoid the extra steps.

Brian L. Matthews

unread,
Apr 28, 2011, 12:40:53 PM4/28/11
to growld...@googlegroups.com
On 4/26/11 2:53 PM, Scott Goldman wrote:
> I do appreciate your efforts here, Brian. Thanks.
>
> As a novice, though, I find this perplexing. Could you provide some additional instruction such as where to find these notification files? Are they somewhere in ~/Library, for example?

Peter answered this but for completeness, it's ~/Library/Application
Support/Growl/Plugins.

> Also, once I locate the file can it be edited with a standard text editor such as TextWrangler?

Both files are regular old text files, so anything that leaves them as
just text should work.

> Finally, rather than showing the delta - which makes sense from an analytical standpoint - would you be kind enough to post the entire code block for the notification that would include the date? I would duplicate one of the existing files, delete the text/code in it and replace it with whatever you recommend. Then I'd name it "Date notification" and relaunch Growl.

I'm not entirely comfortable doing that, and the diffs are pretty
straightforward (basically any line that starts +<space> gets inserted
in a location determined by the lines before and after, and then the
+<space> removed).

Brian

Scott Goldman

unread,
Apr 28, 2011, 12:44:45 PM4/28/11
to growld...@googlegroups.com
Thanks VERY much, Brian. Your instructions for how to determine the differences are clear and helpful. I'll take a shot at modifying one of the styles and seeing what I come up with. If it works properly I'll be happy to post a link to it here for others to use as they see fit.

Scott

unread,
Apr 29, 2011, 12:28:56 PM4/29/11
to Growl Discuss
I have made the modifications as per Peter's instructions. Here is
what I did:

1. Found the "Mono" style in the location Brian specified (~Library/
Application Support/Growl/Plugins).
2. Made a copy of the Mono style by using the "Duplicate" command.
3. Quit Growl.
4. Renamed the duplicate to "Timestamp".
5. Opened Timestamp in TextWrangler.
6. Made the modifications to the default.css and template.html files.
7. Saved the individual files and the entire Timestamp.growlStyle
file.
8. Quit TextWrangler.
9. Relaunched Growl.

In looking in the Display Options list of styles Timestamp did not
appear. I logged out/in and rechecked - it still does not appear.
It's entirely possible that I incorrectly modified one of the files
and thus it's not appearing, but the file does appear in the proper
location and with the proper icon in my Growl/Plugins folder.

Is there something else I need to do in order to get the new style to
appear?

If anyone cares to evaluate the style files I have zipped them and
posted them in my Public Dropbox here:

http://dl.dropbox.com/u/787107/Timestamp.growlStyle.zip

Thank you all again for your assistance.

Peter Hosey

unread,
Apr 29, 2011, 12:51:20 PM4/29/11
to growld...@googlegroups.com
On Apr 29, 2011, at 09:28:56, Scott wrote:
> I have made the modifications as per Peter's instructions.

You mean Brian's?

> Is there something else I need to do in order to get the new style to appear?

You need to edit Info.plist to change the style's name.

Scott

unread,
Apr 29, 2011, 3:51:05 PM4/29/11
to Growl Discuss
Thanks for the correction - yes, the modifications as per Brian's
instructions.

I have gone back into the package and edited the Info.plist file as
follows:

<key>CFBundleName</key>
<string>Timestamp</string>

Then saved the file, logged out and back in, but still do not see it
in the Display Options. Have I missed something?

Thanks.

Peter Hosey

unread,
Apr 29, 2011, 3:52:14 PM4/29/11
to growld...@googlegroups.com
On Apr 29, 2011, at 12:51:05, Scott wrote:
> I … still do not see it in the Display Options.

Please zip up the style bundle and send it to the group by email as an attachment.

Scott Goldman

unread,
Apr 29, 2011, 3:53:54 PM4/29/11
to growld...@googlegroups.com
Style bundle zipped and attached.


> On Apr 29, 2011, at 12:51:05, Scott wrote:
>> I … still do not see it in the Display Options.
>
> Please zip up the style bundle and send it to the group by email as an attachment.
>

Timestamp.growlStyle.zip

Peter Hosey

unread,
Apr 29, 2011, 4:02:56 PM4/29/11
to growld...@googlegroups.com
On Apr 29, 2011, at 12:53:54, Scott Goldman wrote:
> Style bundle zipped and attached.

You also need to change CFBundleIdentifier. (And please don't use the com.growl domain.)

Scott Goldman

unread,
Apr 29, 2011, 8:11:46 PM4/29/11
to growld...@googlegroups.com
Thank you for all of your assistance. I've made the necessary changes to the CFBundleIdentifier and the Timestamp notification style did, in fact, appear, in the Growl notification list. I've tested it and it works as it should. I took the liberty of tweaking a few settings for the font and color of the time stamp so that it's easy to see.

A minor tweak request - I'd like to be able to show the time in AM/PM instead of a 24-hour clock. Can anyone offer guidance on that?

Finally, I want to be sure to respect the appropriate protocols here. I didn't write this style and don't claim credit for it. I only modified the original author's work (and very slightly at that - and with the help of Brian and others in this group) and noted that in the credits. I do not wish to diminish the author's (or Brian's) efforts and want to ensure that the credit is correctly given. When you look at the files and see my name and URL buried somewhere in there do not hesitate to tell me if it is out of place or inappropriate. Everyone here has been exceedingly helpful and I want to be respectful of that.

Thanks, everyone, for all your assistance. A current version of the Timestamp style is attached.

Timestamp.growlStyle.zip

Josh

unread,
May 2, 2011, 4:18:46 AM5/2/11
to growld...@googlegroups.com

On 30 Apr 2011, at 01:11, Scott Goldman wrote:

> A minor tweak request - I'd like to be able to show the time in AM/PM instead of a 24-hour clock. Can anyone offer guidance on that?

this would be a case of playing with the javascript date object.
eg. so instead of just doing
elem.innerText = new Date();
you'll need to format the date how you want it and set elem.innerText to that:
var now = new Date();
elem.innerText = now.toDateString() + " the time in my format here";

Unfortunately, there isn't a whole lot of built-in functionality to help that i can find.
This should help though: http://www.webdevelopersnotes.com/tips/html/10_ways_to_format_time_and_date_using_javascript.php3

Scott Goldman

unread,
May 2, 2011, 12:43:20 PM5/2/11
to growld...@googlegroups.com
Thanks, Josh. I've looked at the example javascript from the site you recommended and there's a whole lot of work involved to get it right. I think I'm at the point where the current time/day format will suffice.

Falling With Style

unread,
May 4, 2011, 2:52:17 AM5/4/11
to Growl Discuss
+1 on adding this feature from me as well. I have spoken to several
other Growl users at work, and many agreed it would be very useful.
In addition, I subscribe to Growl notifications from several other
machines, and would love to be able to tell which machine sent the
notification.
Since earlier in this thread, the question of "why would you want
this" arose, I will attempt to answer this from my perspective:

I use Time Machine Growler to notify me of the steps that Time Machine
takes during the course of doing backups, from several machines.
I also use sticky notifications when I want to review a group of
notifications.

If I walk away from my machine for a brief period (or take a phone
call, etc.), I can't tell when the notifications specifically
occurred, nor can I tell which machine they came from.

Like many users, I looked for the ability to turn those items on (I
suspect they would belong in the Display Options tab), and when I
discovered they didn't exist, I resolved to live with it as is.

Only after a bout of insomnia tonight, did I decide to Google it, and
eventually came across this forum.

For myself, I could live with a log viewer approach, but I think
Garry's original request to have it be an option (or a possible option
for a specific style), would make it more accessible to many users. I
certainly don't see a downside to offering it as a setting, other than
the effort to do the development work.

I see how Brian use a script to get the current date, but I can't see
any way to derive the machine that sent the notification in a similar
fashion.

All that being said, what is really being asked for are two new style
keywords: %timestamp% and %machine%

*** Brian - Any chance of PM'ing or publishing that style you worked
up? I can't seem to reverse engineer it from your diff above, given
the text wrapping here, and the sorry state of my brain at this hour.
I would really like to work up a variant of Basics with a timestamp.
Christopher Lobay really won my heart with that design ***
Reply all
Reply to author
Forward
0 new messages