Skip to content
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

Theme update & plugin! (Preset & custom persistent) themes) #1087

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

JustinMLu
Copy link

@JustinMLu JustinMLu commented Apr 21, 2023

By editing some colorama properties located in jarviscli and building my own plugin, I've managed to add functionality onto Jarvis that allows for persistent user themes! WIth this theme, you can:

  • Manually created using an interactive theme-editor plugin
  • Saved persistently and changed immediately after user specification
  • Picked from a list of custom-made preset themes (including lightmode & darkmode)

Currently, these themes are only functional for non-"custom" plugin interactions, given the nature of colors being set via colorama & the sheer amount of plugins present.

Please let me know what you think and if you have any ideas/concerns!

*Attempts to resolve issue #1068 in conjunction w/ default terminal changes proposed by @dinanz

used to store custom themes/default theme
supports preset themes, manually changing themes, and resetting back to the default theme
mainly consists of replacing colorama ANSI constants with theme values stored in data/user_theme.json
colorama literals are no longer in the file
@JustinMLu
Copy link
Author

JustinMLu commented Apr 21, 2023

Update: Due to some manual config-ing I did for my University's project report, I accidentally broke the plugin's ability to edit the user_themes json file (trivial relative path issue). Please don't reject this yet as I can fix it immediately once the report is written tonight

@pnhofmann
Copy link
Collaborator

Oh, this is nice! Good work! I especially like the pre-defined themes.
Thanks a lot.
Just write me, when it's ready to merge. And please write again, should I forget / miss ;).

@JustinMLu
Copy link
Author

JustinMLu commented Apr 27, 2023

Hey @pnhofmann , thanks for the positive feedback! The issue I'm struggling with right now is specifying the path to the JSON theme file ("user_theme.json") for both GeneralUtilities.py and in the actual change_color.py plugin script; relative path-ing works fine in my Python 3.10.10 venv but when I try it in the actual Terminal interface I encounter a file-not-found error.

Since GeneralUtilities.py is in jarviscli/utilities, change_color.py is in jarviscli/plugins & the JSON script is in jarviscli/data, I'm having issues figuring out how to properly specify the path to the JSON file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants