Google Desktop Sidebar: Laundry Timer Plug-in
The Laundry Timer plug-in is the result of my search for a relatively simple project to introduce myself to the Google Desktop Sidebar (GDS) plug-in scripting API. It sounded simple at first. Start a timer and then get a notification when it runs its course. Of course, when it was done, the plug-in ended up making use of almost everything available in the API and got redesigned at least three times to dance around API deficiencies and bugs.
Now, it is a tank. I can't imagine a more thoroughly engineered laundry timer. You can throw power failures, unexpected shutdowns, and reinstallations at it and it will still keep going. This is thanks in part to the aforementioned bugs and API holes and in part to my nit-picky nature. It's even set up to be easily modified to connect to your laundry machine's web interface once that kind of thing becomes normal. I've only ever heard of one dorm with that set up, but you gotta figure this feature's around the corner.
Overall, the javascript API is usable and I'm sure it'll get better in the future. This project was pretty fun and now that I've gotten the hang of the mechanics, I'm sure I can whip out future Sidebar plug-ins quickly and relatively painlessly. If you're interested in making your own scripted plug-ins, the Google Desktop Developer Group is an invaluable resource. Happy washing!
Where it is now:
Version: v1.2 // 2006.03.15
download (89k)
instructions (2k)
small screenshot
large screenshot
Implemented v1.2:
- utilized cleanup function introduced in GDS 3
Implemented v1.1 & v1:
- independent washer and dryer timers
- popup and sound notification
- internationalization, ready to be localized (even the cycle times)
- fun icons based on global standards
- text and graphics based status indicators
- useful even when the tile is minimized
- keeps track of the last time you did laundry
- variable updates (more frequent when the load is closer to done) - this is actually done to get around a menu updating issue, but you probably don't care about each second when you're an hour out anyway
GDS Scripting API Wishlist:
- a way to show a notification without having to remove and add my tile
- more consistent notification popup; sometimes it shows up, and sometimes it doesn't regardless of whether the sidebar is hidden
- better documentation; the existing documentation needs to be more readable, and some of the items need more detail (i.e. "gddItemDisplayAsNotificationIfSidebarHidden -- Display the item in the notification window if the Sidebar is hidden." With this flag, will the notification only display if the Sidebar's hidden? Does this override gddItemDisplayAsNotification or build on top of it so that a notification shows regardless of whether the Sidebar is hidden?)
- don't unload/reload the plugin when the Sidebar is minimized; this causes two problems: 1 -- javascript variables get lost, and 2 -- the notification window shows multiple messages (an extra one for each state change) even though there is only one tile. Even more fun is the fact that one of the messages is in sync with the controls and reality in general, and each of the other messages is continuing to march along to its own tune and timer, global, permanent state variables be damned. This is probably also the cause of the double sound alert you hear when you start a timer then minimize the Sidebar.
- ability to change text's font, size, and color
- a way to interact with the context menu other than shutting it off
last modified // 2006.03.15 // 18:42
kstroke // projects // nerdy