Emoji Title
approvedby arturtupiassu
Add an emoji from frontmatter to the File Explorer title. Now supports inherit_emoji for folders. - This plugin has not been manually reviewed by Obsidian staff.
Obsidian Emoji Title Plugin
This is a plugin for Obsidian that automatically adds emojis to note and folder titles in the File Explorer, as well as in active navigation tabs. Emoji resolution is handled intelligently based on the note's frontmatter, parent folder inheritance, or file extension.
š Features
- Emojis in Titles and Tabs: Displays emojis corresponding to the file both in the sidebar and at the top of the open tab.
- Smart Emoji Resolution: The choice of which emoji to display follows a specific priority order:
- Frontmatter: Checks if the note has the emoji or icon fields defined in the metadata (YAML frontmatter).
- Folder Inheritance: Folders with Folder Notes configured with apply_to_children: true (or inherit_emoji: true) recursively transmit their emoji to all internal files and subfolders.
- File Extensions: If no emoji is specified, the plugin assigns a default emoji based on the file type (Markdown, Canvas, Image, PDF, Spreadsheets, etc.).
- Automatic Folder Notes: Automatic creation and synchronization of folder notes to manage directory metadata cleanly.
- Rename Glitch Prevention: Smart system that detects when a file or folder is being renamed in the sidebar, suspending emoji injection in the DOM to prevent Obsidian from capturing the emoji as part of the new file name.
- Rendering Debounce: Optimized with requestAnimationFrame to prevent slowdowns and visual processing overhead in very large vaults.
š ļø Project Structure
The plugin code has been modularized from the initial main.ts to facilitate maintenance and readability:
āāā main.ts # Plugin entry point (command registration, events, and lifecycle)
āāā manifest.json # Metadata and plugin identification in Obsidian
āāā styles.css # CSS styles required for correct rendering
āāā esbuild.config.mjs # esbuild bundler configuration
āāā package.json # Project dependencies and build scripts
āāā src/ # Specialized modules
āāā emoji-resolver.ts # Priority and inheritance logic for defining emojis
āāā folder-notes.ts # Creation, synchronization, and management of folder notes
āāā modal.ts # Interactive emoji selection modal
āāā settings.ts # Configuration schema and user preferences tab
āāā types.ts # Type definitions and extensions for the internal Obsidian API
āāā ui-updater.ts # DOM manipulation for emoji injection in the interface
āļø Available Settings
In the plugin's settings tab, you can customize:
- Auto-create Folder Notes: Automatically creates a corresponding folder note whenever a new folder is created.
- Default Emojis by Type:
- Folders (š)
- Markdown (šļø)
- Canvas (šØ)
- Databases/Dataview (š)
- Images (š¼ļø)
- PDFs (š)
- Spreadsheets (š)
- Documents and Other formats
- Icon Customization: Quickly modify default fallbacks.
š» Local Development and Compilation
Requirements
- Node.js installed.
Steps to Compile
- Install project dependencies:
npm install
- Compile the plugin:
npm run build
[!NOTE] The build script is configured to copy the final bundled file (main.js), manifest.json, and styles.css directly to the plugin development folder of your local Obsidian vault: ~/obsidian/Your Vault/.obsidian/plugins/emoji-title-plugin/
š License
This project is made available under the MIT license.
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.