Macos – Finder Sidebar Icons – How to duplicate

findericonsmacmacos

I've noticed that some system directories, when dragged to the Finder's sidebar, utilize special small-scale icons not visible in any other place. Even when looking at one of these folders in a Finder window using the smallest possible icon size, these "special" icons don't appear (so it's not just the small version of the folder's icon).

So my question is, where is this information stored? If I wanted to duplicate this behavior for an arbitrary folder, where would I need to look?

I like to replace my home directory with a symlink to a location on another partition, but when I do this, I lose this sidebar icon behavior. I would love to get this back if I can.

Best Answer

It's not possible to do this yourself. These special sidebar icons are hard-coded to use files whose names start with Toolbar in /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/, such as ToolbarDownloadsFolderIcon.icns for the Downloads folder. If placed in the sidebar, this file is used instead of the folder's actual icon, which is DownloadsFolder.icns in the same directory by default.

This is why icon changing applications such as Panic's CandyBar only provide the default selection of sidebar folder icons to change.

You can get close though.


Use Icon Composer in Apple's developer tools to create an icns file with different versions for the varying sizes.

Use icns2rsrc (Rosetta needed) to convert your icns file into a rsrc file.

When you copy its icon from Finder's Get Info dialog and paste it onto a folder, the different icon versions for different sizes are preserved.

  • 16x16 is used by Finder sidebar and small list icons
  • 32x32 is used by Get Info dialog and big list icons
  • 256x256 is used by QuickLook
  • All of the sizes are used by Finder's icon view, depending on the icon size. Larger icon size is used starting at 20, 36, 132 and 260 pixels, as you'd expect.
Related Question