diff --git a/themezed/__main__.py b/themezed/__main__.py index 951db05..62ee3c7 100644 --- a/themezed/__main__.py +++ b/themezed/__main__.py @@ -1,7 +1,7 @@ # import qt stuff import PyQt6.QtCore # TODO: only import classes and methods needed to reduce mem usage -def print_ver(): # TODO: maybe find a better way to do this? +def print_ver() -> None: # TODO: maybe find a better way to do this? import platform from importlib.metadata import version, PackageNotFoundError tzv = "" diff --git a/themezed/config.py b/themezed/config.py new file mode 100644 index 0000000..de1cdb7 --- /dev/null +++ b/themezed/config.py @@ -0,0 +1,16 @@ +from yaml import load, parse, dump + +class ConfEnv: + def _getUserConf(): + from re import search, IGNORECASE + from os import listdir, environ + from os.path import exists, joins + from pathlib import Path + from platform import system + cfgFileRegex = r'((config|cfg)\.(((ya?)ml)|(conf|cfg))' + + work = Path.home() + if system=='Linux': + for fname in work.iterdir(): + if type(search(cfgFileRegex,fname.name, flags=IGNORECASE))!=None: +