summaryrefslogtreecommitdiffstats
path: root/extensions/46/no-overview/extension.js
blob: f0a6f288f3d42f515c1944a70f498037005c568e (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
/*
  No overview at start-up
  GNOME Shell 45+ extension
  Contributors: @fthx
  License: GPL v3
*/

import * as Main from 'resource:///org/gnome/shell/ui/main.js';

export default class NoOverviewExtension {
    enable() {
        if (!Main.layoutManager._startingUp) {
            return;
        }

        Main.layoutManager.connectObject(
            'startup-complete',
            () => Main.overview.hide(),
            this
        );
    }

    disable() {
        Main.layoutManager.disconnectObject(this);
    }
}