mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 13:32:50 -05:00
launcher: built-in plugins, add settings search plugin with ? default
trigger
This commit is contained in:
@@ -62,6 +62,22 @@ Singleton {
|
||||
property bool _hasUnsavedChanges: false
|
||||
property var _loadedSettingsSnapshot: null
|
||||
property var pluginSettings: ({})
|
||||
property var builtInPluginSettings: ({})
|
||||
|
||||
function getBuiltInPluginSetting(pluginId, key, defaultValue) {
|
||||
if (!builtInPluginSettings[pluginId])
|
||||
return defaultValue;
|
||||
return builtInPluginSettings[pluginId][key] !== undefined ? builtInPluginSettings[pluginId][key] : defaultValue;
|
||||
}
|
||||
|
||||
function setBuiltInPluginSetting(pluginId, key, value) {
|
||||
const updated = JSON.parse(JSON.stringify(builtInPluginSettings));
|
||||
if (!updated[pluginId])
|
||||
updated[pluginId] = {};
|
||||
updated[pluginId][key] = value;
|
||||
builtInPluginSettings = updated;
|
||||
saveSettings();
|
||||
}
|
||||
|
||||
property alias dankBarLeftWidgetsModel: leftWidgetsModel
|
||||
property alias dankBarCenterWidgetsModel: centerWidgetsModel
|
||||
|
||||
Reference in New Issue
Block a user