-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Scan theme directory #700
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for that! That could be a great base for custom themes, as we could imagine scanning a custom folder, like ~/.museeks/themes
on startup, and users could put their themes there.
Of course that would mean we should do a couple of runtime validations, to make sure the keys are aligned with the latest theme definition, and we should fallback to _system
in case a theme is invalid.
But I think we can discuss it in a later diff :)
Also, Q&A is failing, I should probably add the list of required VSCode extension required to make things work. |
Ah yep, that's great idea we can make an custom theme for user. We can do it later after this PR merged |
dedb2cf
to
d338c62
Compare
So I just tested it, there are two issues:
As previously said, I don't think it's an important problem to be solved, but we can keep part of this code! My suggestion would be to keep the old behavior, but use this PR as a base for custom themes: could you do the same, but by scanning You can use this API to get the right path: https://www.electronjs.org/docs/latest/api/app#appgetpathname. No need to do fancy checks right now, you can just steal one of the theme, change its name, update two variables and test it. wdyt? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as-per-my-previous-comment
Okay, i think it's a good idea. i will try to implemant it |
As requested in src/shared/lib/themes.ts to improve scaning json file instead import one by one
I make the app auto scan all json in themes folder to be theme option for museeks. I used
MuseeksAPI
as bridge to deliver scan result to frontend because file system cannot be scanned from frontend