Putting the OS X Dashboard to good use—Introducing Pegged

Wanting to display a bunch of different stats on the OS X Dashboard for easy access led me to create this very useful little widget that I want to share about.

I love stats.

Measuring and logging the metrics of any project are an essential part in properly evaluating and optimizing performance and also aids in making informed decisions. But gathering all that data doesn’t help much if you have no way of visualizing and monitoring it for changes.

For this I’m using Ducksboard. It allows you to create dashboards where you can place beautiful stat widgets like counters and graphs. The main reason I went with Ducksboard is the gorgeous user interface. I could stare at those widgets for hours. In fact I used to have a browser tab width Ducksboard open at all times—until now that is.

Dashboard “Web Clip” widgets

In wanting to save that browser tab space while also maintaining easy access to stats I thought of using those Ducksboard widgets as OS X Dashboard widgets. The Dashboard has been available in Mac OS X since Tiger but isn’t widely used. There is even a built in widget called Web Clip that allows you to easily construct widgets by selecting portions of a website in Safari. This seemed like an easy solution for what I wanted to achieve.

But it wasn’t. I wanted to create widgets from the embed URLs provided by Ducksboard in order to avoid the overhead associated with loading the entire dashboard just to clip a widget. I encountered three major issues trying to go this route:

Unfortunately this meant that the Web Clip widget was not a good fit.

Rolling my own solution

Dashboard widgets are built with HTML, CSS and of course JavaScript which made it very tempting for me to create my own—which I did. Now I won’t go into the technical aspect of creating the widget (I’ll keep that for another time) but I called it Pegged and you can check it out on GitHub. This is how it looks like configured to display a Ducksboard widget:

In case you are wondering, this is a live widget displaying the daily unique visitor count for iclanzan.com—sadly it is not real-time.

Installing and configuring Pegged requires very little effort. Just download the archive from GitHub and unpack it then double click on Pegged.wdgt to install. You can then add it to the Dashboard as you would any other widget. It will ask you for a URL to load and you can also customize the Width and Height of the widget. The default size is perfect for a small Ducksboard widget like the one you see above.

I released Pegged on GitHub hoping that it might be useful to others as well. I would love it if you let me know how you use it!