[+] Add distro option in config #102
This commit is contained in:
parent
5343182ea1
commit
859dd3eb83
2 changed files with 4 additions and 4 deletions
|
|
@ -338,10 +338,6 @@ def run():
|
||||||
ensure_git_bash()
|
ensure_git_bash()
|
||||||
check_windows_cmd()
|
check_windows_cmd()
|
||||||
|
|
||||||
# Use a custom distro
|
|
||||||
if args.distro:
|
|
||||||
GLOBAL_CFG.override_distro = args.distro
|
|
||||||
|
|
||||||
if args.debug:
|
if args.debug:
|
||||||
GLOBAL_CFG.debug = True
|
GLOBAL_CFG.debug = True
|
||||||
|
|
||||||
|
|
@ -360,6 +356,9 @@ def run():
|
||||||
# Load config or create config
|
# Load config or create config
|
||||||
config = create_config() if args.config else check_config(args.config_file)
|
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
|
# Param overwrite config
|
||||||
if args.preset:
|
if args.preset:
|
||||||
config.preset = args.preset
|
config.preset = args.preset
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ class Config:
|
||||||
lightness: float | None = None
|
lightness: float | None = None
|
||||||
color_align: ColorAlignment = field(default_factory=lambda: ColorAlignment('horizontal'))
|
color_align: ColorAlignment = field(default_factory=lambda: ColorAlignment('horizontal'))
|
||||||
backend: BackendLiteral = "neofetch"
|
backend: BackendLiteral = "neofetch"
|
||||||
|
distro: str | None = None
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_dict(cls, d: dict):
|
def from_dict(cls, d: dict):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue