Skip to content

Icon Packs ​

Icon packs in Xed-Editor define how files and folders look like throughout the application.

By default, Xed-Editor uses the Simple Icons icon pack. This pack provides monochrome icons that are automatically tinted using the primary color of the active theme.

However, custom icon packs can be installed and used to fully replace or extend the default icon set.

Installing Icon Packs ​

An icon pack is distributed as a .xed package (a ZIP file) that contains a manifest JSON file and the icons. You can install it by going to Settings → Store → Install from storage and selecting the .xed package from storage.

Creating an Icon Pack ​

Icon packs follow a simple manifest-based structure (similar to a lookup table that maps file/folder patterns to icon assets).

TIP

Instead of creating an icon pack from scratch, you can use the Icon-Template repository as a starting point.

Basic Structure ​

An icon pack is defined using a JSON manifest that maps patterns to icon files:

json
{
  "$schema": "https://raw.githubusercontent.com/Xed-Editor/Xed-Schemas/main/icon.json",
  "id": "unique-icon-pack-id",
  "name": "My Icon Pack",
  "type": "icon_pack",
  "author": {
    "displayName": "Unknown"
  },
  "repository": "https://github.com/you/my-icon-pack",
  "minAppVersion": 87,
  "applyTint": false,
  "icons": {
    "defaultFile": "icons/path-to-icon.svg",
    "defaultFolder": "icons/path-to-icon.svg",
    "defaultFolderExpanded": "icons/path-to-icon.svg",
    "folderNames": {
      "name-of-the-folder": "icons/path-to-icon.svg"
    },
    "folderNamesExpanded": {
      "name-of-the-folder": "icons/path-to-icon.svg"
    },
    "fileNames": {
      "name-of-the-file": "icons/path-to-icon.svg"
    },
    "fileExtensions": {
      "name-of-the-extension": "icons/path-to-icon.svg"
    },
    "languageNames": {
      "name-of-the-language-type": "icons/path-to-icon.svg"
    }
  }
}

Top-Level Properties ​

PropertyTypeRequiredDescription
$schemastringNoURL to the icon pack JSON schema
idstringYesUnique identifier of the icon pack
namestringYesDisplay name of the icon pack
typestringNoPackage type, always icon_pack for icon packs
applyTintbooleanNo (default: false)Whether icons should be tinted by the UI theme
minAppVersioninteger | nullNo (default: null)Minimum Xed-Editor version code supported. null means no minimum restriction
iconsobjectYesIcon mapping configuration

WARNING

The id must match the package name you use when publishing.

Icon Mapping ​

The icon mappings defines which icon is shown for a file/folder inside the editor.

The mappings are specified with key-value pairs:

  • Key: the identifier (e.g. file name)
  • Value: the relative path (from root directory) to the icon asset
FieldTypeRequiredDescription
defaultFilestringYesDefault icon for files
defaultFolderstringYesDefault icon for folders (collapsed)
defaultFolderExpandedstringYesDefault icon for folders (expanded)
folderNamesobjectNoMapping of folder names to icons
folderNamesExpandedobjectNoMapping of expanded folder names to icons
fileNamesobjectNoMapping of exact file names to icons
fileExtensionsobjectNoMapping of file extensions to icons
languageNamesobjectNoMapping of language types to icons

The identifiers for all icon categories have to always be lowercase. Therefore, case-sensitive file and folder mappings are not supported.

NOTE

Only SVG files are currently supported.

NOTE

If symbol mappings are missing, the built-in default icons are used.

Icon Resolution Priority ​

Icon selection follows a strict priority order. The first match is always used:

File ​

  1. fileNames
  2. fileExtensions
  3. languageNames
  4. defaultFile

Folder ​

  1. folderNames
  2. defaultFolder

Folder Expanded ​

  1. folderNamesExpanded
  2. defaultFolderExpanded

If none of these are defined the built-in default icons are used.

Building the Icon Pack ​

Once you have defined the icon mappings in manifest.json and added the referenced icon assets, you can build the .xed package.

The Icon-Template repository ships with a build script. If you have Node.js installed, run:

bash
node build.js

This produces the package at output/<id>.xed.

This .xed file can be installed locally or uploaded when publishing your icon pack.

API Reference ​

This section provides detailed information about each icon category and its properties.

defaultFile ​

Defines the default icon used for files.

defaultFolder ​

Defines the default icon used for folders in their collapsed state.

defaultFolderExpanded ​

Defines the default icon used for folders when they are expanded.

folderNames ​

Maps specific folder names to custom icons.

Example:

json
"folderNames": {
  "rust": "icons/folder-rust.svg",
  "assets": "icons/folder-assets.svg"
}

folderNamesExpanded ​

Maps specific folder names of expanded folders to custom icons.

json
"folderNamesExpanded": {
  "rust": "icons/folder-rust-open.svg",
  "assets": "icons/folder-assets-open.svg"
}

fileNames ​

Maps exact file names to icons.

json
"fileNames": {
  "readme.md": "icons/readme.svg",
  "package.json": "icons/node.svg"
}

fileExtensions ​

Maps file extensions to icons.

json
"fileExtensions": {
  "ts": "icons/typescript.svg",
  "js": "icons/javascript.svg"
}

languageNames ​

Maps file types used by the editor to icon assets.

They are helpful for avoiding the need to define every single file extension individually.

These identifiers are lowercase and include both built-in and extension-defined languages.

json
"languageNames": {
  "javascript": "icons/javascript.svg",
  "typescript": "icons/typescript.svg",
  "python": "icons/python.svg",
  "rust": "icons/rust.svg"
}

All current built-in file types in Xed-Editor are listed below. This list is generated from the internal BuiltinFileType registry and may change at any time. For the most up-to-date information, refer to the source code.

File Type Table ​

IdentifierNameFile extensions
javascriptJavaScriptjs, mjs, cjs, jscsrc, jshintrc, mut
typescriptTypeScriptts, mts, cts
jsxJavaScript JSXjsx
tsxTypeScript JSXtsx
htmlHTMLhtml, htm, xhtml, xht
htmxHTMXhtmx
cssCSScss
scssSCSSscss, sass
lessLessless
jsonJSONjson, jsonl, jsonc
markdownMarkdownmd, markdown, mdown, mkd, mkdn, mdoc, mdtext, mdtxt, mdwn
xmlXMLxml, xaml, dtd, plist, ascx, csproj, wxi, wxl, wxs, svg
yamlYAMLyaml, yml, eyaml, eyml, cff
pythonPythonpy, pyi
javaJavajava, jav, bsh
groovyGroovygsh, groovy, gradle, gvy, gy
cCc
cppC++cpp, cxx, cc, c++, h, hpp, hh, hxx, h++
csharpC#cs, csx
rubyRubyrb, erb, gemspec
luaLualua, luau
goGogo
phpPHPphp
rustRustrs
pascalPascalp, pas
zigZigzig
nimNimnim
swiftSwiftswift
dartDartdart
rocqRocq (Coq)v, coq
kotlinKotlinkt, kts
lispLisplisp, clisp
shellShell scriptsh, bash, zsh, fish, ksh, profile, bashrc, zshrc, etc.
windows_shellBatchcmd, bat
powershellPowerShellps1, psm1, psd1
smaliSmalismali
assemblyAssemblyasm
cmakeCMakecmakelists.txt
rRr
sqlSQLsql, dsql, sqllite
tomlTOMLtoml
iniINIini
propertiesPropertiesproperties, cfg, conf, config, editorconfig, gitconfig, gitmodules, gitattributes
ignoreIgnoregitignore, gitignore_global, gitkeep, git-blame-ignore-revs
diffDiffdiff, patch, rej
textPlain texttxt
logLoglog
latexLaTeXlatex, tex, ltx
imageImagejpg, jpeg, png, gif, bmp, tiff, webp, ico, heic, heif, avif
audioAudiomp3, wav, flac, ogg, aac, m4a, wma, opus
videoVideomp4, avi, mov, mkv, webm
archiveArchivezip, rar, 7z, tar, gz, bz2, xy
executableExecutableexe, dll, so, dylib, bin
apkAPKapk, xapk, apks

Additionally, any custom language names are possible. These will only work, however, if the extension that registers this file type is installed.

Publish an Icon Pack ​

Publishing an icon pack works in a very similar way to publishing an extension.

First, you need to create an account on https://xed-editor.app.

Once you are signed in, go to the icon pack page at https://xed-editor.app/icon-packs. There you will find a Publish button. Click it and upload your icon pack by dragging and dropping the built .xed package into the upload area.

Once uploaded, your icon pack will appear in the extension marketplace inside the editor. From there, users can browse and install it like any other extension.

Updating an icon pack follows the same rule as extensions. You just upload a new .xed package with an increased version number while keeping the same ID. This ensures that users can receive updates automatically without needing to reinstall anything manually.