obsidian-iconize icon indicating copy to clipboard operation
obsidian-iconize copied to clipboard

Set frontmatter when changing icon

Open Jademalo opened this issue 1 year ago • 7 comments

Is your feature request related to a problem? Please describe. At present Iconize will load an icon specified in the icon: property of the frontmatter. This is good, however it only takes effect when the file is edited, when loading a new file, or when restarting the client after selecting "Remove Icon". It doesn't work when editing an .md file outside of Obsidian and reloading, nor if an icon is set with "Change Icon".

When using the "Change Icon" option in the right click menu, the icon is only set in data.json. This means that if you want to use the frontmatter for icons, you need to manually type the name of the icon and cannot use the icon picker.

Describe the solution you'd like I would like "Change Icon" to set the icon data in the frontmatter if "Use icon in frontmatter" is selected, or for there to be a separate option to have the addon write to frontmatter. Additionally, it would be an improvement if the icon could be loaded from the frontmatter on file load, instead of only on edit.

Additional context This would also work well with and apply to #358, essentially moving the two pieces of per file configuration into the frontmatter for those who prefer to have file metadata entirely in the files themselves.

Jademalo avatar Feb 19 '24 18:02 Jademalo

I second this request

JoshKasap avatar Mar 12 '24 22:03 JoshKasap

I'd like to see this too

DylanSpeiser avatar Mar 17 '24 09:03 DylanSpeiser

Me too! I prefer for the authoritative icon information to stay in the frontmatter rather than in a separate, hidden config file. In general I think keeping note data within the note is better for future-proofing (the file over app philosophy is a key reason I use Obsidian).

nweii avatar May 09 '24 13:05 nweii

Interesting idea. But, is this compatible with the ability to change a folder icon?

benoitvalery avatar Jun 17 '24 09:06 benoitvalery

This reason is the one thing that is keeping me from using the plugin. I'd really prefer the information to be kept on the files themselves!

Interesting idea. But, is this compatible with the ability to change a folder icon?

In this case maybe an additional file could be created under the selected folder like "_folder_icons.md" or put it under the attachments subdirectory.
By using a plugin like Hide Folders this file could be visually hidden.

suka97 avatar Jun 25 '24 18:06 suka97

Perhaps an integration with the folder-note plugin's frontmatter could also work? Something like a folderIcon: property.

karaolidis avatar Jul 13 '24 13:07 karaolidis