diff --git a/i18n/en.yml b/i18n/en.yml index d85b1a4a42a..e52c6d6c679 100644 --- a/i18n/en.yml +++ b/i18n/en.yml @@ -43,6 +43,7 @@ en: featflags/cmdloc: command location displayed in figures featflags/tbhint: displays usage hints in a bottom toolbar settings/_info_: Settings through environment variables + settings/colors: set your own terminal colors settings/autoscaling: plot autoscaling settings/dt: add or remove datetime from flair settings/flair: set the flair emoji to be used diff --git a/openbb_terminal/helper_classes.py b/openbb_terminal/helper_classes.py index 20baae7394a..6ab6a0fd60e 100644 --- a/openbb_terminal/helper_classes.py +++ b/openbb_terminal/helper_classes.py @@ -100,7 +100,7 @@ class TerminalStyle: """ DEFAULT_STYLES_LOCATION = REPOSITORY_DIRECTORY / "styles" / "default" - USER_STYLES_LOCATION = USER_DATA_DIRECTORY / "styles" + USER_STYLES_LOCATION = USER_DATA_DIRECTORY / "styles" / "user" mpl_styles_available: Dict[str, str] = {} mpl_style: str = "" @@ -174,7 +174,10 @@ class TerminalStyle: self.mpf_style = json.load(stylesheet) self.mpf_style["base_mpl_style"] = self.mpl_style - if console_style in self.console_styles_available: + if "openbb_config" in self.console_styles_available: + with open(self.console_styles_available["openbb_config"]) as stylesheet: + self.console_style = json.load(stylesheet) + elif console_style in self.console_styles_available: with open(self.console_styles_available[console_style]) as stylesheet: self.console_style = json.load(stylesheet) else: diff --git a/openbb_terminal/settings_controller.py b/openbb_terminal/settings_controller.py index 82c51c11c6e..de0f837bce2 100644 --- a/openbb_terminal/settings_controller.py +++ b/openbb_terminal/settings_controller.py @@ -54,6 +54,7 @@ class SettingsController(BaseController): "userdata", "source", "flair", + "colors", ] PATH = "/settings/" @@ -81,6 +82,7 @@ class SettingsController(BaseController): mt = MenuText("settings/") mt.add_info("_info_") mt.add_raw("\n") + mt.add_cmd("colors") mt.add_setting("dt", obbff.USE_DATETIME) mt.add_cmd("flair") mt.add_raw("\n") @@ -134,6 +136,21 @@ class SettingsController(BaseController): console.print(text=mt.menu_text, menu="Settings") + @log_start_end(log=logger) + def call_colors(self, _): + """Process colors command""" + console.print( + "\n1. Play with the terminal coloring embedded in our website https://openbb.co/customize\n" + ) + console.print("2. Once happy, click 'Download Theme'\n") + console.print( + "3. The file 'openbb_config.richstyle.json' should be downloaded\n" + ) + console.print( + "4. Insert that config file inside /OpenBBUserData/styles/user/\n" + ) + console.print("5. Close the terminal and run it again.\n") + @log_start_end(log=logger) def call_dt(self, _): """Process dt command"""