sukeesh / Jarvis

Personal Assistant for Linux and macOS
MIT License
3.02k stars 1.04k forks source link

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

Open JustinMLu opened 1 year ago

JustinMLu commented 1 year ago

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:

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 https://github.com/sukeesh/Jarvis/issues/1068 in conjunction w/ default terminal changes proposed by @dinanz

JustinMLu commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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.