[F] Implement os detection in termenv
https://github.com/hykilpikonna/hyfetch/issues/16
This commit is contained in:
parent
79a086fcc3
commit
1bccaad8fd
2 changed files with 16 additions and 13 deletions
|
|
@ -9,6 +9,7 @@ from itertools import permutations
|
|||
from math import ceil
|
||||
from typing import Iterable
|
||||
|
||||
from . import termenv
|
||||
from .color_scale import Scale
|
||||
from .color_util import printc, clear_screen
|
||||
from .constants import *
|
||||
|
|
@ -86,11 +87,8 @@ def create_config() -> Config:
|
|||
:return: Config object (automatically stored)
|
||||
"""
|
||||
# Detect terminal environment (doesn't work on Windows)
|
||||
det_bg, det_ansi = None, None
|
||||
if platform.system() != 'Windows':
|
||||
from . import termenv
|
||||
det_bg = termenv.get_background_color()
|
||||
det_ansi = termenv.detect_ansi_mode()
|
||||
det_bg = termenv.get_background_color()
|
||||
det_ansi = termenv.detect_ansi_mode()
|
||||
|
||||
asc = get_distro_ascii()
|
||||
asc_width, asc_lines = ascii_size(asc)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue