[+] Use colorama to fix colors on Windows #45
This commit is contained in:
parent
fec5ebe628
commit
99511a4863
1 changed files with 6 additions and 1 deletions
|
@ -11,7 +11,7 @@ from typing import Iterable
|
||||||
|
|
||||||
from . import termenv, neofetch_util
|
from . import termenv, neofetch_util
|
||||||
from .color_scale import Scale
|
from .color_scale import Scale
|
||||||
from .color_util import printc, clear_screen
|
from .color_util import clear_screen
|
||||||
from .constants import *
|
from .constants import *
|
||||||
from .models import Config
|
from .models import Config
|
||||||
from .neofetch_util import *
|
from .neofetch_util import *
|
||||||
|
@ -348,6 +348,11 @@ def run():
|
||||||
except ModuleNotFoundError:
|
except ModuleNotFoundError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
# On Windows: Try to fix color rendering if not in git bash
|
||||||
|
if IS_WINDOWS:
|
||||||
|
import colorama
|
||||||
|
colorama.just_fix_windows_console()
|
||||||
|
|
||||||
# Create CLI
|
# Create CLI
|
||||||
hyfetch = color('&b&lhyfetch&r')
|
hyfetch = color('&b&lhyfetch&r')
|
||||||
parser = argparse.ArgumentParser(description=color(f'{hyfetch} - neofetch with flags <3'))
|
parser = argparse.ArgumentParser(description=color(f'{hyfetch} - neofetch with flags <3'))
|
||||||
|
|
Loading…
Reference in a new issue