If you use the iStat Pro dashboard widget you may have noticed the following issues after you updated to new version of OS X such as Mountain Lion.

  • Processes stopped listing correctly after you installed Mountain Lion.
  • It also no long displays your external IP address.
  • There is also a cosmetic issue with the way hard drive usage is displayed when the widget is in Tall mode.

The developer has, apparently, announced they will not update it for full Mountain Lion (10.8.x) compatibility. There is, however, a very easy DIY fix. Here’s how.

Credit for these fixes goes to the many folk in the Macrumors forum who collectively provided a way to fix iStat Pro.
You can find that discussion here: http://forums.macrumors.com/showthread.php?t=1407448

If you don’t wish to apply all these fixes yourself, jump to the bottom of the article. You can then download the modified widget and install it.

Fixing the Processes display

First let’s get the Processes displaying

  1. Find the widget file. It will be in ~/Library/Widgets or /Library/Widgets
    In Finder use the Go menu, and select Go To Folder. Copy and paste in the above file location.
    The file you are looking for is called iStat Pro.wdgt
  2. If you can’t find your ~/Library/     (which is the   /username/Library/) folder, plug this command into Terminal to permanently unhide it:    chflags nohidden ~/Library/
  3. Control-Click (or double click / two-finger click) on the file. Select Show Package Contents.
  4. Depending on the view mode you use in iStat Pro, you need to edit one or both of these files: wide.js and/or tall.js – I recommend editing both. Use any text editor.
  5. Search for this bit of code:     PID|$1
  6. Change it to:  PID| $1       You are simply adding one space in front of the $ sign.

You should end up with this code segment looking like this (changed code in bold):

Fixing the external IP address issue

Next let’s get the external IP address displaying. You will notice it says Ext: Unknown.

  1. The file you need to edit this time (using the above instructions on how to find the widget) is ../scripts/core.js
  2. Find and replace the code in bold:

If you have your own web server or shared hosting account, an alternative option is to place a small php file on the server. Create a file with the name ip.php (or something along those lines). Put the following code into it:

Save this file to a publicly accessible folder on your web server. In the www root will do the trick. If you are going to use this method, then the correct final code change for the above mentioned ../scripts/core.js file is this:

You need to replace YOURDOMAIN.COM with the domain of your web site.

Fixing hard drive indicators in wide mode

Istat drive fix

If you use iStat Pro in wide mode you will notice the usage indicators for the hard drives have two bars instead of just one. The image to the right shows an example of what I mean.

Here is how to fix that.

Using the same instructions above to locate and open the widget file, do the following.

  1. Open core.css in a text editor.
  2. Find the following line of code:  .barbg { 
  3. Edit the file so that it looks like this:

.verticalbarbg { background-image:url(./images/common/bar_vertical_bg.png); width:8px; overflow:hidden; background-position: -4px 0; }

.verticalbar { background-position: -4px 0; }

canvas { background-image:url(./images/common/graph_bg.png); }

You need to add in the blue lines of code shown above. Save the file.

Restart the Dashboard

After you have applied all the changes, save your modified files, and restart the dashboard with the following command in Terminal

Download the fixed iStat Pro files

iStat Pro is no longer available for download on the Apple Widgets site. If you need it below is a link to the full and nano version. Or perhaps you don’t feel like getting your hands dirty with code, and want the finished update.

Download from here