-
Notifications
You must be signed in to change notification settings - Fork 5
/
extension.js
33 lines (24 loc) · 1005 Bytes
/
extension.js
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
import * as Main from "resource:///org/gnome/shell/ui/main.js";
import { AppMenuPatcher } from "./patches/appMenuPatcher.js";
import { AppDisplayPatcher } from "./patches/appDisplayPatcher.js";
import { Extension } from 'resource:///org/gnome/shell/extensions/extension.js';
class GnomeAppHiderExtension extends Extension {
enable() {
this.settings = this.getSettings();
this.settings.connect("changed::hidden-apps", () => {
Main.overview._overview.controls.appDisplay._redisplay();
});
this.appMenuPatcher = new AppMenuPatcher(this.settings);
this.appDisplayPatcher = new AppDisplayPatcher(this.settings);
this.appMenuPatcher.enable();
this.appDisplayPatcher.enable();
}
disable() {
this.appMenuPatcher.disable();
this.appDisplayPatcher.disable();
this.appMenuPatcher = null;
this.appDisplayPatcher = null;
this.settings = null;
}
}
export default GnomeAppHiderExtension;