gui rewritten with builder classes and observables

gui rewritten with builder classes and observables
This commit is contained in:
onyx-and-iris
2022-05-10 20:34:29 +01:00
parent 69eed318c9
commit 92aead8754
12 changed files with 1251 additions and 1366 deletions

View File

@@ -16,5 +16,39 @@ for path in config_path:
print(f"Invalid TOML profile: configs/{filename.stem}")
for name, cfg in configs.items():
print(f"Loaded profile configs/{name}")
print(f"Loaded configuration configs/{name}")
configuration[name] = cfg
_defaults = {
"profiles": {
"profile": None,
},
"theme": {
"enabled": True,
"mode": "light",
},
"extends": {
"extended": True,
"extends_horizontal": True,
},
"channel": {
"width": 80,
"height": 130,
},
"mwscroll_step": {
"size": 3,
},
"submixes": {
"default": 0,
},
}
if "app" in configuration:
configuration["app"] = _defaults | configuration["app"]
else:
configuration["app"] = _defaults
def get_configuration(key):
if key in configuration:
return configuration[key]