forked from tuxor1337/hidetopbar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathextension.js
36 lines (29 loc) · 911 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
34
35
36
//
// Hides the Gnome "top bar" except in overview mode.
// https://extensions.gnome.org/extension/545/hide-top-bar/
// https://github.com/mlutfy/hidetopbar
//
// See README for more information.
//
const Main = imports.ui.main;
const Me = imports.misc.extensionUtils.getCurrentExtension();
const Convenience = Me.imports.convenience;
const PanelVisibilityManager = Me.imports.panelVisibilityManager;
const DEBUG = Convenience.DEBUG;
let mSettings = null;
let mPVManager = null;
let monitorIndex = null;
function init() { }
function enable() {
DEBUG("enable()");
mSettings = Convenience.getSettings();
monitorIndex = Main.layoutManager.primaryIndex;
mPVManager = new PanelVisibilityManager.PanelVisibilityManager(mSettings, monitorIndex);
}
function disable() {
DEBUG("disable()");
mPVManager.destroy();
mSettings.run_dispose();
mPVManager = null;
mSettings = null;
}