[+] Add distro option in config #102

This commit is contained in:
Hykilpikonna 2023-03-15 16:29:14 -04:00
parent 5343182ea1
commit 859dd3eb83
No known key found for this signature in database
GPG key ID: 256CD01A41D7FA26
2 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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):