This commit is contained in:
Arris Kathery 2023-12-18 15:53:10 -08:00
parent 6542cc29c6
commit 7ff7865f32
Signed by: elburg
GPG key ID: 565F8F14CB163871
2 changed files with 17 additions and 1 deletions

View file

@ -1,7 +1,7 @@
# import qt stuff # import qt stuff
import PyQt6.QtCore # TODO: only import classes and methods needed to reduce mem usage 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 import platform
from importlib.metadata import version, PackageNotFoundError from importlib.metadata import version, PackageNotFoundError
tzv = "" tzv = ""

16
themezed/config.py Normal file
View file

@ -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: