August 11th, 2011, 12:14 am
I posted this the other day in the general Lion discussion thread, but I kind of think it would be better to have its own thread. Hopefully the moderators will agree, but if not, feel free to move or delete this thread.
So I'm among the users going crazy thanks to apple's new "no custom sidebar icons in finder" decision. I can live without color icons, so long as I can at least assign custom icons again to differentiate between all the folders I add to my sidebar. So I've been digging through OSX trying to find a way to at least hack in support for custom icons again, but I've hit a wall, and would love some help and feedback from anyone else working on custom icons too.
Anyway, onwards!
So its easy enough to find the current icons in /system/library/coreservices/coretypes.bundle/contents/resources since they're all prefaced with Sidebar, and each has 32px and 16px monochrome resources for the new cocoa sidebar processing.
Now, go up a level and look in info.plist, and you can see that every default sidebar icon has a registered Document Type.
For example, "Sidebar All My Files Icon" has the Document OS Types set to: "sbAF"
So, next step, I made a blank text document, and using setFile from the command line, ran:
setFile -type 'sbAF' somefile.rtf
Now, after this, dragging somefile.rtf into the sidebar gave it the "All My Files" icon instead of the generic document icon. Since apple stopped using creator/type codes in snow leopard, this is an easy enough solution if you add specific documents to your sidebar.
However, I can't find a way to set a type for folders, well, because they're folders after all and don't have a type. So then I tried using an alias to a folder, and while you can set the 'type' for an alias, when you try to drag it into the sidebar, it drags the original location, and not the alias, and thus no custom icon
Any thoughts?
My best guess is that there's a hard coded list somewhere of what directories get custom icons, and if so, then its just a matter of time of finding it before we can add/delete/modify custom icons. And then it should be easy enough to add new icons to coretypes.bundle, I know that's a scary thought, but there's not much else I can think of unless apple decides to build custom icon support into a future update.
Cheers everyone,
So I'm among the users going crazy thanks to apple's new "no custom sidebar icons in finder" decision. I can live without color icons, so long as I can at least assign custom icons again to differentiate between all the folders I add to my sidebar. So I've been digging through OSX trying to find a way to at least hack in support for custom icons again, but I've hit a wall, and would love some help and feedback from anyone else working on custom icons too.
Anyway, onwards!
So its easy enough to find the current icons in /system/library/coreservices/coretypes.bundle/contents/resources since they're all prefaced with Sidebar, and each has 32px and 16px monochrome resources for the new cocoa sidebar processing.
Now, go up a level and look in info.plist, and you can see that every default sidebar icon has a registered Document Type.
For example, "Sidebar All My Files Icon" has the Document OS Types set to: "sbAF"
So, next step, I made a blank text document, and using setFile from the command line, ran:
setFile -type 'sbAF' somefile.rtf
Now, after this, dragging somefile.rtf into the sidebar gave it the "All My Files" icon instead of the generic document icon. Since apple stopped using creator/type codes in snow leopard, this is an easy enough solution if you add specific documents to your sidebar.
However, I can't find a way to set a type for folders, well, because they're folders after all and don't have a type. So then I tried using an alias to a folder, and while you can set the 'type' for an alias, when you try to drag it into the sidebar, it drags the original location, and not the alias, and thus no custom icon
Any thoughts?
My best guess is that there's a hard coded list somewhere of what directories get custom icons, and if so, then its just a matter of time of finding it before we can add/delete/modify custom icons. And then it should be easy enough to add new icons to coretypes.bundle, I know that's a scary thought, but there's not much else I can think of unless apple decides to build custom icon support into a future update.
Cheers everyone,






