diff --git a/.config/ags/modules/.configuration/user_options.js b/.config/ags/modules/.configuration/user_options.js index 502f6cecb..e8a5bfa7d 100644 --- a/.config/ags/modules/.configuration/user_options.js +++ b/.config/ags/modules/.configuration/user_options.js @@ -72,7 +72,7 @@ let configOptions = { '': "image-missing", } }, - 'keybinds': { + 'keybinds': { // Format: Mod1+Mod2+key. CaSe SeNsItIvE! // Modifiers: Shift Ctrl Alt Hyper Meta // See https://docs.gtk.org/gdk3/index.html#constants for the other keys (they are listed as KEY_key) @@ -94,11 +94,17 @@ let configOptions = { }, } -// Load user's options -Object.entries(userOverrides).forEach((override) => { - const [key, value] = override; - configOptions[key] = value; -}); +// Override defaults with user's options +function overrideConfigRecursive(userOverrides, configOptions = {}) { + for (const [key, value] of Object.entries(userOverrides)) { + if (typeof value === 'object') { + overrideConfigRecursive(value, configOptions[key]); + } else { + configOptions[key] = value; + } + } +} +overrideConfigRecursive(userOverrides, configOptions); globalThis['userOptions'] = configOptions; export default configOptions; \ No newline at end of file diff --git a/.config/ags/user_options.js b/.config/ags/user_options.js index c30241978..085f37ef4 100644 --- a/.config/ags/user_options.js +++ b/.config/ags/user_options.js @@ -5,12 +5,7 @@ const userConfigOptions = { // Here's an example 'keybinds': { 'sidebar': { - 'apis': { - 'nextTab': "Page_Down", - 'prevTab': "Page_Up", - }, 'pin': "Ctrl+p", - 'cycleTab': "Ctrl+Tab", 'nextTab': "Ctrl+Page_Down", 'prevTab': "Ctrl+Page_Up", },