mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Reimplement the 0x1866 keyboard power settings
This commit is contained in:
@@ -268,7 +268,7 @@ export component PageAura inherits Rectangle {
|
||||
|
||||
for state[idx] in AuraPageData.led_power.states: old_zone := AuraPowerGroupOld {
|
||||
group-title: @tr("Power Zones");
|
||||
zone_strings <=> AuraPageData.power_zone_names;
|
||||
zone_strings <=> AuraPageData.power_zone_names_old;
|
||||
selected_zone => {
|
||||
AuraPageData.led_power.states[idx].zone = AuraPageData.supported_power_zones[old_zone.current_zone];
|
||||
AuraPageData.set_led_power(AuraPageData.led_power);
|
||||
|
||||
@@ -53,6 +53,13 @@ export global AuraPageData {
|
||||
@tr("Aura power zone" => "Rear Glow"),
|
||||
@tr("Aura power zone" => "Keyboard and Lightbar"),
|
||||
];
|
||||
// Exists only for the older 0x1866 keybaords. On page setup it must
|
||||
// be set to match the supported_power_zones
|
||||
in-out property <[string]> power_zone_names_old: [
|
||||
@tr("Aura power zone" => "Keyboard"),
|
||||
@tr("Aura power zone" => "Lightbar"),
|
||||
@tr("Aura power zone" => "Keyboard and Lightbar"),
|
||||
];
|
||||
in-out property <[string]> brightness_names: [
|
||||
@tr("Aura brightness" => "Off"),
|
||||
@tr("Aura brightness" => "Low"),
|
||||
@@ -138,14 +145,11 @@ export global AuraPageData {
|
||||
}
|
||||
callback set_hex_from_colour(color) -> string;
|
||||
callback set_hex_to_colour(string) -> color;
|
||||
in-out property <AuraDevType> device_type: AuraDevType.New;
|
||||
in-out property <AuraDevType> device_type: AuraDevType.Old;
|
||||
// List of indexes to power_zone_names. Must correspond to rog-aura crate
|
||||
in-out property <[PowerZones]> supported_power_zones: [
|
||||
PowerZones.Keyboard,
|
||||
PowerZones.RearGlow,
|
||||
PowerZones.Lid,
|
||||
PowerZones.Lightbar,
|
||||
PowerZones.Logo,
|
||||
PowerZones.KeyboardAndLightbar,
|
||||
];
|
||||
in-out property <LaptopAuraPower> led_power: {
|
||||
|
||||
Reference in New Issue
Block a user