mirror of
https://github.com/danbulant/dots-hyprland
synced 2026-05-24 12:22:09 +00:00
Substitutions again (#577)
This commit is contained in:
commit
5c78446c3c
1 changed files with 7 additions and 3 deletions
|
|
@ -193,11 +193,15 @@ let configOptions = {
|
|||
|
||||
// Override defaults with user's options
|
||||
let optionsOkay = true;
|
||||
function overrideConfigRecursive(userOverrides, configOptions = {}) {
|
||||
function overrideConfigRecursive(userOverrides, configOptions = {}, check = true) {
|
||||
for (const [key, value] of Object.entries(userOverrides)) {
|
||||
if (configOptions[key] === undefined) optionsOkay = false;
|
||||
if (configOptions[key] === undefined && check) {
|
||||
optionsOkay = false;
|
||||
}
|
||||
else if (typeof value === 'object') {
|
||||
overrideConfigRecursive(value, configOptions[key]);
|
||||
if (key === "substitutions" || key === "regexSubstitutions") {
|
||||
overrideConfigRecursive(value, configOptions[key], false);
|
||||
} else overrideConfigRecursive(value, configOptions[key]);
|
||||
} else {
|
||||
configOptions[key] = value;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue