feat(config): Prepare for more metadata
This commit is contained in:
+10
-2
@@ -58,11 +58,15 @@ def default_config() -> ArchMgrConfig:
|
||||
"font": "Comfortaa 11",
|
||||
"gtk": "Adaptive-Theme",
|
||||
"qt": "gtk3",
|
||||
"icon_theme": "candy-icons"
|
||||
},
|
||||
"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
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
def update_users_and_groups():
|
||||
pass
|
||||
Reference in New Issue
Block a user