feat(config): Prepare for more metadata
This commit is contained in:
+14
-6
@@ -54,15 +54,19 @@ def default_config() -> ArchMgrConfig:
|
||||
"symlinks": [],
|
||||
"template_data": [],
|
||||
"themes": {
|
||||
"cursor_theme": "oreo_spark_blue_cursor",
|
||||
"font": "Comfortaa 11",
|
||||
"gtk": "Adaptive-Theme",
|
||||
"qt": "gtk3",
|
||||
"icon_theme": "candy-icons"
|
||||
},
|
||||
"cursor_theme": "oreo_spark_blue_cursor",
|
||||
"font": "Comfortaa 11",
|
||||
"gtk": "Adaptive-Theme",
|
||||
"qt": "gtk3",
|
||||
"icon_theme": "candy-icons",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
requires_list: list[str] = []
|
||||
source_list = {} # for each setting, in which files it appears
|
||||
|
||||
|
||||
def load_config(file: str) -> ArchMgrConfig:
|
||||
"""Load the configuration from the specified file path
|
||||
|
||||
@@ -72,6 +76,7 @@ def load_config(file: str) -> ArchMgrConfig:
|
||||
Returns:
|
||||
The loaded, validated and parsed config
|
||||
"""
|
||||
global requires_list, source_list
|
||||
# Load and validate initial config
|
||||
try:
|
||||
loaded_conf = _load_config_file(file)
|
||||
@@ -82,6 +87,9 @@ def load_config(file: str) -> ArchMgrConfig:
|
||||
|
||||
configuration = cast(dict[str, Any], loaded_conf)
|
||||
requires = cast(list[str], configuration.pop("requires"))
|
||||
|
||||
# Keep track of all files
|
||||
requires_list += requires
|
||||
conf = cast(ArchMgrConfig, configuration)
|
||||
|
||||
# Recursively load files
|
||||
|
||||
Reference in New Issue
Block a user