MacOS – How to customize Lion Finder sidebar icons

dropboxfindermacos

I'm not looking to hack resources or use SIMBL plugins, but I would like to be able to show custom icons in the Lion sidebar.

As far as I've understood custom icons on the folder no longer show up in the sidebar and the "built-in" icons that are there are hardcoded to resources pathed in: /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources

However, I notice that the new versions of Dropbox now update the "Dropbox" sidebar icon to be a custom icon and it seems to be able to do this:

  1. Without using some code injection thing like SIMBL or needing root access
  2. Without the actual Dropbox process being running

So this leads me to believe that Lion sidebar icons are customisable, but this metadata is stored elsewhere?

xattr -l ~/Dropbox doesn't seem to list anything interesting:

com.apple.FinderInfo:
00000000  00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00  |................|
00000010  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
00000020

Best Answer

There's a good topic on this over at StackOverflow

The gist of how Dropbox does it is this:

  • injecting code into the mach_kernel so that it's not dependant on Dropbox running

So the answer is probably no, you can't do it without using code injection, but this may change in the future, or not as the case may be.