summaryrefslogtreecommitdiffstats
path: root/extensions/45/no-overview/extension.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-12-10 13:32:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-12-10 13:32:30 +0000
commit2988db113d9b4b699fbdcab8a40f3a3ef4e622d2 (patch)
tree7e1015b1f8ca941869e163d8d13fceb1036e202f /extensions/45/no-overview/extension.js
parentReleasing debian version 20230618-3. (diff)
downloadgnome-shell-extensions-extra-2988db113d9b4b699fbdcab8a40f3a3ef4e622d2.tar.xz
gnome-shell-extensions-extra-2988db113d9b4b699fbdcab8a40f3a3ef4e622d2.zip
Merging upstream version 20231210.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'extensions/45/no-overview/extension.js')
-rw-r--r--extensions/45/no-overview/extension.js32
1 files changed, 32 insertions, 0 deletions
diff --git a/extensions/45/no-overview/extension.js b/extensions/45/no-overview/extension.js
new file mode 100644
index 0000000..63c914a
--- /dev/null
+++ b/extensions/45/no-overview/extension.js
@@ -0,0 +1,32 @@
+/*
+ No overview at start-up
+ GNOME Shell 45+ extension
+ Contributors: @fthx, @fmuellner
+ License: GPL v3
+*/
+
+
+import * as Main from 'resource:///org/gnome/shell/ui/main.js';
+
+export default class NoOverviewExtension {
+ constructor() {
+ this._realHasOverview = Main.sessionMode.hasOverview;
+ }
+
+ enable() {
+ if (!Main.layoutManager._startingUp) {
+ return;
+ }
+
+ Main.sessionMode.hasOverview = false;
+
+ this._startup_complete = Main.layoutManager.connect('startup-complete', () => {
+ Main.sessionMode.hasOverview = this._realHasOverview;
+ });
+ }
+
+ disable() {
+ Main.sessionMode.hasOverview = this._realHasOverview;
+ Main.layoutManager.disconnect(this._startup_complete);
+ }
+}