MCPcopy Index your code
hub / github.com/material-shell/material-shell / getSettings

Function getSettings

src/utils/settings.ts:8–22  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

6
7/* exported getSettings */
8export const getSettings = (key: string) => {
9 const schema = Gio.SettingsSchemaSource.new_from_directory(
10 Me.instance.metadata.dir.get_child('schemas').get_path()!,
11 Gio.SettingsSchemaSource.get_default(),
12 false
13 ).lookup(Me.instance.metadata[key], true);
14
15 if (schema !== null) {
16 return new Gio.Settings({
17 settings_schema: schema,
18 });
19 } else {
20 throw Error('Cannot find schema');
21 }
22};

Callers 13

enableMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
saveCurrentStateMethod · 0.90
constructorMethod · 0.90
handleWindowMethod · 0.90
checkMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90

Calls 5

get_defaultMethod · 0.80
lookupMethod · 0.65
get_pathMethod · 0.65
get_childMethod · 0.65
ErrorEnum · 0.50

Tested by

no test coverage detected