diff --git a/hyfetch/main.py b/hyfetch/main.py index c6b67598..66f142be 100755 --- a/hyfetch/main.py +++ b/hyfetch/main.py @@ -338,10 +338,6 @@ def run(): ensure_git_bash() check_windows_cmd() - # Use a custom distro - if args.distro: - GLOBAL_CFG.override_distro = args.distro - if args.debug: GLOBAL_CFG.debug = True @@ -360,6 +356,9 @@ def run(): # Load config or create config config = create_config() if args.config else check_config(args.config_file) + # Use a custom distro + GLOBAL_CFG.override_distro = args.distro or config.distro + # Param overwrite config if args.preset: config.preset = args.preset diff --git a/hyfetch/models.py b/hyfetch/models.py index 27760d1f..5fc756d6 100644 --- a/hyfetch/models.py +++ b/hyfetch/models.py @@ -16,6 +16,7 @@ class Config: lightness: float | None = None color_align: ColorAlignment = field(default_factory=lambda: ColorAlignment('horizontal')) backend: BackendLiteral = "neofetch" + distro: str | None = None @classmethod def from_dict(cls, d: dict):