Skip to content

Instantly share code, notes, and snippets.

Created January 6, 2013 00:00
Show Gist options
  • Save anonymous/4464395 to your computer and use it in GitHub Desktop.
Save anonymous/4464395 to your computer and use it in GitHub Desktop.
easy fix iStat Pro processes for Mountain Lion
source : http://forums.macrumors.com/showpost.php?p=15332289&postcount=20
It's easy to fix iStat Pro processes for Mountain Lion
Steps:
1. Locate your widget, it will be under /Library/Widgets or ~/Library/Widgets
2. Right click it and select: "Show Package Contents"
3. Open Wide.js or Tall.js file in some editor (Wide is for horizontal view, Tall for vertical)
4. Locate the line
Quote: WideSkinController.prototype.updateProcesses = function(){
var _self = this;
var exclude = "";
if(p.v("processes_excludewidgets") == 'on')
exclude = " grep -v DashboardClient | ";
if(p.v("processes_sort_mode") == 'cpu')
widget.system('ps -arcwwwxo "pid %cpu command" | egrep "PID|$1" | grep -v grep | ' + exclude + ' head -7 | tail -6 | awk \'{print "<pid>"$1"</pid><cpu>"$2"</cpu><name>"$3,$4,$5"</name></item>"}\'', function(data){ _self.updateProcessesOut(data);});
else
widget.system('ps -amcwwwxo "pid rss command" | egrep "PID|$1" | grep -v grep | ' + exclude + ' head -7 | tail -6 | awk \'{print "<pid>"$1"</pid><cpu>"$2"</cpu><name>"$3,$4,$5"</name></item>"}\'', function(data){ _self.updateProcessesOut(data);});
}
Change "PID|$1" to "PID| $1" (Add space before $ sign)
5. Save the changes
6. remove widget and re-add it Dashboard, and it should be fixed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment