An Obsidian plugin that puts icons before the names of files and folders in the file explorer. From the start every folder has a folder icon, and every file the icon of its kind: a note, an image, a PDF, and so on. Where you want other icons, you change them for a kind, for an extension, by rules, or one by one. It is made for a vault that is synced between devices, and keeps the icons right there.
What sets it apart is how it keeps its settings:
- The settings file of the plugin is the only place where the icons are kept. A change reads the file first, changes only what it is about, and writes the file back. So what a sync brought in the meantime stays, also when Obsidian has not told of it yet.
- When Obsidian tells that something else changed the file, such as a sync, the file explorer and the settings show what the file holds now.
- It writes the file only when you change something, and only what you changed: the icons it comes with are not written. Starting Obsidian, turning the plugin on, and making and deleting files write nothing, so devices do not write over each other what they have in mind.
Requirements
- Obsidian 1.13.4 or later. For an older Obsidian there is 0.2.0, the last version made for it.
- The desktop app or the mobile app
Installation
another-iconize is in the community plugin directory of Obsidian.
- In Obsidian, go to Settings → Community plugins. If Restricted mode is on, select Exit Restricted mode.
- Select Browse and search for another-iconize.
- Select Install, and then Enable.
To update, select Check for updates in Settings → Community plugins, and then Update. The icons are kept in data.json in the folder of the plugin, which an update does not touch, so they stay.
By hand
- Download
main.js, manifest.json, and styles.css from the latest release.
- In your vault, create the folder
.obsidian/plugins/another-iconize/ and put the three files in it. .obsidian is a hidden folder.
- Restart Obsidian.
- Go to Settings → Community plugins and switch on another-iconize in the list of installed plugins.
To update, replace the three files with the ones from a newer release and restart Obsidian.
Getting started
- As it comes. Folders have a folder icon, and files the icon of their kind, as listed under Kinds.
- A kind. Under Settings → another-iconize, Defaults has a row for folders and one for each kind of file. Its button opens the list of icons. No icon, the first choice in the list, gives the kind no icon.
- An extension. Add extensions, in the same place, asks for one or more extensions, such as
ts, js, and then for their icon. Their files take it in place of the icon of their kind.
- One file or folder. In the file explorer, right-click a file or folder, or press and hold it on a phone or a tablet, and select Change icon. Type the name of an icon, or an emoji, and pick it. With several files and folders selected, they all get it. The menu of the open file, under More options at the top of its tab, has Change icon too.
- Back again. Reset icon, in the same menu, takes the icon of its own away again, and the item shows the icon it has without it. It is there when one of the selected items has an icon of its own.
- By name or path. A rule gives its icon to every item whose name or path matches its pattern, such as every folder named after a year, as told under Rules.
How an icon is chosen
A file or folder shows the first of these that it has:
- Its own icon, given in its menu.
- The icon of the first rule that matches it.
- For a file, the icon of its extension.
- The icon of its kind.
No icon counts as an icon at each of these: an item whose own icon is No icon shows none, whatever the rules, its extension, and its kind have.
Kinds
| Kind |
Extensions |
Icon it comes with |
| Folders |
|
folder |
| Notes |
md |
file text |
| Canvases |
canvas |
layout dashboard |
| Bases |
base |
table |
| PDFs |
pdf |
book open |
| Images |
avif, bmp, gif, jpeg, jpg, png, svg, webp |
image |
| Audio |
3gp, flac, m4a, mp3, oga, ogg, opus, wav |
file audio |
| Videos |
mkv, mov, mp4, ogv, webm |
file video |
| Other files |
Every other extension |
file |
- The kinds of files are the ones that Obsidian opens files as.
- The extension of a file is what comes after the last dot of its name. Upper and lower case are the same:
PNG is an image too.
- Obsidian shows files of other extensions in the file explorer only with Settings → Files and links → Detect all file extensions on.
Icons
- The icons are the ones that Obsidian has: the Lucide icons that come with it, and icons that other plugins add to it. The list finds them by their names, such as
folder open or calendar.
- An icon can also be a few characters of your own, such as an emoji. Type them into the list, and they are its first choice. They need a character that is not a plain letter, digit, or sign, or they are taken for a search:
🗂️ and ★ can be icons, and AB cannot.
- An icon is kept by its id, such as
lucide-folder. An id that Obsidian on a device has no icon for, such as an icon of a newer version of Obsidian or of a plugin that is gone, shows nothing in the file explorer there. The settings show the id in place of the icon.
Rules
A rule gives its icon to every item whose name or path matches its pattern.
- An item takes the icon of the first rule that matches it, from the top. An icon of its own, given in its menu, comes before all rules, and the rules come before the icons of extensions and kinds.
- A rule is for folders, for files, or for both, as you choose.
- A pattern without a
/ is matched against the name of an item, such as Projects or README.md. A pattern with a / is matched against the path from the top of the vault, such as Projects/2026/README.md. A / at the start stands for the top of the vault: /Projects is the folder Projects at the top only, and Projects is every folder of that name.
- The whole name, or the whole path, has to match. Upper and lower case are not the same.
| In a pattern |
Stands for |
* |
Any characters but /, or none |
** |
Any characters, / too |
**/ |
Any folders, or none: Notes/**/todo.md matches Notes/todo.md too |
? |
One character but / |
[abc], [a-z] |
One of the characters, or one in the range |
[!abc] |
One character but these and / |
{png,jpg} |
One of the words between the commas |
Every other character stands for itself.
| Pattern |
For |
Gives the icon to |
20[0-9][0-9] |
Folders |
Every folder named after a year |
Daily/* |
Files |
The files right in the folder Daily at the top |
Projects/** |
Files and folders |
Everything inside the folder Projects at the top |
README.md |
Files |
Every file named README.md |
*.excalidraw.md |
Files |
Every Excalidraw drawing, which is a note by its extension |
In the settings
- Defaults has a row for each kind with its icon. The button opens the list of icons. Once a kind has another icon than the one it comes with, the arrow beside it gives that back.
- Extensions has a row for each extension that has an icon. Add extensions asks for one or more, separated by commas, and then for their icon; an extension that has one already gets the new one. The button of a row changes its icon, and × deletes it.
- Rules has a row for each rule. Add rule adds a rule at the end, with a star for its icon, which matches nothing until it has a pattern. The button with the icon opens the list of icons. The pattern is saved half a second after you stop typing, and the rest as soon as it is changed. A rule is moved by its handle and deleted with its ×.
- Icons of single files and folders says how many items have an icon of their own. When some of them are for paths that are not in the vault, as told under Syncing, it says so too, and Remove those takes them out of the file.
- When the rules were changed somewhere else while the settings were open, such as on another device, a change to a rule that is no longer there is not made. A notice says so, and the settings show the rules as they are now.
Nothing is written when items come and go. An item that is made, by you or by a sync, shows its icon at once.
The settings file
Everything the plugin keeps is in .obsidian/plugins/another-iconize/data.json, where .obsidian is the settings folder of the vault:
{
"defaults": {
"note": ""
},
"extensions": {
"ts": "lucide-braces"
},
"icons": {
"Projects": "lucide-briefcase",
"Projects/README.md": "📘"
},
"rules": [
{
"pattern": "20[0-9][0-9]",
"target": "folders",
"icon": "lucide-calendar"
}
]
}
defaults holds the kinds that have another icon than the one they come with: folder, note, canvas, base, pdf, image, audio, video, or other.
extensions holds the icons of extensions, without the dot.
icons holds the icons of single files and folders, by their paths from the top of the vault.
rules holds the rules, from the top. target is folders, files, or all.
- An empty icon,
"", is No icon. Each of the four can be left out, and an empty file, or none, is the plugin as it comes.
The file can be changed by hand, also while Obsidian is open. When Obsidian tells the plugin, the file explorer shows the change, and a change made in Obsidian keeps it in any case.
Syncing
The plugin is made for a vault that a sync keeps the same on several devices, with its settings folder: Obsidian Sync, a git plugin, a cloud drive, and the like.
- What it shows is what the file holds. The plugin reads the file when it starts, and again whenever Obsidian tells that something else changed it.
- A change is made to the file as it is. Before each change the plugin reads the file again, and changes only what the change is about. So icons and rules that came from another device stay, also when Obsidian has not told of them yet.
- It writes only when you change something: when you give or take away an icon, change the icon of a kind or an extension, change the rules, or rename or move an item that has an icon of its own or holds one. Starting Obsidian, turning the plugin on, and making and deleting items write nothing, whoever makes or deletes them. Nor does a change that would leave the file as it is.
- The same icons make the same file. The keys are written in order, so every device writes the same bytes for them.
- A file that cannot be read is not written over. When the file holds no JSON, such as when a sync left the marks of a conflict in it, the plugin keeps the icons that it had, says so, and changes nothing until the file can be read again.
- What it does not know stays. Other keys in the file, and rules that it cannot use, such as ones of a later version, are left as they are.
- Deleting an item leaves its icon in the file. A sync deletes items too, and may bring them back. The settings say how many icons are for paths that are not in the vault, and remove them for you.
- An icon moves with its item when the item is renamed or moved in Obsidian. A rename that Obsidian does not see as one, such as in a file manager, comes as a deleted item and a new one, and the icon stays at the old path. When another device renamed the item in Obsidian, its plugin moved the icon in the file there, and the sync brings that file.
Limits
- Icons are shown in the file explorer only: not in tabs, titles, bookmarks, or search results.
- There are no icon packs to download, and no colors or sizes for icons.
- It does not read the settings of other icon plugins.
- Obsidian gives plugins no way to add to the items of the file explorer. The plugin finds them inside the file explorer, as other icon plugins do, and checks what it finds. If a later version of Obsidian keeps them in another way, the file explorer shows no icons until the plugin is changed, and nothing else goes wrong.
State
What has been checked, and how:
- Tests with plain Node.js: the kinds, the choice of an icon, the patterns, the changes to the file, and a file that something else writes between the read and the write of a change.
- Inside the desktop app of Obsidian 1.15.1 and 1.13.4 on a Mac, on a vault made for the test: the icons of kinds, extensions, and rules on items that are made and renamed, icons that move with a rename, the menus of the file explorer and of the open file with Change icon and Reset icon, the list of icons with an emoji and No icon, a file that something else changed, with and without a word from Obsidian, a file with the marks of a conflict, keys that the plugin does not know, changing the icon of a kind and giving it back, adding and deleting extensions, adding, changing, moving, and deleting rules, a rule added from outside while the settings were open, a pattern being typed while a change came from outside, icons for paths that are gone and for one that came back, an icon that Obsidian does not have, and turning the plugin off and on. The file was not written where it should not be: when Obsidian started, when the plugin was turned on, when an item without an icon was renamed, and when an item was deleted.
- Inside the mobile app of Obsidian 1.15.1 on an emulated Android phone and tablet: the icons of kinds and of a rule, a rename, the menu and the list of icons, the settings, changes to the file through Obsidian and from outside the app, and turning the plugin off and on. Obsidian did not always tell of a write from outside the app within five seconds, on either. The next change in Obsidian kept what it wrote all the same.
- Not on an iPhone or an iPad, and not on a phone or tablet that a person holds in a hand.
Development
You need Node.js 24 or later.
npm install
npm run dev # rebuilds main.js on every change
npm run check # type check, lint, and tests
npm run build # type check, then the main.js of a release
src/data.ts holds what the settings file holds and the changes to it, and src/store.ts makes each change to the file as it is at that moment. src/kinds.ts has the kinds and their extensions, src/rules.ts matches the patterns, and src/choose.ts chooses the icon of an item. They know nothing about Obsidian, so their tests run with plain Node.js.
src/explorer.ts draws the icons into the file explorer, src/picker.ts is the list of icons, and src/settings-tab.ts the settings.
src/main.ts is the plugin: the menus, and what it does when Obsidian tells of a change.
e2e/desktop.mjs runs a build inside the desktop app of Obsidian, on a vault that it makes, and checks what the plugin does through the debugging port of the app: node e2e/desktop.mjs <work folder> <folder with the three files> <Obsidian program> <label>. e2e/mobile.mjs does the same inside the mobile app on an Android emulator, through adb.
To try a build, copy main.js, manifest.json, and styles.css to .obsidian/plugins/another-iconize/ in a vault.
A release is built by GitHub Actions when a tag with the version of manifest.json is pushed. The message of the tag becomes the notes of the release. The files of a release come with an artifact attestation, a signed statement that they were built from this repository:
gh attestation verify main.js --repo somebodil/another-iconize
Acknowledgements
another-iconize is an icon plugin like Iconize by Florian Woelki, written anew for a vault that is synced. It shares no code with it.
License
MIT