2025-02-09 23:09:13 +01:00
|
|
|
/*
|
|
|
|
No overview at start-up
|
2025-02-09 23:16:18 +01:00
|
|
|
GNOME Shell 45+ extension
|
2025-02-09 23:09:13 +01:00
|
|
|
Contributors: @fthx, @fmuellner
|
|
|
|
License: GPL v3
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2025-02-09 23:16:18 +01:00
|
|
|
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
|
2025-02-09 23:09:13 +01:00
|
|
|
|
2025-02-09 23:16:18 +01:00
|
|
|
export default class NoOverviewExtension {
|
2025-02-09 23:09:13 +01:00
|
|
|
constructor() {
|
|
|
|
this._realHasOverview = Main.sessionMode.hasOverview;
|
|
|
|
}
|
|
|
|
|
|
|
|
enable() {
|
|
|
|
if (!Main.layoutManager._startingUp) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
Main.sessionMode.hasOverview = false;
|
2025-02-09 23:16:18 +01:00
|
|
|
|
|
|
|
this._startup_complete = Main.layoutManager.connect('startup-complete', () => {
|
|
|
|
Main.sessionMode.hasOverview = this._realHasOverview;
|
2025-02-09 23:09:13 +01:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
disable() {
|
|
|
|
Main.sessionMode.hasOverview = this._realHasOverview;
|
2025-02-09 23:16:18 +01:00
|
|
|
Main.layoutManager.disconnect(this._startup_complete);
|
2025-02-09 23:09:13 +01:00
|
|
|
}
|
|
|
|
}
|