ecustic / obsidian-file-color

An Obsidian plugin for setting colors on folders and files in the file tree.
MIT License
115 stars 7 forks source link

dynamically set color #2

Open ygol opened 1 year ago

ygol commented 1 year ago

hi. Cool plugin. Would be nice to be able to set the color based on a regex rule applied to the note's name. i.e

all notes containing "-R-" in the file name would be blue all notes containing "-N-" in the file name would be pink ...

Mara-Li commented 1 year ago

Yes! It will be pretty cool to have this

ecustic commented 1 year ago

I think this seems like a good idea, so I'll take a look at it eventually. I'm not sure exactly when I'll get around to it since I only work on this on my days off.

This entire project was made in a single evening, so for the next couple of days I'm going to focus on refactoring and restructuring it to actually be maintainable in the long run.

ChrisFiftyTwo commented 1 year ago

Could also be nice to be able to set it through YAML/Frontmatter so you could assign the colors through templates and such.

cerfedino commented 1 year ago

Additionally, it would be nice to assign the color dynamically based on #tags

Exxaxion commented 1 year ago

Hello, I have created some script to create a bunch of folder / subfolder at once from a quickadd macro and I would like to add a specific color for each folder. Any one of you have an idea how I could do it for now?

Thomas-Schmall commented 1 year ago

Maybe helpful for implementing this (@ecustic): The icon folder plugin has this functionality and it works well. So maybe it could be possible to copy and adapt that code.

Here is their dialog for that: Obsidian - icon-folder plugin custom rule