[O] Check distro arg before creating config
This commit is contained in:
parent
c40cb09409
commit
ac27543cd8
2 changed files with 6 additions and 1 deletions
|
@ -32,6 +32,7 @@ def check_config(path) -> Config:
|
|||
|
||||
return create_config()
|
||||
|
||||
|
||||
def create_config() -> Config:
|
||||
"""
|
||||
Create config interactively
|
||||
|
@ -337,6 +338,9 @@ def run():
|
|||
parser = create_parser()
|
||||
args = parser.parse_args()
|
||||
|
||||
# Use a custom distro
|
||||
GLOBAL_CFG.override_distro = args.distro
|
||||
|
||||
if args.version:
|
||||
print(f'Version is {VERSION}')
|
||||
return
|
||||
|
|
|
@ -25,6 +25,7 @@ from .types import BackendLiteral, ColorAlignMode
|
|||
|
||||
RE_NEOFETCH_COLOR = re.compile('\\${c[0-9]}')
|
||||
|
||||
|
||||
def literal_input(prompt: str, options: Iterable[str], default: str, show_ops: bool = True) -> str:
|
||||
"""
|
||||
Ask the user to provide an input among a list of options
|
||||
|
@ -68,6 +69,7 @@ def literal_input(prompt: str, options: Iterable[str], default: str, show_ops: b
|
|||
|
||||
return find_selection(selection)
|
||||
|
||||
|
||||
def term_size() -> tuple[int, int]:
|
||||
"""
|
||||
Get terminal size
|
||||
|
@ -404,7 +406,6 @@ def get_fore_back(distro: str | None = None) -> tuple[int, int] | None:
|
|||
# Foreground-background recommendation
|
||||
fore_back = {
|
||||
'fedora': (2, 1),
|
||||
'ubuntu': (2, 1),
|
||||
'kubuntu': (2, 1),
|
||||
'lubuntu': (2, 1),
|
||||
'xubuntu': (2, 1),
|
||||
|
|
Loading…
Reference in a new issue