diff --git a/devine/core/config.py b/devine/core/config.py index 2dd1f7c..5a55830 100644 --- a/devine/core/config.py +++ b/devine/core/config.py @@ -62,6 +62,7 @@ class Config: self.proxy_providers: dict = kwargs.get("proxy_providers") or {} self.serve: dict = kwargs.get("serve") or {} self.services: dict = kwargs.get("services") or {} + self.set_terminal_bg: bool = kwargs.get("set_terminal_bg", True) self.tag: str = kwargs.get("tag") or "" @classmethod diff --git a/devine/core/console.py b/devine/core/console.py index b1eec92..46d2633 100644 --- a/devine/core/console.py +++ b/devine/core/console.py @@ -1,6 +1,8 @@ from rich.console import Console from rich.theme import Theme +from devine.core.config import config + catppuccin_mocha = { # Colors based on "CatppuccinMocha" from Gogh themes @@ -30,10 +32,14 @@ primary_scheme["bright_yellow"] = primary_scheme["yellow"] primary_scheme["bright_blue"] = primary_scheme["blue"] primary_scheme["bright_magenta"] = primary_scheme["pink"] primary_scheme["bright_cyan"] = primary_scheme["cyan"] +if config.set_terminal_bg: + primary_scheme["none"] += f" on {primary_scheme['bg']}" custom_colors = { "ascii.art": primary_scheme["pink"] } +if config.set_terminal_bg: + custom_colors["ascii.art"] += f" on {primary_scheme['bg']}" console = Console(