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:
- The widget was taking up the entire browser window and Safari wasn’t letting me shrink the window to the required size for me to create the web clip.
- Web Clip widgets look horrible. The widget adds decorations and gloss on top and around the content.
- You cannot interact with the website inside the widget.
Unfortunately this meant that the Web Clip widget was not a good fit.
Rolling my own solution
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!