diff -Nru gnome-shell-extension-system76-power-0.1.2~1530815679~18.04~8beb16d~dev/debian/changelog gnome-shell-extension-system76-power-1.0.0~1536965741~18.04~0cc2661~dev/debian/changelog --- gnome-shell-extension-system76-power-0.1.2~1530815679~18.04~8beb16d~dev/debian/changelog 2018-07-05 18:34:39.000000000 +0000 +++ gnome-shell-extension-system76-power-1.0.0~1536965741~18.04~0cc2661~dev/debian/changelog 2018-09-14 22:55:41.000000000 +0000 @@ -1,6 +1,6 @@ -gnome-shell-extension-system76-power (0.1.2~1530815679~18.04~8beb16d~dev) bionic; urgency=medium +gnome-shell-extension-system76-power (1.0.0~1536965741~18.04~0cc2661~dev) bionic; urgency=medium * Auto Build - -- Pop OS (ISO Signing Key) Thu, 5 Jul 2018 12:34:39 -0600 + -- Pop OS (ISO Signing Key) Fri, 14 Sep 2018 16:55:41 -0600 diff -Nru gnome-shell-extension-system76-power-0.1.2~1530815679~18.04~8beb16d~dev/debian/control gnome-shell-extension-system76-power-1.0.0~1536965741~18.04~0cc2661~dev/debian/control --- gnome-shell-extension-system76-power-0.1.2~1530815679~18.04~8beb16d~dev/debian/control 2018-07-05 18:34:39.000000000 +0000 +++ gnome-shell-extension-system76-power-1.0.0~1536965741~18.04~0cc2661~dev/debian/control 2018-09-14 22:55:41.000000000 +0000 @@ -10,6 +10,6 @@ Package: gnome-shell-extension-system76-power Architecture: all Depends: - system76-power (>= 0.1.2~), + system76-power (>= 1.0.0~), ${misc:Depends} Description: Gnome-shell extension for System76 Power Management diff -Nru gnome-shell-extension-system76-power-0.1.2~1530815679~18.04~8beb16d~dev/extension.js gnome-shell-extension-system76-power-1.0.0~1536965741~18.04~0cc2661~dev/extension.js --- gnome-shell-extension-system76-power-0.1.2~1530815679~18.04~8beb16d~dev/extension.js 2018-07-05 18:34:39.000000000 +0000 +++ gnome-shell-extension-system76-power-1.0.0~1536965741~18.04~0cc2661~dev/extension.js 2018-09-14 22:55:41.000000000 +0000 @@ -22,6 +22,9 @@ \ \ \ + \ + \ + \ \ \ \ @@ -165,58 +168,60 @@ this.powerMenu = Main.panel.statusArea['aggregateMenu']._power._item.menu; try { - var graphics = this.bus.GetGraphicsSync(); + if (this.bus.GetSwitchableSync() == "true") { + var graphics = this.bus.GetGraphicsSync(); - this.graphics_separator = new PopupMenu.PopupSeparatorMenuItem(); - this.powerMenu.addMenuItem(this.graphics_separator, 0); + this.graphics_separator = new PopupMenu.PopupSeparatorMenuItem(); + this.powerMenu.addMenuItem(this.graphics_separator, 0); - var intel_text, nvidia_text; - if (DISPLAY_REQUIRES_NVIDIA) { - if (graphics == "intel") { + var intel_text, nvidia_text; + if (DISPLAY_REQUIRES_NVIDIA) { + if (graphics == "intel") { + intel_text = null; + nvidia_text = _("Enable for external displays.\nRequires restart."); + } else { + intel_text = _("Disables external displays.\nRequires restart."); + nvidia_text = null; + } + } else if (graphics == "intel") { intel_text = null; - nvidia_text = _("Enable for external displays.\nRequires restart."); + nvidia_text = _("Requires restart."); } else { - intel_text = _("Disables external displays.\nRequires restart."); + intel_text = _("Requires restart."); nvidia_text = null; } - } else if (graphics == "intel") { - intel_text = null; - nvidia_text = _("Requires restart."); - } else { - intel_text = _("Requires restart."); - nvidia_text = null; - } - var intel_name = "Intel"; - this.intel = new PopupGraphicsMenuItem(intel_name + GRAPHICS, intel_text); - this.intel.setting = false; - this.intel.connect('activate', (item, event) => { - this.graphics_activate(item, intel_name, "intel"); - }); - this.powerMenu.addMenuItem(this.intel, 0); + var intel_name = "Intel"; + this.intel = new PopupGraphicsMenuItem(intel_name + GRAPHICS, intel_text); + this.intel.setting = false; + this.intel.connect('activate', (item, event) => { + this.graphics_activate(item, intel_name, "intel"); + }); + this.powerMenu.addMenuItem(this.intel, 0); + + var nvidia_name = "NVIDIA"; + this.nvidia = new PopupGraphicsMenuItem(nvidia_name + GRAPHICS, nvidia_text); + this.nvidia.setting = false; + this.nvidia.connect('activate', (item, event) => { + this.graphics_activate(item, nvidia_name, "nvidia"); + }); + this.powerMenu.addMenuItem(this.nvidia, 0); - var nvidia_name = "NVIDIA"; - this.nvidia = new PopupGraphicsMenuItem(nvidia_name + GRAPHICS, nvidia_text); - this.nvidia.setting = false; - this.nvidia.connect('activate', (item, event) => { - this.graphics_activate(item, nvidia_name, "nvidia"); - }); - this.powerMenu.addMenuItem(this.nvidia, 0); + this.reset_graphics_ornament(); + if (graphics == "intel") { + this.intel.setOrnament(Ornament.DOT); + } else if (graphics == "nvidia") { + this.nvidia.setOrnament(Ornament.DOT); + } - this.reset_graphics_ornament(); - if (graphics == "intel") { - this.intel.setOrnament(Ornament.DOT); - } else if (graphics == "nvidia") { - this.nvidia.setOrnament(Ornament.DOT); + var extension = this; + this.bus.connectSignal("HotPlugDetect", function(proxy) { + var graphics = proxy.GetGraphicsSync(); + if (graphics != "nvidia") { + extension.hotplug(extension.nvidia, nvidia_name, "nvidia"); + } + }); } - - var extension = this; - this.bus.connectSignal("HotPlugDetect", function(proxy) { - var graphics = proxy.GetGraphicsSync(); - if (graphics != "nvidia") { - extension.hotplug(extension.nvidia, nvidia_name, "nvidia"); - } - }); } catch (error) { global.log(error); }