diff --git a/hyfetch/color_util.py b/hyfetch/color_util.py index a3e7ef06..f7a1703c 100644 --- a/hyfetch/color_util.py +++ b/hyfetch/color_util.py @@ -53,7 +53,7 @@ def clear_screen(): """ Clear screen using ANSI escape codes """ - print('\033[2J\033[H') + print('\033[2J\033[H', end='') def redistribute_rgb(r: int, g: int, b: int) -> tuple[int, int, int]: diff --git a/hyfetch/main.py b/hyfetch/main.py index ea65a25d..725deaff 100755 --- a/hyfetch/main.py +++ b/hyfetch/main.py @@ -9,7 +9,7 @@ from dataclasses import dataclass from pathlib import Path from typing import Iterable -from .color_util import AnsiMode, printc, color +from .color_util import AnsiMode, printc, color, clear_screen from .neofetch_util import run_neofetch, replace_colors, get_custom_distro_ascii from .presets import PRESETS, ColorProfile from .serializer import json_stringify @@ -103,6 +103,7 @@ def create_config() -> Config: :return: Config object (automatically stored) """ + clear_screen() printc('\nWelcome to &b&lhy&f&lfetch&r! Let\'s set up some colors first.\n') # Select color system @@ -128,6 +129,7 @@ def create_config() -> Config: color_system = literal_input('Which &acolor &bsystem &rdo you want to use?', ['8bit', 'rgb'], 'rgb') + clear_screen() # Print preset print('Available presets:\n')