MCPcopy Create free account
hub / github.com/material-shell/material-shell / setDynamic

Function setDynamic

src/module/requiredSettingsModule.ts:40–54  ·  view source on GitHub ↗
(
    settings: Gio.Settings,
    key: string,
    valueType: 'string' | 'boolean',
    value: string | boolean
)

Source from the content-addressed store, hash-verified

38}
39
40function setDynamic(
41 settings: Gio.Settings,
42 key: string,
43 valueType: 'string' | 'boolean',
44 value: string | boolean
45) {
46 switch (valueType) {
47 case 'string':
48 assert(typeof value === 'string', 'invalid value');
49 return settings.set_string(key, value);
50 case 'boolean':
51 assert(typeof value === 'boolean', 'invalid value');
52 return settings.set_boolean(key, value);
53 }
54}
55
56export class RequiredSettingsModule {
57 mutterSettings: Gio.Settings;

Callers 2

destroyMethod · 0.85
setValueIfDifferentMethod · 0.85

Calls 3

assertFunction · 0.90
set_stringMethod · 0.65
set_booleanMethod · 0.65

Tested by

no test coverage detected