[F] termios cannot be imported on Windows
https://github.com/hykilpikonna/hyfetch/issues/16
This commit is contained in:
parent
0fbf8d58cc
commit
79a086fcc3
1 changed files with 7 additions and 5 deletions
|
@ -9,9 +9,8 @@ from itertools import permutations
|
||||||
from math import ceil
|
from math import ceil
|
||||||
from typing import Iterable
|
from typing import Iterable
|
||||||
|
|
||||||
from . import termenv
|
|
||||||
from .color_scale import Scale
|
from .color_scale import Scale
|
||||||
from .color_util import printc, color, clear_screen, AnsiMode
|
from .color_util import printc, clear_screen
|
||||||
from .constants import *
|
from .constants import *
|
||||||
from .models import Config
|
from .models import Config
|
||||||
from .neofetch_util import *
|
from .neofetch_util import *
|
||||||
|
@ -86,9 +85,12 @@ def create_config() -> Config:
|
||||||
|
|
||||||
:return: Config object (automatically stored)
|
:return: Config object (automatically stored)
|
||||||
"""
|
"""
|
||||||
# Detect terminal environment
|
# Detect terminal environment (doesn't work on Windows)
|
||||||
det_bg = termenv.get_background_color()
|
det_bg, det_ansi = None, None
|
||||||
det_ansi = termenv.detect_ansi_mode()
|
if platform.system() != 'Windows':
|
||||||
|
from . import termenv
|
||||||
|
det_bg = termenv.get_background_color()
|
||||||
|
det_ansi = termenv.detect_ansi_mode()
|
||||||
|
|
||||||
asc = get_distro_ascii()
|
asc = get_distro_ascii()
|
||||||
asc_width, asc_lines = ascii_size(asc)
|
asc_width, asc_lines = ascii_size(asc)
|
||||||
|
|
Loading…
Reference in a new issue