diff --git a/gamestonk_terminal/jupyter/dashboards/dashboards_controller.py b/gamestonk_terminal/jupyter/dashboards/dashboards_controller.py index 0040ee5c3a4..f8ce32c23cb 100644 --- a/gamestonk_terminal/jupyter/dashboards/dashboards_controller.py +++ b/gamestonk_terminal/jupyter/dashboards/dashboards_controller.py @@ -98,6 +98,14 @@ def create_call(other_args: List[str], name: str, filename: str = None) -> None: dest="input", help="Skips confirmation to run server.", ) + parser.add_argument( + "-d", + "--dark", + action="store_true", + default=False, + dest="dark", + help="Whether to show voila in dark mode", + ) ns_parser = parse_known_args_and_warn(parser, other_args) @@ -111,9 +119,12 @@ def create_call(other_args: List[str], name: str, filename: str = None) -> None: f"Warning: opens a port on your computer to run a {cmd} server." ) response = input("Would you like us to run the server for you? y/n\n") + args = "" + if ns_parser.dark and not ns_parser.jupyter: + args += "--theme=dark" if ns_parser.input or response.lower() == "y": subprocess.Popen( - f"{cmd} {file}", + f"{cmd} {file} {args}", stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True, diff --git a/website/content/jupyter/dashboards/chains/_index.md b/website/content/jupyter/dashboards/chains/_index.md index a95a3b4b5c1..7944df293c8 100644 --- a/website/content/jupyter/dashboards/chains/_index.md +++ b/website/content/jupyter/dashboards/chains/_index.md @@ -7,6 +7,7 @@ Opens a voila dashboard showing option chain information for a given ticker and ``` optional arguments: -j, --jupyter opens in jupyterlab instead of voila (default: False) + -d, --dark runs voila in dark mode (default: False) -n, --no-input does not ask the user if it can open a server (default: False) -h, --help show this help message ``` diff --git a/website/content/jupyter/dashboards/correlations/_index.md b/website/content/jupyter/dashboards/correlations/_index.md index 6727c6aa277..aac3a318b54 100644 --- a/website/content/jupyter/dashboards/correlations/_index.md +++ b/website/content/jupyter/dashboards/correlations/_index.md @@ -7,6 +7,7 @@ Opens a voila dashboard showing the correlations between stocks ``` optional arguments: -j, --jupyter opens in jupyterlab instead of voila (default: False) + -d, --dark runs voila in dark mode (default: False) -n, --no-input does not ask the user if it can open a server (default: False) -h, --help show this help message ``` diff --git a/website/content/jupyter/dashboards/shortdata/_index.md b/website/content/jupyter/dashboards/shortdata/_index.md index 9ffdb420cd7..cc6290289cc 100644 --- a/website/content/jupyter/dashboards/shortdata/_index.md +++ b/website/content/jupyter/dashboards/shortdata/_index.md @@ -7,6 +7,7 @@ Shows shortdata dashboard ``` optional arguments: -j, --jupyter opens in jupyterlab instead of voila (default: False) + -d, --dark runs voila in dark mode (default: False) -n, --no-input does not ask the user if it can open a server (default: False) - -h, --help show this help message + -h, --help show this (help message ``` diff --git a/website/content/jupyter/dashboards/stocks/_index.md b/website/content/jupyter/dashboards/stocks/_index.md index 26a590c86fb..a542a4358e5 100644 --- a/website/content/jupyter/dashboards/stocks/_index.md +++ b/website/content/jupyter/dashboards/stocks/_index.md @@ -7,6 +7,7 @@ Opens a voila dashboard showing historical data for stocks ``` optional arguments: -j, --jupyter opens in jupyterlab instead of voila (default: False) + -d, --dark runs voila in dark mode (default: False) -n, --no-input does not ask the user if it can open a server (default: False) -h, --help show this help message ``` diff --git a/website/content/jupyter/dashboards/vsurf/_index.md b/website/content/jupyter/dashboards/vsurf/_index.md index 68f50cc4584..a54d4351d7e 100644 --- a/website/content/jupyter/dashboards/vsurf/_index.md +++ b/website/content/jupyter/dashboards/vsurf/_index.md @@ -7,6 +7,7 @@ Shows the volatility surface for options ``` optional arguments: -j, --jupyter opens in jupyterlab instead of voila (default: False) + -d, --dark runs voila in dark mode (default: False) -n, --no-input does not ask the user if it can open a server (default: False) -h, --help show this help message ```