gex: temporary checking of which primary quicktoggle to use

This commit is contained in:
Luke D. Jones
2023-07-02 19:15:55 +12:00
parent 669c8ac3c7
commit db1683de46
2 changed files with 13 additions and 5 deletions

View File

@@ -14,5 +14,8 @@
<range min="20" max="100"/>
<default>100</default>
</key>
<key type="s" name="primary-quickmenu-toggle">
<default>"mini-led"</default>
</key>
</schema>
</schemalist>

View File

@@ -48,16 +48,21 @@ export const FeatureMenuToggle = GObject.registerClass(
this.menu.setHeader("selection-mode-symbolic", "Laptop features");
this._settings = ExtensionUtils.getSettings();
this._itemsSection = new PopupMenu.PopupMenuSection();
this.primary = this._settings.get_string("primary-quickmenu-toggle");
// TODO: temporary block
if (this._dbus_supported.supported.rog_bios_ctrl.mini_led_mode) {
this.primary = "mini-led";
} else if (this._dbus_supported.supported.rog_bios_ctrl.panel_overdrive) {
if (this.primary == "mini-led" && !this._dbus_supported.supported.rog_bios_ctrl.mini_led_mode) {
this.primary = "panel-od";
} else if (this._dbus_supported.supported.anime_ctrl) {
} else if (this.primary == "panel-od" && !this._dbus_supported.supported.rog_bios_ctrl.panel_overdrive) {
this.primary = "anime-power";
} else if (this.primary == "anime-power" && !this._dbus_supported.supported.anime_ctrl) {
this.primary = "mini-led";
} else if (this.primary.length == 0) {
this.primary = "panel-od";
}
this._settings.set_string("primary-quickmenu-toggle", this.primary);
this._itemsSection = new PopupMenu.PopupMenuSection();
if (this._dbus_supported.supported.rog_bios_ctrl.mini_led_mode) {
if (this.miniLed == null) {