Skip to content

Repository files navigation

FileIcons Theme

Adds specific icons for most file types for the sidebar in Sublime Text, in both color and monochrome, for any theme.

Inspired by A File Icon, and based on FileIcons, but now uses the new file icon theme mechanism.

How to use

Once you've installed the package, add the following to your user preferences:

{
	"file_icon_theme": [
		"FileIcons (mono).sublime-file-icons"
	],
}

For the colored icons replace "mono" with "color".

By default various configuration file formats are not recognized and matched to their natural file extension. For example gruntfile.js will get the icon for JavaScript rather than one specific to Grunt. To enable specific icons for this example and others like .eslintrc.mjs, package.json, etc. also add the "config" icon theme:

{
	"file_icon_theme": [
		"FileIcons (color).sublime-file-icons",
		"FileIcons config (color).sublime-file-icons"
	],
}

Tweaks for UI themes

Icons are 18x16 to work well withe Sublime's default themes. To adjust dimensions on any other theme, customize (in the command palette use "UI: Customize Theme") it by adding this to its rules:

{
	"class": "icon_file_type",
	"content_margin": [9, 8]
}

Themes often have their own color overlays on icons, tinting them to match the theme's colors. This works well for monochrome icons. For colored icons you may want to override this behavior. Customize the theme by adding this to its rules, resetting the tint to white and restoring the image's own colors.

{
	"class": "icon_file_type",
	"layer0.tint": [255, 255, 255],
}

Contributing

The "build" directory contains svg assets. Each icon is assigned a color in icons.json, available colors are listed in colors.json.

PNG icons are built using a small app written in Rust.

To add an icon:

  • add an svg asset with the correct name
  • check that the svg matches the format of the other icons
  • add an entry to build/icons.json and assign it a color
  • add an entry to the preferences directory
  • run make
  • commit the files
  • open a PR
  • 💃

Buy me a coffee

If you enjoy this package, feel free to make a little donation towards the coffee that keeps this project running. It's much appreciated!

ko-fi

About

File icons for Sublime Text

Resources

Stars

150 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages