diff --git a/extension.js b/extension.js
index a4d1c2e..4462862 100644
--- a/extension.js
+++ b/extension.js
@@ -89,15 +89,11 @@ class Extension {
'/org/freedesktop/UPower');
// This is used to get the current power profile.
- // Ab 41??
const PowerProfilesProxy = Gio.DBusProxy.makeProxyWrapper(
utils.getStringResource('/interfaces/net.hadess.PowerProfiles.xml'));
this._powerProfilesProxy = new PowerProfilesProxy(
Gio.DBus.system, 'net.hadess.PowerProfiles', '/net/hadess/PowerProfiles');
- utils.debug(this._powerProfilesProxy);
- utils.debug(this._powerProfilesProxy.get_connection());
-
// We will monkey-patch these methods. Let's store the original ones.
this._origAddWindowClone = Workspace.prototype._addWindowClone;
this._origWindowRemoved = Workspace.prototype._windowRemoved;
diff --git a/prefs.js b/prefs.js
index 484f768..c6ccdf2 100644
--- a/prefs.js
+++ b/prefs.js
@@ -104,6 +104,7 @@ var PreferencesDialog = class PreferencesDialog {
// Bind general options properties.
this.bindSwitch('destroy-dialogs');
this.bindSwitch('disable-on-battery');
+ this.bindSwitch('disable-on-power-save');
// Starting with GNOME Shell 42, the settings dialog uses libadwaita (at least most of
// the time - it seems that pop!_OS does not support libadwaita even on GNOME 42). We
diff --git a/resources/ui/adw/prefs.ui b/resources/ui/adw/prefs.ui
index ecfc4f0..51a65c1 100644
--- a/resources/ui/adw/prefs.ui
+++ b/resources/ui/adw/prefs.ui
@@ -91,6 +91,28 @@ SPDX-License-Identifier: GPL-3.0-or-later
+
+
+
+
diff --git a/resources/ui/gtk3/prefs.ui b/resources/ui/gtk3/prefs.ui
index ae9ee9f..6616832 100644
--- a/resources/ui/gtk3/prefs.ui
+++ b/resources/ui/gtk3/prefs.ui
@@ -277,6 +277,50 @@ SPDX-License-Identifier: GPL-3.0-or-later
+
+
+ 10
+ 10
+ 10
+ 10
+ 0
+
+
+ 8
+
+
+ Disable in Power-Save Mode
+ 0
+ start
+ center
+ 1
+
+
+
+
+ end
+ center
+
+
+
+
+
+
+ edit-clear-symbolic
+ 1
+
+
+ Reset to Default Value
+
+
+
+
+
+
+
+
diff --git a/resources/ui/gtk4/prefs.ui b/resources/ui/gtk4/prefs.ui
index 239e53e..b148a91 100644
--- a/resources/ui/gtk4/prefs.ui
+++ b/resources/ui/gtk4/prefs.ui
@@ -214,6 +214,40 @@ SPDX-License-Identifier: GPL-3.0-or-later
+
+
+ 0
+
+
+
+
+ Disable in Power-Save Mode
+ 0
+ start
+ center
+ 1
+
+
+
+
+ end
+ center
+
+
+
+
+ edit-clear-symbolic
+ Reset to Default Value
+
+
+
+
+
+
+
+