[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 typing import Iterable
|
||||
|
||||
from . import termenv
|
||||
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 .models import Config
|
||||
from .neofetch_util import *
|
||||
|
@ -86,7 +85,10 @@ def create_config() -> Config:
|
|||
|
||||
:return: Config object (automatically stored)
|
||||
"""
|
||||
# Detect terminal environment
|
||||
# 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()
|
||||
|
||||
|
|
Loading…
Reference in a new issue