1- import { ThemeChanger } from "./modules/themeChanger.ts" ;
2- import { Dock } from "./modules/dock.ts" ;
3- import { NoOverview } from "./modules/noOverview.ts" ;
4- import { PipOnTop } from "./modules/pipOnTop.ts" ;
5- import type { Module } from "./module.ts" ;
6-
71/**
82 * Module definition that includes both runtime and UI metadata
93 */
@@ -12,8 +6,6 @@ export type ModuleDefinition = {
126 key : string ;
137 /** GSettings schema key */
148 settingsKey : string ;
15- /** Factory function to create module instance */
16- create : ( ) => Module ;
179 /** User-facing title for preferences UI */
1810 title : string ;
1911 /** User-facing subtitle/description for preferences UI */
@@ -23,36 +15,32 @@ export type ModuleDefinition = {
2315/**
2416 * Single source of truth for all available modules.
2517 * To add a new module:
26- * 1. Import its class at the top
27- * 2. Add one entry to this array
18+ * 1. Add one entry to this array
19+ * 2. Add a factory entry in extension.ts MODULE_FACTORIES
2820 * 3. Add corresponding key to gschema.xml
2921 */
3022export const MODULE_REGISTRY : ModuleDefinition [ ] = [
3123 {
3224 key : 'themeChanger' ,
3325 settingsKey : 'module-theme-changer' ,
34- create : ( ) => new ThemeChanger ( ) ,
3526 title : 'Theme Changer' ,
3627 subtitle : 'Monitors and synchronizes GNOME color scheme' ,
3728 } ,
3829 {
3930 key : 'dock' ,
4031 settingsKey : 'module-dock' ,
41- create : ( ) => new Dock ( ) ,
4232 title : 'Dock' ,
4333 subtitle : 'Custom dock with auto-hide and intellihide features' ,
4434 } ,
4535 {
4636 key : 'noOverview' ,
4737 settingsKey : 'module-no-overview' ,
48- create : ( ) => new NoOverview ( ) ,
4938 title : 'No Overview' ,
5039 subtitle : 'Disables the overview at startup' ,
5140 } ,
5241 {
5342 key : 'pipOnTop' ,
5443 settingsKey : 'module-pip-on-top' ,
55- create : ( ) => new PipOnTop ( ) ,
5644 title : 'Pip On Top' ,
5745 subtitle : 'Keeps Picture-in-Picture windows always on top' ,
5846 } ,
0 commit comments