Sublime Forum

Why no icons for sublime-project files?

#1

Or workspace files, for that matter? Would be nice to at least have a a generic “sublime document” type icon.

0 Likes

#2

You can do this with a little bit of footwork.

1. Go to Applications > Sublime Text 2 > Right Click > Show Package Contents > Info.plist > Open with Sublime Text 2

2. Find:

		<dict>
			<key>CFBundleTypeRole</key>
			<string>Editor</string>
			<key>CFBundleTypeName</key>
			<string>JSON</string>
			<key>CFBundleTypeExtensions</key>
			<array>
				<string>json</string>
				<string>sublime-settings</string>
				<string>sublime-menu</string>
				<string>sublime-keymap</string>
				<string>sublime-theme</string>
				<string>sublime-build</string>
				<string>sublime-project</string>
			</array>
			<key>CFBundleTypeIconFile</key>
			<string>PROJ</string>
		</dict>

**3. Replace: ** JSON with PROJ (or whatever you wish it to be called). and SAVE

4. Go to: Contents/Resources in the same package.

5. Either make a copy of a .icns or download a new one and move it in to the folder. Name it PROJ.icns (or whatever you named it above).

6. Close down the folder.

7. Close down ST2.

8. Move ST2 from the Applications folder (or wherever you have it stored).

9. Open ST2.

10. Close ST2.

11. Move ST2 back to the previous folder (ie: Applications).

12. Open ST2.

This should give whatever Icon you defined to the filetypes:

				<string>json</string>
				<string>sublime-settings</string>
				<string>sublime-menu</string>
				<string>sublime-keymap</string>
				<string>sublime-theme</string>
				<string>sublime-build</string>
				<string>sublime-project</string>
0 Likes

#3

Basically, there is no icon for JSON filetypes. Project files, etc are lumped as JSON files. You could just make an icon for JSON.icns and be perfectly fine. That or abstract projects files out of that declaration and give them their own CFBundle and therefor their own icon and leave JSON alone.

Either way, it works.

0 Likes

#4

Probably because sublime doesn’t know how to open projects files as projects files :smile:

0 Likes