Email Count Badge in Screensaver Question
Posted March 31st, 2005 @ 11:02am by Erik J. Barzeski
A Freshly Squeezed Software customer sent me an email inquiring as to whether we could do something. I'm not sure it's possible, but I did tell him I'd inquire with the world at large by posting here on my blog:
Inquiry: I would like a badge (at least half-dollar size) to float (in a corner?) ontop of my screen saver. This badge should tell how many emails I have. Possibly like the badge that goes on the Mail icon???
The reason is my screen saver is password protected and I hate having to log in to see if I received any emails or not.
I "think" there use to be something like this out but I could not find it and am not sure it would be compatible with OS X anyway.
Any ideas? I realize one could create a specific screensaver to tell you these kinds of things, but the customer is really looking for something that can be done in any screen saver. Can windows be placed above screensaver level in OS X? If so, a simple little app could do this.
Posted 31 Mar 2005 at 11:30am #
I don't believe there's a way to put a window above the screensaver.
You could probably accomplish this with a 'shim' screensaver that instantiates another screensaver view and then draws the badge on top of it. Add in a settings sheet that lets you choose the screensaver to be overlayed, and you should be golden.
Posted 31 Mar 2005 at 12:13pm #
In other words, he wants the Windows log-in screen... 😉
Posted 31 Mar 2005 at 12:47pm #
How about [myWindow setLevel:NSScreenSaverWindowLevel + 1];
Posted 31 Mar 2005 at 1:00pm #
I don't know how to do it, but it sure sounds cool. Gmail and news feed counts would be nice...
Posted 31 Mar 2005 at 1:12pm #
I'm pretty sure you can put things above the screensaver's window level. Core Graphics kCGScreenSaverWindowLevel is 1000 according to the headers (it should be the same as NSScreenSaverWindowLevel, too). That is a lot less than kCGMaximumWindowLevel, which is LONG_MAX - kCGNumReservedWindowLevels and kCGNumReservedWindowLevels is only 16. You might want to call CGShieldingWindowLevel() and see what that returns; I'd recommend that if you put a window above the screen saver level you should try to also have it be below the shield window level. At any rate, it seems like it should be possible (and perhaps easy) to come up with a little app that displays the desired badge...
Posted 31 Mar 2005 at 1:58pm #
I think this is what you are looking for: IconSticker
🙂
Posted 01 Apr 2005 at 6:44am #
I couple of years ago at MacHack there was a hack that would do this called Stinking Badges. I believe it was done by an Apple Engineer. I can look into it further and get back to you on it.
Posted 01 Apr 2005 at 7:43am #
Stinkin Badges by John Vink
http://home.cinci.rr.com/dsteinbrunner/52-Stinkin%20Badges.sitx
I pulled the project off the MacHack 2003 CD. It is hosted on some of my web space but you should not expect it to stay there for a long period of time.
Posted 01 Apr 2005 at 8:47am #
I'd be *very* careful about the implementation on this. The screensaver in Panther and later is kerberized, so, when you enter the password for it, you're updating your credentials to the system, and maybe a much larger network.
Creating a hole in this would be a bad thing.