[+] Run command
This commit is contained in:
parent
732389ffe0
commit
86ad1b5ad2
2 changed files with 11 additions and 4 deletions
|
@ -8,6 +8,7 @@ from typing import Literal, Iterable
|
||||||
|
|
||||||
from hypy_utils import printc, json_stringify
|
from hypy_utils import printc, json_stringify
|
||||||
|
|
||||||
|
from .neofetch_util import run_neofetch
|
||||||
from .presets import PRESETS
|
from .presets import PRESETS
|
||||||
|
|
||||||
|
|
||||||
|
@ -110,13 +111,19 @@ def create_config() -> Config:
|
||||||
tmp = PRESETS['rainbow'].color_text('preset')
|
tmp = PRESETS['rainbow'].color_text('preset')
|
||||||
preset = literal_input(f'Which {tmp} do you want to use?', PRESETS.keys(), 'rainbow')
|
preset = literal_input(f'Which {tmp} do you want to use?', PRESETS.keys(), 'rainbow')
|
||||||
|
|
||||||
# Save and return
|
# Create config
|
||||||
c = Config(preset, color_system)
|
c = Config(preset, color_system)
|
||||||
c.save()
|
|
||||||
|
# Save config
|
||||||
|
save = literal_input(f'Save config?', ['y', 'n'], 'y')
|
||||||
|
if save == 'y':
|
||||||
|
c.save()
|
||||||
|
|
||||||
return c
|
return c
|
||||||
|
|
||||||
|
|
||||||
def run():
|
def run():
|
||||||
parser = argparse.ArgumentParser(description='neofetch with flags <3')
|
parser = argparse.ArgumentParser(description='neofetch with flags <3')
|
||||||
|
# TODO: Param overwrite config
|
||||||
config = check_config()
|
config = check_config()
|
||||||
# TODO: --setup command
|
run_neofetch(PRESETS.get(config.preset))
|
||||||
|
|
|
@ -27,7 +27,7 @@ def get_distro_ascii() -> str:
|
||||||
return check_output([get_command_path(), "print_ascii"]).decode().strip()
|
return check_output([get_command_path(), "print_ascii"]).decode().strip()
|
||||||
|
|
||||||
|
|
||||||
def run(preset: ColorProfile):
|
def run_neofetch(preset: ColorProfile):
|
||||||
# Get existing ascii
|
# Get existing ascii
|
||||||
asc = get_distro_ascii()
|
asc = get_distro_ascii()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue