summaryrefslogtreecommitdiff
path: root/raveos-hyprland-theme/theme-data/dms/Common/settings/SettingsSpec.js
blob: 056545eac5164ff9216fcd7340e7b110cf5a28b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
.pragma library

function percentToUnit(v) {
    if (v === undefined || v === null) return undefined;
    return v > 1 ? v / 100 : v;
}

var SPEC = {
    currentThemeName: { def: "raveos", onChange: "applyStoredTheme" },
    currentThemeCategory: { def: "generic" },
    customThemeFile: { def: "" },
    registryThemeVariants: { def: {} },
    matugenScheme: { def: "scheme-tonal-spot", onChange: "regenSystemThemes" },
    matugenContrast: { def: 0, onChange: "regenSystemThemes" },
    runUserMatugenTemplates: { def: true, onChange: "regenSystemThemes" },
    matugenTargetMonitor: { def: "", onChange: "regenSystemThemes" },

    popupTransparency: { def: 1.0, coerce: percentToUnit },
    dockTransparency: { def: 1.0, coerce: percentToUnit },

    widgetBackgroundColor: { def: "sch" },
    widgetColorMode: { def: "default" },
    controlCenterTileColorMode: { def: "primary" },
    buttonColorMode: { def: "primary" },
    cornerRadius: { def: 16, onChange: "updateCompositorLayout" },
    niriLayoutGapsOverride: { def: -1, onChange: "updateCompositorLayout" },
    niriLayoutRadiusOverride: { def: -1, onChange: "updateCompositorLayout" },
    niriLayoutBorderSize: { def: -1, onChange: "updateCompositorLayout" },
    hyprlandLayoutGapsOverride: { def: -1, onChange: "updateCompositorLayout" },
    hyprlandLayoutRadiusOverride: { def: -1, onChange: "updateCompositorLayout" },
    hyprlandLayoutBorderSize: { def: -1, onChange: "updateCompositorLayout" },
    mangoLayoutGapsOverride: { def: -1, onChange: "updateCompositorLayout" },
    mangoLayoutRadiusOverride: { def: -1, onChange: "updateCompositorLayout" },
    mangoLayoutBorderSize: { def: -1, onChange: "updateCompositorLayout" },

    firstDayOfWeek: { def: -1 },
    showWeekNumber: { def: false },
    use24HourClock: { def: true },
    showSeconds: { def: false },
    padHours12Hour: { def: false },
    useFahrenheit: { def: false },
    windSpeedUnit: { def: "kmh" },
    nightModeEnabled: { def: false },
    animationSpeed: { def: 1 },
    customAnimationDuration: { def: 500 },
    syncComponentAnimationSpeeds: { def: true },
    popoutAnimationSpeed: { def: 1 },
    popoutCustomAnimationDuration: { def: 150 },
    modalAnimationSpeed: { def: 1 },
    modalCustomAnimationDuration: { def: 150 },
    enableRippleEffects: { def: true },
    m3ElevationEnabled: { def: true },
    m3ElevationIntensity: { def: 12 },
    m3ElevationOpacity: { def: 30 },
    m3ElevationColorMode: { def: "default" },
    m3ElevationLightDirection: { def: "top" },
    m3ElevationCustomColor: { def: "#000000" },
    modalElevationEnabled: { def: true },
    popoutElevationEnabled: { def: true },
    barElevationEnabled: { def: true },
    blurEnabled: { def: false },
    blurBorderColor: { def: "outline" },
    blurBorderCustomColor: { def: "#ffffff" },
    blurBorderOpacity: { def: 1.0, coerce: percentToUnit },
    wallpaperFillMode: { def: "Fill" },
    blurredWallpaperLayer: { def: false },
    blurWallpaperOnOverview: { def: false },

    showLauncherButton: { def: true },
    showWorkspaceSwitcher: { def: true },
    showFocusedWindow: { def: true },
    showWeather: { def: true },
    showMusic: { def: true },
    showClipboard: { def: true },
    showCpuUsage: { def: true },
    showMemUsage: { def: true },
    showCpuTemp: { def: true },
    showGpuTemp: { def: true },
    selectedGpuIndex: { def: 0 },
    enabledGpuPciIds: { def: [] },
    showSystemTray: { def: true },
    showClock: { def: true },
    showNotificationButton: { def: true },
    showBattery: { def: true },
    showControlCenterButton: { def: true },
    showCapsLockIndicator: { def: true },

    controlCenterShowNetworkIcon: { def: true },
    controlCenterShowBluetoothIcon: { def: true },
    controlCenterShowAudioIcon: { def: true },
    controlCenterShowAudioPercent: { def: false },
    controlCenterShowVpnIcon: { def: true },
    controlCenterShowBrightnessIcon: { def: false },
    controlCenterShowBrightnessPercent: { def: false },
    controlCenterShowMicIcon: { def: false },
    controlCenterShowMicPercent: { def: false },
    controlCenterShowBatteryIcon: { def: false },
    controlCenterShowPrinterIcon: { def: false },
    controlCenterShowScreenSharingIcon: { def: true },

    showPrivacyButton: { def: true },
    privacyShowMicIcon: { def: false },
    privacyShowCameraIcon: { def: false },
    privacyShowScreenShareIcon: { def: false },

    controlCenterWidgets: {
        def: [
            { id: "volumeSlider", enabled: true, width: 50 },
            { id: "brightnessSlider", enabled: true, width: 50 },
            { id: "wifi", enabled: true, width: 50 },
            { id: "bluetooth", enabled: true, width: 50 },
            { id: "audioOutput", enabled: true, width: 50 },
            { id: "audioInput", enabled: true, width: 50 },
            { id: "nightMode", enabled: true, width: 50 },
            { id: "darkMode", enabled: true, width: 50 }
        ]
    },

    showWorkspaceIndex: { def: false },
    showWorkspaceName: { def: false },
    showWorkspacePadding: { def: false },
    workspaceScrolling: { def: false },
    showWorkspaceApps: { def: false },
    workspaceDragReorder: { def: true },
    maxWorkspaceIcons: { def: 3 },
    workspaceAppIconSizeOffset: { def: 0 },
    groupWorkspaceApps: { def: true },
    workspaceFollowFocus: { def: false },
    showOccupiedWorkspacesOnly: { def: false },
    reverseScrolling: { def: false },
    dwlShowAllTags: { def: false },
    workspaceActiveAppHighlightEnabled: { def: false },
    workspaceColorMode: { def: "default" },
    workspaceOccupiedColorMode: { def: "none" },
    workspaceUnfocusedColorMode: { def: "default" },
    workspaceUrgentColorMode: { def: "default" },
    workspaceFocusedBorderEnabled: { def: false },
    workspaceFocusedBorderColor: { def: "primary" },
    workspaceFocusedBorderThickness: { def: 2 },
    workspaceNameIcons: { def: {} },
    waveProgressEnabled: { def: true },
    scrollTitleEnabled: { def: true },
    mediaAdaptiveWidthEnabled: { def: true },
    audioVisualizerEnabled: { def: true },
    audioScrollMode: { def: "volume" },
    audioWheelScrollAmount: { def: 5 },
    clockCompactMode: { def: false },
    focusedWindowCompactMode: { def: false },
    runningAppsCompactMode: { def: true },
    barMaxVisibleApps: { def: 0 },
    barMaxVisibleRunningApps: { def: 0 },
    barShowOverflowBadge: { def: true },
    appsDockHideIndicators: { def: false },
    appsDockColorizeActive: { def: false },
    appsDockActiveColorMode: { def: "primary" },
    appsDockEnlargeOnHover: { def: false },
    appsDockEnlargePercentage: { def: 125 },
    appsDockIconSizePercentage: { def: 100 },
    keyboardLayoutNameCompactMode: { def: false },
    runningAppsCurrentWorkspace: { def: true },
    runningAppsGroupByApp: { def: false },
    runningAppsCurrentMonitor: { def: false },
    appIdSubstitutions: {
        def: [
            { pattern: "Spotify", replacement: "spotify", type: "exact" },
            { pattern: "beepertexts", replacement: "beeper", type: "exact" },
            { pattern: "home assistant desktop", replacement: "homeassistant-desktop", type: "exact" },
            { pattern: "com.transmissionbt.transmission", replacement: "transmission-gtk", type: "contains" },
            { pattern: "^steam_app_(\\d+)$", replacement: "steam_icon_$1", type: "regex" }
        ]
    },
    centeringMode: { def: "index" },
    clockDateFormat: { def: "" },
    lockDateFormat: { def: "" },
    greeterRememberLastSession: { def: true },
    greeterRememberLastUser: { def: true },
    greeterEnableFprint: { def: false, onChange: "scheduleAuthApply" },
    greeterEnableU2f: { def: false, onChange: "scheduleAuthApply" },
    greeterWallpaperPath: { def: "" },
    greeterUse24HourClock: { def: true },
    greeterShowSeconds: { def: false },
    greeterPadHours12Hour: { def: false },
    greeterLockDateFormat: { def: "" },
    greeterFontFamily: { def: "" },
    greeterWallpaperFillMode: { def: "" },
    mediaSize: { def: 1 },

    appLauncherViewMode: { def: "list" },
    spotlightModalViewMode: { def: "list" },
    browserPickerViewMode: { def: "grid" },
    browserUsageHistory: { def: {} },
    appPickerViewMode: { def: "grid" },
    filePickerUsageHistory: { def: {} },
    sortAppsAlphabetically: { def: false },
    appLauncherGridColumns: { def: 4 },
    spotlightCloseNiriOverview: { def: true },
    rememberLastQuery: { def: false },
    spotlightSectionViewModes: { def: {} },
    appDrawerSectionViewModes: { def: {} },
    niriOverviewOverlayEnabled: { def: true },
    dankLauncherV2Size: { def: "compact" },
    dankLauncherV2BorderEnabled: { def: false },
    dankLauncherV2BorderThickness: { def: 2 },
    dankLauncherV2BorderColor: { def: "primary" },
    dankLauncherV2ShowFooter: { def: true },
    dankLauncherV2UnloadOnClose: { def: false },
    dankLauncherV2IncludeFilesInAll: { def: false },
    dankLauncherV2IncludeFoldersInAll: { def: false },

    useAutoLocation: { def: false },
    weatherEnabled: { def: true },

    networkPreference: { def: "auto" },

    iconTheme: { def: "System Default", onChange: "applyStoredIconTheme" },
    availableIconThemes: { def: ["System Default"], persist: false },
    systemDefaultIconTheme: { def: "", persist: false },
    qt5ctAvailable: { def: false, persist: false },
    qt6ctAvailable: { def: false, persist: false },
    gtkAvailable: { def: false, persist: false },

    cursorSettings: { def: { theme: "System Default", size: 24, niri: { hideWhenTyping: false, hideAfterInactiveMs: 0 }, hyprland: { hideOnKeyPress: false, hideOnTouch: false, inactiveTimeout: 0 }, dwl: { cursorHideTimeout: 0 } }, onChange: "updateCompositorCursor" },
    availableCursorThemes: { def: ["System Default"], persist: false },
    systemDefaultCursorTheme: { def: "", persist: false },

    launcherLogoMode: { def: "os" },
    launcherLogoCustomPath: { def: "" },
    launcherLogoColorOverride: { def: "" },
    launcherLogoColorInvertOnMode: { def: false },
    launcherLogoBrightness: { def: 0.5 },
    launcherLogoContrast: { def: 1 },
    launcherLogoSizeOffset: { def: 0 },

    fontFamily: { def: "Inter Variable" },
    monoFontFamily: { def: "Fira Code" },
    fontWeight: { def: 400 },
    fontScale: { def: 1.0 },

    notepadUseMonospace: { def: true },
    notepadFontFamily: { def: "" },
    notepadFontSize: { def: 14 },
    notepadShowLineNumbers: { def: false },
    notepadTransparencyOverride: { def: -1 },
    notepadLastCustomTransparency: { def: 0.7 },

    soundsEnabled: { def: true },
    useSystemSoundTheme: { def: false },
    soundLogin: { def: false },
    soundNewNotification: { def: true },
    soundVolumeChanged: { def: true },
    soundPluggedIn: { def: true },

    acMonitorTimeout: { def: 0 },
    acLockTimeout: { def: 0 },
    acSuspendTimeout: { def: 0 },
    acSuspendBehavior: { def: 0 },
    acProfileName: { def: "" },
    batteryMonitorTimeout: { def: 0 },
    batteryLockTimeout: { def: 0 },
    batterySuspendTimeout: { def: 0 },
    batterySuspendBehavior: { def: 0 },
    batteryProfileName: { def: "" },
    batteryChargeLimit: { def: 100 },
    lockBeforeSuspend: { def: false },
    loginctlLockIntegration: { def: true },
    fadeToLockEnabled: { def: true },
    fadeToLockGracePeriod: { def: 5 },
    fadeToDpmsEnabled: { def: true },
    fadeToDpmsGracePeriod: { def: 5 },
    launchPrefix: { def: "" },
    brightnessDevicePins: { def: {} },
    wifiNetworkPins: { def: {} },
    bluetoothDevicePins: { def: {} },
    audioInputDevicePins: { def: {} },
    audioOutputDevicePins: { def: {} },

    gtkThemingEnabled: { def: false, onChange: "regenSystemThemes" },
    qtThemingEnabled: { def: false, onChange: "regenSystemThemes" },
    syncModeWithPortal: { def: true },
    terminalsAlwaysDark: { def: false, onChange: "regenSystemThemes" },

    muxType: { def: "tmux" },
    muxUseCustomCommand: { def: false },
    muxCustomCommand: { def: "" },
    muxSessionFilter: { def: "" },

    runDmsMatugenTemplates: { def: true },
    matugenTemplateGtk: { def: true },
    matugenTemplateNiri: { def: true },
    matugenTemplateHyprland: { def: true },
    matugenTemplateMangowc: { def: true },
    matugenTemplateQt5ct: { def: true },
    matugenTemplateQt6ct: { def: true },
    matugenTemplateFirefox: { def: true },
    matugenTemplatePywalfox: { def: true },
    matugenTemplateZenBrowser: { def: true },
    matugenTemplateVesktop: { def: true },
    matugenTemplateEquibop: { def: true },
    matugenTemplateGhostty: { def: true },
    matugenTemplateKitty: { def: true },
    matugenTemplateFoot: { def: true },
    matugenTemplateAlacritty: { def: true },
    matugenTemplateNeovim: { def: false },
    matugenTemplateWezterm: { def: true },
    matugenTemplateDgop: { def: true },
    matugenTemplateKcolorscheme: { def: true },
    matugenTemplateVscode: { def: true },
    matugenTemplateEmacs: { def: true },
    matugenTemplateZed: { def: true },

    matugenTemplateNeovimSettings: {
        def: {
            dark: { baseTheme: "github_dark", harmony: 0.5 },
            light: { baseTheme: "github_light", harmony: 0.5 }
        }
    },
    matugenTemplateNeovimSetBackground: { def: true },

    showDock: { def: false },
    dockAutoHide: { def: false },
    dockSmartAutoHide: { def: false },
    dockGroupByApp: { def: false },
    dockRestoreSpecialWorkspaceOnClick: { def: false },
    dockOpenOnOverview: { def: false },
    dockPosition: { def: 1 },
    dockSpacing: { def: 4 },
    dockBottomGap: { def: 0 },
    dockMargin: { def: 0 },
    dockIconSize: { def: 40 },
    dockIndicatorStyle: { def: "circle" },
    dockBorderEnabled: { def: false },
    dockBorderColor: { def: "surfaceText" },
    dockBorderOpacity: { def: 1.0, coerce: percentToUnit },
    dockBorderThickness: { def: 1 },
    dockIsolateDisplays: { def: false },
    dockLauncherEnabled: { def: false },
    dockLauncherLogoMode: { def: "apps" },
    dockLauncherLogoCustomPath: { def: "" },
    dockLauncherLogoColorOverride: { def: "" },
    dockLauncherLogoSizeOffset: { def: 0 },
    dockLauncherLogoBrightness: { def: 0.5, coerce: percentToUnit },
    dockLauncherLogoContrast: { def: 1, coerce: percentToUnit },
    dockMaxVisibleApps: { def: 0 },
    dockMaxVisibleRunningApps: { def: 0 },
    dockShowOverflowBadge: { def: true },

    notificationOverlayEnabled: { def: false },
    notificationPopupShadowEnabled: { def: true },
    notificationPopupPrivacyMode: { def: false },
    overviewRows: { def: 2, persist: false },
    overviewColumns: { def: 5, persist: false },
    overviewScale: { def: 0.16, persist: false },

    modalDarkenBackground: { def: true },

    lockScreenShowPowerActions: { def: true },
    lockScreenShowSystemIcons: { def: true },
    lockScreenShowTime: { def: true },
    lockScreenShowDate: { def: true },
    lockScreenShowProfileImage: { def: true },
    lockScreenShowPasswordField: { def: true },
    lockScreenShowMediaPlayer: { def: true },
    lockScreenPowerOffMonitorsOnLock: { def: false },
    lockAtStartup: { def: false },
    enableFprint: { def: false, onChange: "scheduleAuthApply" },
    maxFprintTries: { def: 15 },
    enableU2f: { def: false, onChange: "scheduleAuthApply" },
    u2fMode: { def: "or" },
    lockScreenActiveMonitor: { def: "all" },
    lockScreenInactiveColor: { def: "#000000" },
    lockScreenNotificationMode: { def: 0 },
    lockScreenVideoEnabled: { def: false },
    lockScreenVideoPath: { def: "" },
    lockScreenVideoCycling: { def: false },
    hideBrightnessSlider: { def: false },

    notificationTimeoutLow: { def: 5000 },
    notificationTimeoutNormal: { def: 5000 },
    notificationTimeoutCritical: { def: 0 },
    notificationCompactMode: { def: false },
    notificationPopupPosition: { def: 0 },
    notificationAnimationSpeed: { def: 1 },
    notificationCustomAnimationDuration: { def: 400 },
    notificationHistoryEnabled: { def: true },
    notificationHistoryMaxCount: { def: 50 },
    notificationHistoryMaxAgeDays: { def: 7 },
    notificationHistorySaveLow: { def: true },
    notificationHistorySaveNormal: { def: true },
    notificationHistorySaveCritical: { def: true },
    notificationRules: { def: [] },
    notificationFocusedMonitor: { def: false },

    osdAlwaysShowValue: { def: false },
    osdPosition: { def: 5 },
    osdVolumeEnabled: { def: true },
    osdMediaVolumeEnabled: { def: true },
    osdMediaPlaybackEnabled: { def: false },
    osdBrightnessEnabled: { def: true },
    osdIdleInhibitorEnabled: { def: true },
    osdMicMuteEnabled: { def: true },
    osdCapsLockEnabled: { def: true },
    osdPowerProfileEnabled: { def: false },
    osdAudioOutputEnabled: { def: true },

    powerActionConfirm: { def: true },
    powerActionHoldDuration: { def: 0.5 },
    powerMenuActions: { def: ["reboot", "logout", "poweroff", "lock", "suspend", "restart"] },
    powerMenuDefaultAction: { def: "logout" },
    powerMenuGridLayout: { def: false },
    customPowerActionLock: { def: "" },
    customPowerActionLogout: { def: "" },
    customPowerActionSuspend: { def: "" },
    customPowerActionHibernate: { def: "" },
    customPowerActionReboot: { def: "" },
    customPowerActionPowerOff: { def: "" },

    updaterHideWidget: { def: false },
    updaterUseCustomCommand: { def: false },
    updaterCustomCommand: { def: "" },
    updaterTerminalAdditionalParams: { def: "" },

    displayNameMode: { def: "system" },
    screenPreferences: { def: {} },
    showOnLastDisplay: { def: {} },
    niriOutputSettings: { def: {} },
    hyprlandOutputSettings: { def: {} },
    displayProfiles: { def: {} },
    activeDisplayProfile: { def: {} },
    displayProfileAutoSelect: { def: false },
    displayShowDisconnected: { def: false },
    displaySnapToEdge: { def: true },

    barConfigs: {
        def: [{
            id: "default",
            name: "Main Bar",
            enabled: true,
            position: 0,
            screenPreferences: ["all"],
            showOnLastDisplay: true,
            leftWidgets: ["launcherButton", "workspaceSwitcher", "focusedWindow"],
            centerWidgets: ["music", "clock", "weather"],
            rightWidgets: ["systemTray", "clipboard", "cpuUsage", "memUsage", "notificationButton", "battery", "controlCenterButton"],
            spacing: 4,
            innerPadding: 4,
            bottomGap: 0,
            transparency: 1.0,
            widgetTransparency: 1.0,
            squareCorners: false,
            noBackground: false,
            maximizeWidgetIcons: false,
            maximizeWidgetText: false,
            removeWidgetPadding: false,
            widgetPadding: 8,
            gothCornersEnabled: false,
            gothCornerRadiusOverride: false,
            gothCornerRadiusValue: 12,
            borderEnabled: false,
            borderColor: "surfaceText",
            borderOpacity: 1.0,
            borderThickness: 1,
            widgetOutlineEnabled: false,
            widgetOutlineColor: "primary",
            widgetOutlineOpacity: 1.0,
            widgetOutlineThickness: 1,
            fontScale: 1.0,
            iconScale: 1.0,
            autoHide: false,
            autoHideDelay: 250,
            showOnWindowsOpen: false,
            openOnOverview: false,
            visible: true,
            popupGapsAuto: true,
            popupGapsManual: 4,
            maximizeDetection: true,
            scrollEnabled: true,
            scrollXBehavior: "column",
            scrollYBehavior: "workspace",
            shadowIntensity: 0,
            shadowOpacity: 60,
            shadowColorMode: "default",
            shadowCustomColor: "#000000",
            clickThrough: false
        }], onChange: "updateBarConfigs"
    },

    desktopClockEnabled: { def: false },
    desktopClockStyle: { def: "analog" },
    desktopClockTransparency: { def: 0.8, coerce: percentToUnit },
    desktopClockColorMode: { def: "primary" },
    desktopClockCustomColor: { def: "#ffffff" },
    desktopClockShowDate: { def: true },
    desktopClockShowAnalogNumbers: { def: false },
    desktopClockShowAnalogSeconds: { def: true },
    desktopClockX: { def: -1 },
    desktopClockY: { def: -1 },
    desktopClockWidth: { def: 280 },
    desktopClockHeight: { def: 180 },
    desktopClockDisplayPreferences: { def: ["all"] },

    systemMonitorEnabled: { def: false },
    systemMonitorShowHeader: { def: true },
    systemMonitorTransparency: { def: 0.8, coerce: percentToUnit },
    systemMonitorColorMode: { def: "primary" },
    systemMonitorCustomColor: { def: "#ffffff" },
    systemMonitorShowCpu: { def: true },
    systemMonitorShowCpuGraph: { def: true },
    systemMonitorShowCpuTemp: { def: true },
    systemMonitorShowGpuTemp: { def: false },
    systemMonitorGpuPciId: { def: "" },
    systemMonitorShowMemory: { def: true },
    systemMonitorShowMemoryGraph: { def: true },
    systemMonitorShowNetwork: { def: true },
    systemMonitorShowNetworkGraph: { def: true },
    systemMonitorShowDisk: { def: true },
    systemMonitorShowTopProcesses: { def: false },
    systemMonitorTopProcessCount: { def: 3 },
    systemMonitorTopProcessSortBy: { def: "cpu" },
    systemMonitorGraphInterval: { def: 60 },
    systemMonitorLayoutMode: { def: "auto" },
    systemMonitorX: { def: -1 },
    systemMonitorY: { def: -1 },
    systemMonitorWidth: { def: 320 },
    systemMonitorHeight: { def: 480 },
    systemMonitorDisplayPreferences: { def: ["all"] },
    systemMonitorVariants: { def: [] },
    desktopWidgetPositions: { def: {} },
    desktopWidgetGridSettings: { def: {} },

    desktopWidgetInstances: { def: [] },

    desktopWidgetGroups: { def: [] },

    builtInPluginSettings: { def: {} },
    clipboardEnterToPaste: { def: false },

    launcherPluginVisibility: { def: {} },
    launcherPluginOrder: { def: [] }
};

function getValidKeys() {
    return Object.keys(SPEC).filter(function (k) { return SPEC[k].persist !== false; }).concat(["configVersion"]);
}

function set(root, key, value, saveFn, hooks) {
    if (!(key in SPEC)) return;
    root[key] = value;
    var hookName = SPEC[key].onChange;
    if (hookName && hooks && hooks[hookName]) {
        hooks[hookName](root);
    }
    saveFn();
}