mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Compare commits
31 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ea9ca79a8f | |||
| 4a97f173be | |||
| 8f35220c5f | |||
| c3880d055d | |||
| b661f67084 | |||
| abd2ca8601 | |||
| 0905ed8ad4 | |||
| c1268d4aad | |||
| 5ed47abc32 | |||
| 718bb8b86f | |||
| 5ab9642b79 | |||
| 14acab9a9c | |||
| e4dd485dd4 | |||
| ab1d75e5ec | |||
| e4c5df6cca | |||
| 9ee7ee26a2 | |||
| e8ebdacb91 | |||
| b97921fea2 | |||
| a3423195a6 | |||
| f55edfbae0 | |||
| 3e065b6715 | |||
| f14d1ad61e | |||
| 85d4e9cabd | |||
| e47a9cffd7 | |||
| ca93dc7215 | |||
| 93a646773c | |||
| 1cba693469 | |||
| 166149b351 | |||
| 1b11b6d8fb | |||
| 02568299df | |||
| acdc93596c |
@@ -2,6 +2,26 @@
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [v6.0.12]
|
||||
|
||||
### Changed
|
||||
- Add Ally X aura config
|
||||
- Fixes to Ally led power configs
|
||||
- Fix CLI led modes
|
||||
- Add FX517Z to aura_support
|
||||
- Add G614JJ Aura support
|
||||
- Add G614JZ (2023 Strix G16) Aura support
|
||||
|
||||
## [v6.0.11]
|
||||
|
||||
### Changed
|
||||
- Renamed `Strobe` effect to `RainbowCycle` to prevent confusion over what it is
|
||||
- Ranamed `Rainbow` effect to `RainbowWave`
|
||||
- Cleaned up serde crate deps
|
||||
- Fixed AniMe on GA402XZ
|
||||
- Update some of the G713 device aura features
|
||||
- Update some of the G513 device aura features
|
||||
|
||||
## [v6.0.10]
|
||||
|
||||
### Added
|
||||
|
||||
Generated
+998
-876
File diff suppressed because it is too large
Load Diff
+4
-5
@@ -1,5 +1,5 @@
|
||||
[workspace.package]
|
||||
version = "6.0.10"
|
||||
version = "6.0.12"
|
||||
rust-version = "1.77"
|
||||
license = "MPL-2.0"
|
||||
readme = "README.md"
|
||||
@@ -36,7 +36,7 @@ default-members = [
|
||||
]
|
||||
|
||||
[workspace.dependencies]
|
||||
tokio = { version = "^1.36.0", default-features = false, features = [
|
||||
tokio = { version = "^1.39.0", default-features = false, features = [
|
||||
"macros",
|
||||
"sync",
|
||||
"time",
|
||||
@@ -47,11 +47,10 @@ dirs = "^4.0"
|
||||
smol = "^1.3"
|
||||
mio = "0.8.11"
|
||||
|
||||
zbus = "4.2"
|
||||
zbus = "4.4"
|
||||
logind-zbus = { version = "4.0.3" } #, default-features = false, features = ["non_blocking"] }
|
||||
|
||||
serde = "^1.0"
|
||||
serde_derive = "^1.0"
|
||||
serde = { version = "^1.0", features = ["serde_derive"] }
|
||||
ron = "*"
|
||||
typeshare = "1.0.0"
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ vendor:
|
||||
mv .cargo/config ./cargo-config
|
||||
rm -rf .cargo
|
||||
rm -rf vendor
|
||||
cargo vendor-filterer --platform x86_64-unknown-linux-gnu vendor
|
||||
cargo vendor-filterer --all-features --platform x86_64-unknown-linux-gnu vendor
|
||||
tar pcfJ vendor_asusctl_$(VERSION).tar.xz vendor
|
||||
rm -rf vendor
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ Now includes a GUI, `rog-control-center`.
|
||||
|
||||
## Kernel support
|
||||
|
||||
**The minimum supported kernel version is 6.10**, which will contain the patches from [here](https://lore.kernel.org/platform-driver-x86/20240404001652.86207-1-luke@ljones.dev/). This is especially required for 2023+ devices and possibly some lat 2022 devices.
|
||||
**The minimum supported kernel version is 6.10**, which will contain the patches from [here](https://lore.kernel.org/platform-driver-x86/20240404001652.86207-1-luke@ljones.dev/). This is especially required for 2023+ devices and possibly some late 2022 devices.
|
||||
|
||||
Z13 devices will need [these](https://lore.kernel.org/linux-input/20240416090402.31057-1-luke@ljones.dev/T/#t)
|
||||
|
||||
|
||||
@@ -41,6 +41,8 @@ pub enum SetAuraZoneEnabled {
|
||||
Lid(AuraPowerStates),
|
||||
#[options(help = "")]
|
||||
RearGlow(AuraPowerStates),
|
||||
#[options(help = "")]
|
||||
Ally(AuraPowerStates),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Options)]
|
||||
@@ -219,9 +221,9 @@ pub enum SetAuraBuiltin {
|
||||
#[options(help = "pulse between one or two colours")]
|
||||
Breathe(TwoColourSpeed), // 1
|
||||
#[options(help = "strobe through all colours")]
|
||||
Strobe(SingleSpeed), // 2
|
||||
RainbowCycle(SingleSpeed), // 2
|
||||
#[options(help = "rainbow cycling in one of four directions")]
|
||||
Rainbow(SingleSpeedDirection), // 3
|
||||
RainbowWave(SingleSpeedDirection), // 3
|
||||
#[options(help = "rain pattern mimicking raindrops")]
|
||||
Stars(TwoColourSpeed), // 4
|
||||
#[options(help = "rain pattern of three preset colours")]
|
||||
@@ -312,14 +314,14 @@ impl From<&SetAuraBuiltin> for AuraEffect {
|
||||
data.mode = AuraModeNum::Breathe;
|
||||
data
|
||||
}
|
||||
SetAuraBuiltin::Strobe(x) => {
|
||||
SetAuraBuiltin::RainbowCycle(x) => {
|
||||
let mut data: AuraEffect = x.into();
|
||||
data.mode = AuraModeNum::Strobe;
|
||||
data.mode = AuraModeNum::RainbowCycle;
|
||||
data
|
||||
}
|
||||
SetAuraBuiltin::Rainbow(x) => {
|
||||
SetAuraBuiltin::RainbowWave(x) => {
|
||||
let mut data: AuraEffect = x.into();
|
||||
data.mode = AuraModeNum::Rainbow;
|
||||
data.mode = AuraModeNum::RainbowWave;
|
||||
data
|
||||
}
|
||||
SetAuraBuiltin::Stars(x) => {
|
||||
|
||||
+6
-4
@@ -573,10 +573,11 @@ fn handle_led_mode(
|
||||
let modes = aura.first().unwrap().supported_basic_modes()?;
|
||||
for command in commands.iter().filter(|command| {
|
||||
for mode in &modes {
|
||||
if command
|
||||
.trim()
|
||||
.starts_with(&<&str>::from(mode).to_lowercase())
|
||||
{
|
||||
let mut mode = <&str>::from(mode).to_string();
|
||||
if let Some(pos) = mode.chars().skip(1).position(|c| c.is_uppercase()) {
|
||||
mode.insert(pos + 1, '-');
|
||||
}
|
||||
if command.trim().starts_with(&mode.to_lowercase()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -750,6 +751,7 @@ fn handle_led_power2(
|
||||
aura_cli::SetAuraZoneEnabled::Lightbar(l) => set(PowerZones::Lightbar, l),
|
||||
aura_cli::SetAuraZoneEnabled::Lid(l) => set(PowerZones::Lid, l),
|
||||
aura_cli::SetAuraZoneEnabled::RearGlow(r) => set(PowerZones::RearGlow, r),
|
||||
aura_cli::SetAuraZoneEnabled::Ally(r) => set(PowerZones::Ally, r),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ smol.workspace = true
|
||||
|
||||
# serialisation
|
||||
serde.workspace = true
|
||||
serde_derive.workspace = true
|
||||
ron.workspace = true
|
||||
|
||||
rog_anime = { path = "../rog-anime" }
|
||||
|
||||
@@ -6,7 +6,7 @@ use rog_anime::{ActionLoader, AnimTime, AnimeType, Fade, Sequences as AnimeSeque
|
||||
use rog_aura::effects::{AdvancedEffects as AuraSequences, Breathe, DoomFlicker, Effect, Static};
|
||||
use rog_aura::keyboard::LedCode;
|
||||
use rog_aura::{Colour, Speed};
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::error::Error;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ use rog_anime::error::AnimeError;
|
||||
use rog_anime::{ActionData, ActionLoader, AnimTime, Fade, Sequences, Vec2};
|
||||
use rog_dbus::zbus_anime::AnimeProxyBlocking;
|
||||
use ron::ser::PrettyConfig;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use zbus::interface;
|
||||
use zbus::zvariant::{ObjectPath, Type};
|
||||
|
||||
|
||||
@@ -38,7 +38,6 @@ logind-zbus.workspace = true
|
||||
|
||||
# serialisation
|
||||
serde.workspace = true
|
||||
serde_derive.workspace = true
|
||||
|
||||
concat-idents.workspace = true
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
use config_traits::{StdConfig, StdConfigLoad1};
|
||||
use rog_platform::cpu::CPUEPP;
|
||||
use rog_platform::platform::ThrottlePolicy;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
const CONFIG_FILE: &str = "asusd.ron";
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ use rog_anime::usb::Brightness;
|
||||
use rog_anime::{
|
||||
ActionData, ActionLoader, AnimTime, Animations, AnimeType, DeviceState, Fade, Vec2,
|
||||
};
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
const CONFIG_FILE: &str = "anime.ron";
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ use rog_aura::keyboard::LaptopAuraPower;
|
||||
use rog_aura::{
|
||||
AuraDeviceType, AuraEffect, AuraModeNum, AuraZone, Direction, LedBrightness, Speed, GRADIENT,
|
||||
};
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::error::RogError;
|
||||
|
||||
@@ -15,6 +15,8 @@ use crate::error::RogError;
|
||||
// #[serde(default)]
|
||||
pub struct AuraConfig {
|
||||
pub config_name: String,
|
||||
#[serde(skip_serializing_if = "Option::is_none", default)]
|
||||
pub ally_fix: Option<bool>,
|
||||
pub brightness: LedBrightness,
|
||||
pub current_mode: AuraModeNum,
|
||||
pub builtins: BTreeMap<AuraModeNum, AuraEffect>,
|
||||
@@ -57,6 +59,7 @@ impl AuraConfig {
|
||||
let enabled = LaptopAuraPower::new(device_type, &support_data);
|
||||
let mut config = AuraConfig {
|
||||
config_name: format!("aura_{prod_id}.ron"),
|
||||
ally_fix: None,
|
||||
brightness: LedBrightness::Med,
|
||||
current_mode: AuraModeNum::Static,
|
||||
builtins: BTreeMap::new(),
|
||||
|
||||
@@ -7,7 +7,7 @@ use log::{debug, info, warn};
|
||||
use rog_aura::aura_detection::LedSupportData;
|
||||
use rog_aura::keyboard::{LedUsbPackets, UsbPackets};
|
||||
use rog_aura::usb::{LED_APPLY, LED_SET};
|
||||
use rog_aura::{AuraDeviceType, AuraEffect, LedBrightness, LED_MSG_LEN};
|
||||
use rog_aura::{AuraDeviceType, AuraEffect, LedBrightness, PowerZones, LED_MSG_LEN};
|
||||
use rog_platform::hid_raw::HidRaw;
|
||||
use rog_platform::keyboard_led::KeyboardBacklight;
|
||||
use udev::Device;
|
||||
@@ -317,6 +317,23 @@ impl CtrlKbdLed {
|
||||
config_loaded
|
||||
}
|
||||
|
||||
pub(super) fn fix_ally_power(&mut self) -> Result<(), RogError> {
|
||||
if self.led_type == AuraDeviceType::Ally {
|
||||
if let LEDNode::Rog(_, hid_raw) = &self.led_node {
|
||||
if let Some(fix) = self.config.ally_fix.as_mut() {
|
||||
if !*fix {
|
||||
let msg = [0x5d, 0xbd, 0x01, 0xff, 0xff, 0xff, 0xff];
|
||||
hid_raw.write_bytes(&msg)?;
|
||||
info!("Reset Ally power settings to base");
|
||||
}
|
||||
*fix = true;
|
||||
}
|
||||
self.config.write();
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Set combination state for boot animation/sleep animation/all leds/keys
|
||||
/// leds/side leds LED active
|
||||
pub(super) fn set_power_states(&mut self) -> Result<(), RogError> {
|
||||
@@ -325,13 +342,17 @@ impl CtrlKbdLed {
|
||||
let buf = self.config.enabled.to_bytes(self.led_type);
|
||||
platform.set_kbd_rgb_state(&buf)?;
|
||||
} else if let LEDNode::Rog(_, hid_raw) = &self.led_node {
|
||||
let bytes = self.config.enabled.to_bytes(self.led_type);
|
||||
let message = [0x5d, 0xbd, 0x01, bytes[0], bytes[1], bytes[2], bytes[3]];
|
||||
if let Some(p) = self.config.enabled.states.first() {
|
||||
if p.zone == PowerZones::Ally {
|
||||
let msg = [0x5d, 0xd1, 0x09, 0x01, p.new_to_byte() as u8, 0x0, 0x0];
|
||||
hid_raw.write_bytes(&msg)?;
|
||||
return Ok(());
|
||||
}
|
||||
}
|
||||
|
||||
hid_raw.write_bytes(&message)?;
|
||||
hid_raw.write_bytes(&LED_SET)?;
|
||||
// Changes won't persist unless apply is set
|
||||
hid_raw.write_bytes(&LED_APPLY)?;
|
||||
let bytes = self.config.enabled.to_bytes(self.led_type);
|
||||
let msg = [0x5d, 0xbd, 0x01, bytes[0], bytes[1], bytes[2], bytes[3]];
|
||||
hid_raw.write_bytes(&msg)?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -296,6 +296,7 @@ impl CtrlTask for CtrlAuraZbus {
|
||||
impl crate::Reloadable for CtrlAuraZbus {
|
||||
async fn reload(&mut self) -> Result<(), RogError> {
|
||||
let mut ctrl = self.0.lock().await;
|
||||
ctrl.fix_ally_power()?;
|
||||
debug!("reloading keyboard mode");
|
||||
ctrl.write_current_config_mode()?;
|
||||
debug!("reloading power states");
|
||||
|
||||
@@ -8,7 +8,7 @@ use rog_platform::platform::{RogPlatform, ThrottlePolicy};
|
||||
use rog_profiles::error::ProfileError;
|
||||
use rog_profiles::fan_curve_set::CurveData;
|
||||
use rog_profiles::{find_fan_curve_node, FanCurvePU, FanCurveProfiles};
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use tokio::sync::Mutex;
|
||||
use zbus::{interface, Connection, SignalContext};
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ use std::sync::Arc;
|
||||
use config_traits::StdConfig;
|
||||
use log::{debug, error, info, warn};
|
||||
use rog_platform::cpu::{CPUControl, CPUGovernor, CPUEPP};
|
||||
// use rog_platform::firmware_attributes::FirmwareAttributes;
|
||||
use rog_platform::platform::{GpuMode, Properties, RogPlatform, ThrottlePolicy};
|
||||
use rog_platform::power::AsusPower;
|
||||
use zbus::export::futures_util::lock::Mutex;
|
||||
@@ -94,6 +95,7 @@ impl CtrlPlatform {
|
||||
config_path: &Path,
|
||||
signal_context: SignalContext<'static>,
|
||||
) -> Result<Self, RogError> {
|
||||
// let attrs = FirmwareAttributes::new();
|
||||
let platform = RogPlatform::new()?;
|
||||
let power = AsusPower::new()?;
|
||||
|
||||
@@ -132,13 +134,12 @@ impl CtrlPlatform {
|
||||
| inotify::WatchMask::ATTRIB
|
||||
| inotify::WatchMask::CREATE,
|
||||
)
|
||||
.map_err(|e| {
|
||||
.inspect_err(|e| {
|
||||
if e.kind() == std::io::ErrorKind::NotFound {
|
||||
error!("Not found: {:?}", config_path);
|
||||
} else {
|
||||
error!("Could not set asusd config inotify: {:?}", config_path);
|
||||
}
|
||||
e
|
||||
})
|
||||
.ok();
|
||||
let mut events = inotify.into_event_stream(&mut buffer).unwrap();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use config_traits::{StdConfig, StdConfigLoad};
|
||||
use rog_slash::{DeviceState, SlashMode};
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
const CONFIG_FILE: &str = "slash.ron";
|
||||
|
||||
|
||||
@@ -270,6 +270,8 @@ mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
let _ = Test {};
|
||||
|
||||
impl crate::StdConfigLoad1<Old1> for Test {}
|
||||
}
|
||||
|
||||
@@ -319,6 +321,8 @@ mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
let _ = Test {};
|
||||
|
||||
impl crate::StdConfigLoad3<Old1, Old2, Old3> for Test {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ gif.workspace = true
|
||||
log.workspace = true
|
||||
|
||||
serde.workspace = true
|
||||
serde_derive.workspace = true
|
||||
|
||||
glam.workspace = true
|
||||
typeshare.workspace = true
|
||||
|
||||
@@ -4,7 +4,7 @@ use std::thread::sleep;
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
use log::info;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
#[cfg(feature = "dbus")]
|
||||
use zbus::zvariant::{OwnedValue, Type, Value};
|
||||
|
||||
@@ -5,7 +5,7 @@ use std::time::Duration;
|
||||
|
||||
use glam::Vec2;
|
||||
use log::error;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::error::{AnimeError, Result};
|
||||
use crate::{AnimeDataBuffer, AnimeDiagonal, AnimeImage, AnimeType, Pixel};
|
||||
|
||||
@@ -3,7 +3,7 @@ use std::path::PathBuf;
|
||||
use std::time::Duration;
|
||||
|
||||
use glam::Vec2;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::error::Result;
|
||||
use crate::{AnimTime, AnimeDataBuffer, AnimeDiagonal, AnimeGif, AnimeImage, AnimeType};
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
use std::str::FromStr;
|
||||
|
||||
use dmi_id::DMIID;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
#[cfg(feature = "dbus")]
|
||||
use zbus::zvariant::{OwnedValue, Type, Value};
|
||||
@@ -253,7 +253,7 @@ pub fn get_maybe_anime_type() -> Result<AnimeType, AnimeError> {
|
||||
|
||||
if board_name.contains("GA401I") || board_name.contains("GA401Q") {
|
||||
return Ok(AnimeType::GA401);
|
||||
} else if board_name.contains("GA402R") {
|
||||
} else if board_name.contains("GA402R") || board_name.contains("GA402X") {
|
||||
return Ok(AnimeType::GA402);
|
||||
} else if board_name.contains("GU604V") {
|
||||
return Ok(AnimeType::GU604);
|
||||
|
||||
@@ -18,7 +18,6 @@ dbus = ["zbus"]
|
||||
|
||||
[dependencies]
|
||||
serde.workspace = true
|
||||
serde_derive.workspace = true
|
||||
zbus = { workspace = true, optional = true }
|
||||
dmi_id = { path = "../dmi-id" }
|
||||
|
||||
|
||||
+158
-185
@@ -3,7 +3,7 @@
|
||||
device_name: "FA506I",
|
||||
product_id: "",
|
||||
layout_name: "fa506i",
|
||||
basic_modes: [Static, Breathe, Strobe, Pulse],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
@@ -12,7 +12,7 @@
|
||||
device_name: "FA506Q",
|
||||
product_id: "",
|
||||
layout_name: "fa506i",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
@@ -21,7 +21,7 @@
|
||||
device_name: "FA507",
|
||||
product_id: "",
|
||||
layout_name: "fa507",
|
||||
basic_modes: [Static, Breathe, Strobe, Pulse],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
@@ -30,7 +30,7 @@
|
||||
device_name: "FX505",
|
||||
product_id: "",
|
||||
layout_name: "fx505d",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Pulse],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
@@ -39,7 +39,7 @@
|
||||
device_name: "FX506",
|
||||
product_id: "",
|
||||
layout_name: "fa506i",
|
||||
basic_modes: [Static, Breathe, Strobe, Pulse],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
@@ -48,7 +48,7 @@
|
||||
device_name: "FX507Z",
|
||||
product_id: "",
|
||||
layout_name: "fa506i",
|
||||
basic_modes: [Static, Breathe, Strobe, Pulse],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
@@ -57,7 +57,16 @@
|
||||
device_name: "FX516P",
|
||||
product_id: "",
|
||||
layout_name: "fa506i",
|
||||
basic_modes: [Static, Breathe, Strobe],
|
||||
basic_modes: [Static, Breathe, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
device_name: "FX517Z",
|
||||
product_id: "",
|
||||
layout_name: "fa506i",
|
||||
basic_modes: [Static, Breathe, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
@@ -66,7 +75,7 @@
|
||||
device_name: "FX705D",
|
||||
product_id: "",
|
||||
layout_name: "fx505d",
|
||||
basic_modes: [Static, Breathe, Strobe, Pulse],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
@@ -75,25 +84,16 @@
|
||||
device_name: "G512L",
|
||||
product_id: "",
|
||||
layout_name: "g512",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Pulse],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [Key1, Key2, Key3, Key4],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard, Lightbar],
|
||||
),
|
||||
(
|
||||
device_name: "G512LI",
|
||||
product_id: "",
|
||||
layout_name: "g512",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard, Lightbar],
|
||||
),
|
||||
(
|
||||
device_name: "G513I",
|
||||
product_id: "",
|
||||
layout_name: "g513i",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Pulse],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [Key1, Key2, Key3, Key4],
|
||||
advanced_type: Zoned([ZonedKbLeft, ZonedKbLeftMid, ZonedKbRightMid, ZonedKbRight, LightbarRight, LightbarRightCorner, LightbarRightBottom, LightbarLeftBottom, LightbarLeftCorner, LightbarLeft]),
|
||||
power_zones: [Keyboard, Lightbar],
|
||||
@@ -102,7 +102,7 @@
|
||||
device_name: "G513Q",
|
||||
product_id: "",
|
||||
layout_name: "g513i",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Pulse],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [Key1, Key2, Key3, Key4],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard, Lightbar],
|
||||
@@ -111,7 +111,16 @@
|
||||
device_name: "G513QR",
|
||||
product_id: "",
|
||||
layout_name: "g513i-per-key",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_zones: [],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard, Lightbar],
|
||||
),
|
||||
(
|
||||
device_name: "G513R",
|
||||
product_id: "",
|
||||
layout_name: "g513i-per-key",
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_zones: [],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard, Lightbar],
|
||||
@@ -120,70 +129,16 @@
|
||||
device_name: "G513RC",
|
||||
product_id: "",
|
||||
layout_name: "g513i",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Pulse],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: Zoned([ZonedKbLeft, ZonedKbLeftMid, ZonedKbRightMid, ZonedKbRight, LightbarRight, LightbarRightCorner, LightbarRightBottom, LightbarLeftBottom, LightbarLeftCorner, LightbarLeft]),
|
||||
power_zones: [Keyboard, Lightbar],
|
||||
),
|
||||
(
|
||||
device_name: "G513RS",
|
||||
product_id: "",
|
||||
layout_name: "g513i-per-key",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_zones: [],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard, Lightbar],
|
||||
),
|
||||
(
|
||||
device_name: "G513RW",
|
||||
product_id: "",
|
||||
layout_name: "g513i-per-key",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_zones: [],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard, Lightbar],
|
||||
),
|
||||
(
|
||||
device_name: "G531",
|
||||
product_id: "",
|
||||
layout_name: "g513i-per-key",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_zones: [],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
device_name: "G531GD",
|
||||
device_name: "G531G",
|
||||
product_id: "",
|
||||
layout_name: "gx502",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
device_name: "G531GT",
|
||||
product_id: "",
|
||||
layout_name: "gx502",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
device_name: "G531GU",
|
||||
product_id: "",
|
||||
layout_name: "gx502",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow],
|
||||
basic_zones: [Key1, Key2, Key3, Key4],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
device_name: "G531GV",
|
||||
product_id: "",
|
||||
layout_name: "gx502",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [Key1, Key2, Key3, Key4],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
@@ -192,7 +147,7 @@
|
||||
device_name: "G531GW",
|
||||
product_id: "",
|
||||
layout_name: "gx502",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_zones: [Key1, Key2, Key3, Key4],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
@@ -201,7 +156,7 @@
|
||||
device_name: "G532",
|
||||
product_id: "",
|
||||
layout_name: "gx502",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_zones: [],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard],
|
||||
@@ -210,16 +165,16 @@
|
||||
device_name: "G533Q",
|
||||
product_id: "1866",
|
||||
layout_name: "g533q-per-key",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_zones: [],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard],
|
||||
power_zones: [Keyboard, Lightbar],
|
||||
),
|
||||
(
|
||||
device_name: "G533Z",
|
||||
product_id: "",
|
||||
layout_name: "g533q-per-key",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_zones: [],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard],
|
||||
@@ -228,16 +183,34 @@
|
||||
device_name: "G614J",
|
||||
product_id: "",
|
||||
layout_name: "g634j-per-key",
|
||||
basic_modes: [Static, Breathe, Pulse, Strobe, Rainbow],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard, Lightbar],
|
||||
),
|
||||
(
|
||||
device_name: "G614JJ",
|
||||
product_id: "",
|
||||
layout_name: "g634j-per-key",
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [Key1, Key2, Key3, Key4],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard, Lightbar],
|
||||
),
|
||||
(
|
||||
device_name: "G614JZ",
|
||||
product_id: "",
|
||||
layout_name: "g634j-per-key",
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [Key1, Key2, Key3, Key4],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard, Lightbar],
|
||||
),
|
||||
(
|
||||
device_name: "G634J",
|
||||
product_id: "",
|
||||
layout_name: "g634j-per-key",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_zones: [],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard, Lightbar, Logo, RearGlow],
|
||||
@@ -246,7 +219,7 @@
|
||||
device_name: "G712LI",
|
||||
product_id: "",
|
||||
layout_name: "gl503",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Pulse],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
@@ -255,7 +228,7 @@
|
||||
device_name: "G712LV",
|
||||
product_id: "",
|
||||
layout_name: "ga401q",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Pulse],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [Key1, Key2, Key3, Key4],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
@@ -264,7 +237,7 @@
|
||||
device_name: "G712LW",
|
||||
product_id: "",
|
||||
layout_name: "ga401q",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Pulse],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [Key1, Key2, Key3, Key4],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
@@ -273,43 +246,61 @@
|
||||
device_name: "G713IC",
|
||||
product_id: "",
|
||||
layout_name: "gx502",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_zones: [],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [Key1, Key2, Key3, Key4],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard, Lightbar],
|
||||
),
|
||||
(
|
||||
device_name: "G713P",
|
||||
product_id: "",
|
||||
layout_name: "ga401q",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Pulse],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [Key1, Key2, Key3, Key4],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
power_zones: [Keyboard, Lightbar],
|
||||
),
|
||||
(
|
||||
device_name: "G713QC",
|
||||
product_id: "",
|
||||
layout_name: "gx502",
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [Key1, Key2, Key3, Key4],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard, Lightbar],
|
||||
),
|
||||
(
|
||||
device_name: "G713QE",
|
||||
product_id: "",
|
||||
layout_name: "gx502",
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [Key1, Key2, Key3, Key4],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard, Lightbar],
|
||||
),
|
||||
(
|
||||
device_name: "G713QM",
|
||||
product_id: "",
|
||||
layout_name: "ga401q",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Pulse],
|
||||
basic_zones: [Key1, Key2, Key3, Key4],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
layout_name: "gx502",
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_zones: [],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard, Lightbar],
|
||||
),
|
||||
(
|
||||
device_name: "G713QR",
|
||||
product_id: "",
|
||||
layout_name: "gx502",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_zones: [],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard],
|
||||
power_zones: [Keyboard, Lightbar],
|
||||
),
|
||||
(
|
||||
device_name: "G713RC",
|
||||
product_id: "",
|
||||
layout_name: "gx502",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Pulse],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: Zoned([ZonedKbLeft, ZonedKbLeftMid, ZonedKbRightMid, ZonedKbRight, LightbarRight, LightbarRightCorner, LightbarRightBottom, LightbarLeftBottom, LightbarLeftCorner, LightbarLeft]),
|
||||
power_zones: [Keyboard, Lightbar],
|
||||
@@ -318,7 +309,7 @@
|
||||
device_name: "G713RM",
|
||||
product_id: "",
|
||||
layout_name: "ga401q",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Pulse],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [Key1, Key2, Key3, Key4],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
@@ -327,7 +318,7 @@
|
||||
device_name: "G713RS",
|
||||
product_id: "",
|
||||
layout_name: "gx502",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_zones: [],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard],
|
||||
@@ -336,7 +327,7 @@
|
||||
device_name: "G713RW",
|
||||
product_id: "",
|
||||
layout_name: "ga401q",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Pulse],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [Key1, Key2, Key3, Key4, BarLeft, BarRight],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard, Lightbar],
|
||||
@@ -345,25 +336,16 @@
|
||||
device_name: "G731",
|
||||
product_id: "",
|
||||
layout_name: "g533q",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_zones: [Key1, Key2, Key3, Key4],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
device_name: "G731GT",
|
||||
device_name: "G731G",
|
||||
product_id: "",
|
||||
layout_name: "g533q",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
device_name: "G731GU",
|
||||
product_id: "",
|
||||
layout_name: "g533q",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
@@ -372,7 +354,7 @@
|
||||
device_name: "G731GV",
|
||||
product_id: "",
|
||||
layout_name: "g533q",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [Key1, Key2, Key3, Key4],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
@@ -381,7 +363,7 @@
|
||||
device_name: "G731GW",
|
||||
product_id: "",
|
||||
layout_name: "g533q",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [Key1, Key2, Key3, Key4],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
@@ -390,16 +372,16 @@
|
||||
device_name: "G733C",
|
||||
product_id: "",
|
||||
layout_name: "g513i-per-key",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_zones: [],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard, Lightbar, Logo, Lid],
|
||||
),
|
||||
(
|
||||
device_name: "G733PZ",
|
||||
device_name: "G733P",
|
||||
product_id: "",
|
||||
layout_name: "g733pz-per-key",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_zones: [],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard, Lightbar],
|
||||
@@ -408,7 +390,7 @@
|
||||
device_name: "G733Q",
|
||||
product_id: "",
|
||||
layout_name: "gx502",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_zones: [],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard],
|
||||
@@ -417,7 +399,7 @@
|
||||
device_name: "G733Z",
|
||||
product_id: "",
|
||||
layout_name: "g513i-per-key",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_zones: [],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard],
|
||||
@@ -426,7 +408,7 @@
|
||||
device_name: "G814J",
|
||||
product_id: "",
|
||||
layout_name: "g814ji-per-key",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_zones: [],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard, Lightbar],
|
||||
@@ -435,7 +417,7 @@
|
||||
device_name: "G834J",
|
||||
product_id: "",
|
||||
layout_name: "g814ji-per-key",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_zones: [],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard, Lightbar, Logo, RearGlow],
|
||||
@@ -462,7 +444,16 @@
|
||||
device_name: "GA402N",
|
||||
product_id: "",
|
||||
layout_name: "ga401q",
|
||||
basic_modes: [Static, Breathe, Pulse, Rainbow, Strobe],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
device_name: "GA402NU-0002",
|
||||
product_id: "",
|
||||
layout_name: "ga401q",
|
||||
basic_modes: [Static, Breathe, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
@@ -471,7 +462,7 @@
|
||||
device_name: "GA402R",
|
||||
product_id: "",
|
||||
layout_name: "ga401q",
|
||||
basic_modes: [Static, Breathe, Pulse, Rainbow],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
@@ -480,16 +471,16 @@
|
||||
device_name: "GA402X",
|
||||
product_id: "",
|
||||
layout_name: "ga401q",
|
||||
basic_modes: [Static, Breathe, Pulse, Rainbow],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
device_name: "GA402XV",
|
||||
device_name: "GA402XV-NC012",
|
||||
product_id: "",
|
||||
layout_name: "ga401q",
|
||||
basic_modes: [Static, Breathe, Strobe, Comet],
|
||||
basic_modes: [Static, Breathe, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
@@ -507,7 +498,7 @@
|
||||
device_name: "GA503Q",
|
||||
product_id: "",
|
||||
layout_name: "ga401q",
|
||||
basic_modes: [Static, Breathe, Pulse, Rainbow, Strobe],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
@@ -525,7 +516,7 @@
|
||||
device_name: "GA503R",
|
||||
product_id: "",
|
||||
layout_name: "ga401q",
|
||||
basic_modes: [Static, Breathe, Pulse, Rainbow, Strobe],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
@@ -534,7 +525,7 @@
|
||||
device_name: "GL503",
|
||||
product_id: "",
|
||||
layout_name: "gl503",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Pulse],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [Key1, Key2, Key3, Key4],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
@@ -543,7 +534,7 @@
|
||||
device_name: "GL503V",
|
||||
product_id: "",
|
||||
layout_name: "gl503",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Pulse],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [Key1, Key2, Key3, Key4],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
@@ -552,7 +543,7 @@
|
||||
device_name: "GL504G",
|
||||
product_id: "",
|
||||
layout_name: "gl503",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Pulse],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [Key1, Key2, Key3, Key4, Logo, BarLeft, BarRight],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
@@ -561,7 +552,7 @@
|
||||
device_name: "GL531",
|
||||
product_id: "",
|
||||
layout_name: "g512",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_zones: [],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard],
|
||||
@@ -570,7 +561,7 @@
|
||||
device_name: "GL553V",
|
||||
product_id: "",
|
||||
layout_name: "g533q",
|
||||
basic_modes: [Static, Breathe, Strobe],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [Key1, Key2, Key3, Key4],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
@@ -579,7 +570,7 @@
|
||||
device_name: "GL703G",
|
||||
product_id: "",
|
||||
layout_name: "gl503",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
@@ -588,43 +579,25 @@
|
||||
device_name: "GM501G",
|
||||
product_id: "",
|
||||
layout_name: "fa507",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Pulse],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [Key1, Key2, Key3, Key4],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
device_name: "GU502",
|
||||
product_id: "",
|
||||
layout_name: "gx502",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_zones: [],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
device_name: "GU502L",
|
||||
product_id: "",
|
||||
layout_name: "gx502",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_zones: [],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
device_name: "GU502LU",
|
||||
product_id: "",
|
||||
layout_name: "gx502",
|
||||
basic_modes: [Static, Breathe, Strobe, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
device_name: "GU603H",
|
||||
product_id: "",
|
||||
layout_name: "ga401q",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Pulse],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: Zoned([SingleZone]),
|
||||
power_zones: [Keyboard],
|
||||
@@ -633,7 +606,7 @@
|
||||
device_name: "GU603V",
|
||||
product_id: "",
|
||||
layout_name: "ga401q",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Pulse],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: Zoned([SingleZone]),
|
||||
power_zones: [Keyboard],
|
||||
@@ -642,7 +615,7 @@
|
||||
device_name: "GU603Z",
|
||||
product_id: "",
|
||||
layout_name: "ga401q",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Pulse],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: Zoned([SingleZone]),
|
||||
power_zones: [Keyboard],
|
||||
@@ -651,7 +624,7 @@
|
||||
device_name: "GU604V",
|
||||
product_id: "",
|
||||
layout_name: "ga401q",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Pulse],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: Zoned([SingleZone]),
|
||||
power_zones: [Keyboard],
|
||||
@@ -660,7 +633,7 @@
|
||||
device_name: "GU605M",
|
||||
product_id: "",
|
||||
layout_name: "ga401q",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Pulse],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: Zoned([SingleZone]),
|
||||
power_zones: [Keyboard],
|
||||
@@ -696,7 +669,7 @@
|
||||
device_name: "GV601R",
|
||||
product_id: "",
|
||||
layout_name: "ga401q",
|
||||
basic_modes: [Static, Breathe, Strobe, Pulse],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
@@ -714,7 +687,7 @@
|
||||
device_name: "GV604V",
|
||||
product_id: "",
|
||||
layout_name: "ga401q",
|
||||
basic_modes: [Static, Breathe, Strobe, Pulse],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
@@ -723,7 +696,7 @@
|
||||
device_name: "GX502",
|
||||
product_id: "",
|
||||
layout_name: "gx502",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_zones: [],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard],
|
||||
@@ -732,7 +705,7 @@
|
||||
device_name: "GX531",
|
||||
product_id: "",
|
||||
layout_name: "gx531-per-key",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Pulse],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [Key1, Key2, Key3, Key4],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
@@ -741,7 +714,7 @@
|
||||
device_name: "GX550L",
|
||||
product_id: "",
|
||||
layout_name: "gx531-per-key",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_zones: [],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard],
|
||||
@@ -750,7 +723,7 @@
|
||||
device_name: "GX551Q",
|
||||
product_id: "",
|
||||
layout_name: "gx531-per-key",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Pulse],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard],
|
||||
@@ -759,7 +732,7 @@
|
||||
device_name: "GX650P",
|
||||
product_id: "",
|
||||
layout_name: "gx531-per-key",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_zones: [],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard],
|
||||
@@ -768,7 +741,7 @@
|
||||
device_name: "GX650R",
|
||||
product_id: "",
|
||||
layout_name: "gx531-per-key",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_zones: [],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard],
|
||||
@@ -777,7 +750,7 @@
|
||||
device_name: "GX701",
|
||||
product_id: "",
|
||||
layout_name: "gx531-per-key",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_zones: [],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard],
|
||||
@@ -786,7 +759,7 @@
|
||||
device_name: "GX703H",
|
||||
product_id: "",
|
||||
layout_name: "gx531-per-key",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
@@ -809,15 +782,6 @@
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
device_name: "GZ301Z",
|
||||
product_id: "",
|
||||
layout_name: "ga401q",
|
||||
basic_modes: [Static, Breathe, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
device_name: "GZ301Z",
|
||||
product_id: "18c6",
|
||||
@@ -840,9 +804,18 @@
|
||||
device_name: "RC71L",
|
||||
product_id: "",
|
||||
layout_name: "ga401q",
|
||||
basic_modes: [Static, Breathe, Pulse],
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
power_zones: [Ally],
|
||||
),
|
||||
(
|
||||
device_name: "RC72L",
|
||||
product_id: "",
|
||||
layout_name: "ga401q",
|
||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Ally],
|
||||
),
|
||||
])
|
||||
|
||||
@@ -2,7 +2,7 @@ use std::env;
|
||||
|
||||
use dmi_id::DMIID;
|
||||
use log::{error, info, warn};
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::keyboard::AdvancedAuraType;
|
||||
use crate::{AuraModeNum, AuraZone, PowerZones};
|
||||
@@ -171,6 +171,7 @@ impl LedSupportFile {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use std::collections::HashMap;
|
||||
use std::fs::OpenOptions;
|
||||
use std::io::Write;
|
||||
use std::path::PathBuf;
|
||||
@@ -212,6 +213,11 @@ mod tests {
|
||||
let mut tmp_sort = tmp.clone();
|
||||
tmp_sort.0.sort_by(|a, b| a.product_id.cmp(&b.product_id));
|
||||
tmp_sort.0.sort_by(|a, b| a.device_name.cmp(&b.device_name));
|
||||
for model in tmp_sort.0.iter_mut() {
|
||||
model
|
||||
.basic_modes
|
||||
.sort_by(|a, b| (*a as u8).cmp(&(*b as u8)));
|
||||
}
|
||||
if tmp != tmp_sort {
|
||||
let sorted =
|
||||
ron::ser::to_string_pretty(&tmp_sort, PrettyConfig::new().depth_limit(2)).unwrap();
|
||||
@@ -234,4 +240,31 @@ mod tests {
|
||||
ron::ser::to_string_pretty(&tmp, my_config).unwrap()
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn find_data_file_groups() {
|
||||
let mut data = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
||||
data.push("data/aura_support.ron");
|
||||
|
||||
let buf = std::fs::read_to_string(&data).unwrap();
|
||||
|
||||
let tmp = ron::from_str::<LedSupportFile>(&buf).unwrap();
|
||||
|
||||
let mut modes: HashMap<Vec<AuraModeNum>, Vec<String>> = HashMap::new();
|
||||
|
||||
for entry in tmp.0 {
|
||||
if let Some(modes) = modes.get_mut(&entry.basic_modes) {
|
||||
modes.push(entry.device_name);
|
||||
} else {
|
||||
modes.insert(entry.basic_modes, vec![entry.device_name]);
|
||||
}
|
||||
}
|
||||
dbg!(modes);
|
||||
|
||||
// let my_config = PrettyConfig::new().depth_limit(2);
|
||||
// println!(
|
||||
// "RON: {}",
|
||||
// ron::ser::to_string_pretty(&tmp, my_config).unwrap()
|
||||
// );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use std::fmt::Display;
|
||||
use std::str::FromStr;
|
||||
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
#[cfg(feature = "dbus")]
|
||||
use zbus::zvariant::{OwnedValue, Type, Value};
|
||||
@@ -261,8 +261,8 @@ pub enum AuraModeNum {
|
||||
#[default]
|
||||
Static = 0,
|
||||
Breathe = 1,
|
||||
Strobe = 2,
|
||||
Rainbow = 3,
|
||||
RainbowCycle = 2,
|
||||
RainbowWave = 3,
|
||||
Star = 4,
|
||||
Rain = 5,
|
||||
Highlight = 6,
|
||||
@@ -290,8 +290,8 @@ impl From<&AuraModeNum> for &str {
|
||||
match mode {
|
||||
AuraModeNum::Static => "Static",
|
||||
AuraModeNum::Breathe => "Breathe",
|
||||
AuraModeNum::Strobe => "Strobe",
|
||||
AuraModeNum::Rainbow => "Rainbow",
|
||||
AuraModeNum::RainbowCycle => "RainbowCycle",
|
||||
AuraModeNum::RainbowWave => "RainbowWave",
|
||||
AuraModeNum::Star => "Stars",
|
||||
AuraModeNum::Rain => "Rain",
|
||||
AuraModeNum::Highlight => "Highlight",
|
||||
@@ -307,8 +307,8 @@ impl From<&str> for AuraModeNum {
|
||||
fn from(mode: &str) -> Self {
|
||||
match mode {
|
||||
"Breathe" => AuraModeNum::Breathe,
|
||||
"Strobe" => AuraModeNum::Strobe,
|
||||
"Rainbow" => AuraModeNum::Rainbow,
|
||||
"RainbowCycle" => AuraModeNum::RainbowCycle,
|
||||
"RainbowWave" => AuraModeNum::RainbowWave,
|
||||
"Stars" => AuraModeNum::Star,
|
||||
"Rain" => AuraModeNum::Rain,
|
||||
"Highlight" => AuraModeNum::Highlight,
|
||||
@@ -326,8 +326,8 @@ impl From<u8> for AuraModeNum {
|
||||
fn from(mode: u8) -> Self {
|
||||
match mode {
|
||||
1 => AuraModeNum::Breathe,
|
||||
2 => AuraModeNum::Strobe,
|
||||
3 => AuraModeNum::Rainbow,
|
||||
2 => AuraModeNum::RainbowCycle,
|
||||
3 => AuraModeNum::RainbowWave,
|
||||
4 => AuraModeNum::Star,
|
||||
5 => AuraModeNum::Rain,
|
||||
6 => AuraModeNum::Highlight,
|
||||
@@ -532,10 +532,10 @@ impl AuraEffect {
|
||||
| AuraModeNum::Comet
|
||||
| AuraModeNum::Flash => AuraParameters::new(true, true, false, false, false),
|
||||
AuraModeNum::Breathe => AuraParameters::new(true, true, true, true, false),
|
||||
AuraModeNum::Strobe | AuraModeNum::Rain => {
|
||||
AuraModeNum::RainbowCycle | AuraModeNum::Rain => {
|
||||
AuraParameters::new(true, false, false, true, false)
|
||||
}
|
||||
AuraModeNum::Rainbow => AuraParameters::new(true, false, false, true, true),
|
||||
AuraModeNum::RainbowWave => AuraParameters::new(true, false, false, true, true),
|
||||
AuraModeNum::Star => AuraParameters::new(true, true, true, true, true),
|
||||
AuraModeNum::Laser | AuraModeNum::Ripple => {
|
||||
AuraParameters::new(true, true, false, true, false)
|
||||
@@ -710,7 +710,7 @@ mod tests {
|
||||
];
|
||||
assert_eq!(<[u8; LED_MSG_LEN]>::from(&st)[..9], capture[..9]);
|
||||
|
||||
st.mode = AuraModeNum::Rainbow;
|
||||
st.mode = AuraModeNum::RainbowWave;
|
||||
let capture = [
|
||||
0x5d, 0xb3, 0x07, 0x03, 0xff, 0x00, 0xcd, 0xe1, 0x01, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0,
|
||||
|
||||
@@ -2,6 +2,7 @@ use super::{EffectState, InputForEffect};
|
||||
use crate::keyboard::{KeyLayout, LedCode};
|
||||
use crate::Colour;
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub struct InputBased {
|
||||
led: LedCode,
|
||||
colour: Colour,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
mod doom;
|
||||
pub use doom::*;
|
||||
|
||||
@@ -102,7 +102,7 @@ impl AuraPowerState {
|
||||
]
|
||||
}
|
||||
|
||||
fn new_to_byte(&self) -> u32 {
|
||||
pub fn new_to_byte(&self) -> u32 {
|
||||
match self.zone {
|
||||
PowerZones::Logo => {
|
||||
self.boot as u32
|
||||
@@ -110,6 +110,12 @@ impl AuraPowerState {
|
||||
| (self.sleep as u32) << 4
|
||||
| (self.shutdown as u32) << 6
|
||||
}
|
||||
PowerZones::Ally => {
|
||||
(self.boot as u32)
|
||||
| (self.awake as u32) << 1
|
||||
| (self.sleep as u32) << 2
|
||||
| (self.shutdown as u32) << 3
|
||||
}
|
||||
PowerZones::Keyboard => {
|
||||
(self.boot as u32) << 1
|
||||
| (self.awake as u32) << 3
|
||||
@@ -187,7 +193,7 @@ impl LaptopAuraPower {
|
||||
// TODO: use support data to setup correct zones
|
||||
pub fn new(aura_type: AuraDeviceType, support_data: &LedSupportData) -> Self {
|
||||
match aura_type {
|
||||
AuraDeviceType::Unknown | AuraDeviceType::LaptopPost2021 => {
|
||||
AuraDeviceType::Unknown | AuraDeviceType::Ally | AuraDeviceType::LaptopPost2021 => {
|
||||
let mut states = Vec::new();
|
||||
for zone in support_data.power_zones.iter() {
|
||||
states.push(AuraPowerState::default_for(*zone))
|
||||
@@ -217,8 +223,13 @@ impl LaptopAuraPower {
|
||||
}
|
||||
|
||||
pub fn to_bytes(&self, aura_type: AuraDeviceType) -> Vec<u8> {
|
||||
if let Some(stuff) = self.states.first() {
|
||||
if stuff.zone == PowerZones::Ally {
|
||||
return vec![0x5d, 0xd1, 0x09, 0x01, stuff.new_to_byte() as u8];
|
||||
}
|
||||
}
|
||||
match aura_type {
|
||||
AuraDeviceType::LaptopPost2021 => self.new_to_bytes(),
|
||||
AuraDeviceType::LaptopPost2021 | AuraDeviceType::Ally => self.new_to_bytes(),
|
||||
AuraDeviceType::LaptopPre2021 => {
|
||||
if self.states.len() == 1 {
|
||||
self.states
|
||||
|
||||
@@ -74,6 +74,7 @@ pub enum AuraDeviceType {
|
||||
LaptopPre2021 = 1,
|
||||
LaptopTuf = 2,
|
||||
ScsiExtDisk = 3,
|
||||
Ally = 4,
|
||||
Unknown = 255,
|
||||
}
|
||||
|
||||
@@ -90,6 +91,10 @@ impl AuraDeviceType {
|
||||
*self == Self::LaptopPost2021
|
||||
}
|
||||
|
||||
pub fn is_ally(&self) -> bool {
|
||||
*self == Self::Ally
|
||||
}
|
||||
|
||||
pub fn is_scsi(&self) -> bool {
|
||||
*self == Self::ScsiExtDisk
|
||||
}
|
||||
@@ -101,6 +106,7 @@ impl From<&str> for AuraDeviceType {
|
||||
"tuf" => AuraDeviceType::LaptopTuf,
|
||||
"1932" => AuraDeviceType::ScsiExtDisk,
|
||||
"1866" | "18c6" | "1869" | "1854" => Self::LaptopPre2021,
|
||||
"1abe" | "1b4c" => Self::Ally,
|
||||
_ => Self::LaptopPost2021,
|
||||
}
|
||||
}
|
||||
@@ -128,5 +134,7 @@ pub enum PowerZones {
|
||||
RearGlow = 4,
|
||||
/// Exists for the older 0x1866 models
|
||||
KeyboardAndLightbar = 5,
|
||||
/// Ally specific for creating correct packet
|
||||
Ally = 6,
|
||||
None = 255,
|
||||
}
|
||||
|
||||
@@ -16,9 +16,9 @@ x11 = ["slint/backend-winit-x11"]
|
||||
tokio-debug = ["console-subscriber"]
|
||||
|
||||
[dependencies]
|
||||
console-subscriber = { version = "0.2.0", optional = true }
|
||||
console-subscriber = { version = "^0.4", optional = true }
|
||||
|
||||
nix = { version = "^0.28.0", features = ["fs"] }
|
||||
nix = { version = "^0.29.0", features = ["fs"] }
|
||||
tempfile = "3.3.0"
|
||||
betrayer = { version = "0.2.0" }
|
||||
|
||||
@@ -38,7 +38,6 @@ env_logger.workspace = true
|
||||
|
||||
tokio.workspace = true
|
||||
serde.workspace = true
|
||||
serde_derive.workspace = true
|
||||
zbus.workspace = true
|
||||
dirs.workspace = true
|
||||
notify-rust.workspace = true
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use std::fs::create_dir;
|
||||
|
||||
use config_traits::{StdConfig, StdConfigLoad1};
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::notify::EnabledNotifications;
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ use tokio::runtime::Runtime;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<()> {
|
||||
dbg!(notify_rust::get_capabilities().unwrap());
|
||||
#[cfg(feature = "tokio-debug")]
|
||||
console_subscriber::init();
|
||||
|
||||
@@ -75,13 +74,7 @@ async fn main() -> Result<()> {
|
||||
.format_timestamp(None)
|
||||
.init();
|
||||
|
||||
let supported_properties = match proxy.supported_properties() {
|
||||
Ok(s) => s,
|
||||
Err(_e) => {
|
||||
// TODO: show an error window
|
||||
Vec::default()
|
||||
}
|
||||
};
|
||||
let supported_properties = proxy.supported_properties().unwrap_or_default();
|
||||
|
||||
// Startup
|
||||
let mut config = Config::new().load();
|
||||
|
||||
@@ -191,17 +191,14 @@ pub fn start_notifications(
|
||||
let enabled_notifications_copy = config.clone();
|
||||
// GPU Mode change/action notif
|
||||
tokio::spawn(async move {
|
||||
let conn = zbus::Connection::system().await.map_err(|e| {
|
||||
no_supergfx(&e);
|
||||
e
|
||||
let conn = zbus::Connection::system().await.inspect_err(|e| {
|
||||
no_supergfx(e);
|
||||
})?;
|
||||
let proxy = SuperProxy::builder(&conn).build().await.map_err(|e| {
|
||||
no_supergfx(&e);
|
||||
e
|
||||
let proxy = SuperProxy::builder(&conn).build().await.inspect_err(|e| {
|
||||
no_supergfx(e);
|
||||
})?;
|
||||
let _ = proxy.mode().await.map_err(|e| {
|
||||
no_supergfx(&e);
|
||||
e
|
||||
let _ = proxy.mode().await.inspect_err(|e| {
|
||||
no_supergfx(e);
|
||||
})?;
|
||||
|
||||
let proxy_copy = proxy.clone();
|
||||
|
||||
@@ -65,6 +65,7 @@ impl From<PowerZones> for SlintPowerZones {
|
||||
PowerZones::Lid => SlintPowerZones::Lid,
|
||||
PowerZones::RearGlow => SlintPowerZones::RearGlow,
|
||||
PowerZones::KeyboardAndLightbar => SlintPowerZones::KeyboardAndLightbar,
|
||||
PowerZones::Ally => SlintPowerZones::Ally,
|
||||
PowerZones::None => SlintPowerZones::Keyboard,
|
||||
}
|
||||
}
|
||||
@@ -79,6 +80,7 @@ impl From<SlintPowerZones> for PowerZones {
|
||||
SlintPowerZones::Lid => PowerZones::Lid,
|
||||
SlintPowerZones::RearGlow => PowerZones::RearGlow,
|
||||
SlintPowerZones::KeyboardAndLightbar => PowerZones::KeyboardAndLightbar,
|
||||
SlintPowerZones::Ally => PowerZones::Ally,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -151,6 +153,7 @@ impl From<SlintDeviceType> for AuraDeviceType {
|
||||
SlintDeviceType::Tuf => Self::LaptopTuf,
|
||||
SlintDeviceType::ScsiExtDisk => Self::ScsiExtDisk,
|
||||
SlintDeviceType::Unknown => Self::Unknown,
|
||||
SlintDeviceType::Ally => Self::Ally,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -163,6 +166,7 @@ impl From<AuraDeviceType> for SlintDeviceType {
|
||||
AuraDeviceType::LaptopTuf => SlintDeviceType::Tuf,
|
||||
AuraDeviceType::ScsiExtDisk => SlintDeviceType::ScsiExtDisk,
|
||||
AuraDeviceType::Unknown => SlintDeviceType::Unknown,
|
||||
AuraDeviceType::Ally => SlintDeviceType::Ally,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"POT-Creation-Date: 2024-05-24 06:49+0000\n"
|
||||
"POT-Creation-Date: 2024-08-30 09:29+0000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@@ -412,192 +412,197 @@ msgctxt "PageSystem"
|
||||
msgid "Throttle Policy on AC"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:49
|
||||
#: rog-control-center/ui/types/aura_types.slint:51
|
||||
msgctxt "Aura power zone"
|
||||
msgid "Logo"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:50 rog-control-center/ui/types/aura_types.slint:59
|
||||
#: rog-control-center/ui/types/aura_types.slint:52 rog-control-center/ui/types/aura_types.slint:62
|
||||
msgctxt "Aura power zone"
|
||||
msgid "Keyboard"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:51 rog-control-center/ui/types/aura_types.slint:60
|
||||
#: rog-control-center/ui/types/aura_types.slint:53 rog-control-center/ui/types/aura_types.slint:63
|
||||
msgctxt "Aura power zone"
|
||||
msgid "Lightbar"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:52
|
||||
#: rog-control-center/ui/types/aura_types.slint:54
|
||||
msgctxt "Aura power zone"
|
||||
msgid "Lid"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:53
|
||||
#: rog-control-center/ui/types/aura_types.slint:55
|
||||
msgctxt "Aura power zone"
|
||||
msgid "Rear Glow"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:54 rog-control-center/ui/types/aura_types.slint:61
|
||||
#: rog-control-center/ui/types/aura_types.slint:56 rog-control-center/ui/types/aura_types.slint:64
|
||||
msgctxt "Aura power zone"
|
||||
msgid "Keyboard and Lightbar"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:64
|
||||
msgctxt "Aura brightness"
|
||||
msgid "Off"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:65
|
||||
msgctxt "Aura brightness"
|
||||
msgid "Low"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:66
|
||||
msgctxt "Aura brightness"
|
||||
msgid "Med"
|
||||
#: rog-control-center/ui/types/aura_types.slint:57
|
||||
msgctxt "Aura power zone"
|
||||
msgid "Ally"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:67
|
||||
msgctxt "Aura brightness"
|
||||
msgid "Off"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:68
|
||||
msgctxt "Aura brightness"
|
||||
msgid "Low"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:69
|
||||
msgctxt "Aura brightness"
|
||||
msgid "Med"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:70
|
||||
msgctxt "Aura brightness"
|
||||
msgid "High"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:72 rog-control-center/ui/types/aura_types.slint:87
|
||||
#: rog-control-center/ui/types/aura_types.slint:75 rog-control-center/ui/types/aura_types.slint:90
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Static"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:73 rog-control-center/ui/types/aura_types.slint:88
|
||||
#: rog-control-center/ui/types/aura_types.slint:76 rog-control-center/ui/types/aura_types.slint:91
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Breathe"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:74 rog-control-center/ui/types/aura_types.slint:89
|
||||
#: rog-control-center/ui/types/aura_types.slint:77 rog-control-center/ui/types/aura_types.slint:92
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Strobe"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:75
|
||||
#: rog-control-center/ui/types/aura_types.slint:78
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Rainbow"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:76
|
||||
#: rog-control-center/ui/types/aura_types.slint:79
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Star"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:77
|
||||
#: rog-control-center/ui/types/aura_types.slint:80
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Rain"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:78
|
||||
#: rog-control-center/ui/types/aura_types.slint:81
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Highlight"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:79
|
||||
#: rog-control-center/ui/types/aura_types.slint:82
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Laser"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:80
|
||||
#: rog-control-center/ui/types/aura_types.slint:83
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Ripple"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:81
|
||||
#: rog-control-center/ui/types/aura_types.slint:84
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Nothing"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:82
|
||||
#: rog-control-center/ui/types/aura_types.slint:85
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Pulse"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:83
|
||||
#: rog-control-center/ui/types/aura_types.slint:86
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Comet"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:84
|
||||
#: rog-control-center/ui/types/aura_types.slint:87
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Flash"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:96
|
||||
#: rog-control-center/ui/types/aura_types.slint:99
|
||||
msgctxt "Aura zone"
|
||||
msgid "None"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:97
|
||||
#: rog-control-center/ui/types/aura_types.slint:100
|
||||
msgctxt "Aura zone"
|
||||
msgid "Key1"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:98
|
||||
#: rog-control-center/ui/types/aura_types.slint:101
|
||||
msgctxt "Aura zone"
|
||||
msgid "Key2"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:99
|
||||
#: rog-control-center/ui/types/aura_types.slint:102
|
||||
msgctxt "Aura zone"
|
||||
msgid "Key3"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:100
|
||||
#: rog-control-center/ui/types/aura_types.slint:103
|
||||
msgctxt "Aura zone"
|
||||
msgid "Key4"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:101
|
||||
#: rog-control-center/ui/types/aura_types.slint:104
|
||||
msgctxt "Aura zone"
|
||||
msgid "Logo"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:102
|
||||
#: rog-control-center/ui/types/aura_types.slint:105
|
||||
msgctxt "Aura zone"
|
||||
msgid "Lightbar Left"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:103
|
||||
#: rog-control-center/ui/types/aura_types.slint:106
|
||||
msgctxt "Aura zone"
|
||||
msgid "Lightbar Right"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:107
|
||||
#: rog-control-center/ui/types/aura_types.slint:110
|
||||
msgctxt "Aura direction"
|
||||
msgid "Right"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:108
|
||||
#: rog-control-center/ui/types/aura_types.slint:111
|
||||
msgctxt "Aura direction"
|
||||
msgid "Left"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:109
|
||||
#: rog-control-center/ui/types/aura_types.slint:112
|
||||
msgctxt "Aura direction"
|
||||
msgid "Up"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:110
|
||||
#: rog-control-center/ui/types/aura_types.slint:113
|
||||
msgctxt "Aura direction"
|
||||
msgid "Down"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:114
|
||||
#: rog-control-center/ui/types/aura_types.slint:117
|
||||
msgctxt "Aura speed"
|
||||
msgid "Low"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:115
|
||||
#: rog-control-center/ui/types/aura_types.slint:118
|
||||
msgctxt "Aura speed"
|
||||
msgid "Medium"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:116
|
||||
#: rog-control-center/ui/types/aura_types.slint:119
|
||||
msgctxt "Aura speed"
|
||||
msgid "High"
|
||||
msgstr ""
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,700 @@
|
||||
# SPDX-FileCopyrightText: 2024 UM-Li <um-li@tuta.io>
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"POT-Creation-Date: 2024-06-09 00:20+0000\n"
|
||||
"PO-Revision-Date: 2024-06-19 10:37+0200\n"
|
||||
"Last-Translator: UM-Li <um-li@tuta.io>\n"
|
||||
"Language-Team: Chinese <kde-i18n-doc@kde.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: zh_CN\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: Lokalize 24.05.1\n"
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:6
|
||||
msgctxt "Anime Brightness"
|
||||
msgid "Off"
|
||||
msgstr "关"
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:7
|
||||
msgctxt "Anime Brightness"
|
||||
msgid "Low"
|
||||
msgstr "暗"
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:8
|
||||
msgctxt "Anime Brightness"
|
||||
msgid "Med"
|
||||
msgstr "中"
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:9
|
||||
msgctxt "Anime Brightness"
|
||||
msgid "High"
|
||||
msgstr "亮"
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:23
|
||||
msgctxt "AnimePageData"
|
||||
msgid "Glitch Construction"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:23
|
||||
msgctxt "AnimePageData"
|
||||
msgid "Static Emergence"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:25
|
||||
msgctxt "AnimePageData"
|
||||
msgid "Binary Banner Scroll"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:25
|
||||
msgctxt "AnimePageData"
|
||||
msgid "Rog Logo Glitch"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:27
|
||||
msgctxt "AnimePageData"
|
||||
msgid "Banner Swipe"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:27
|
||||
msgctxt "AnimePageData"
|
||||
msgid "Starfield"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:29
|
||||
msgctxt "AnimePageData"
|
||||
msgid "Glitch Out"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:29
|
||||
msgctxt "AnimePageData"
|
||||
msgid "See Ya"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:50
|
||||
msgctxt "Anime Brightness"
|
||||
msgid "Brightness"
|
||||
msgstr "亮度"
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:66
|
||||
msgctxt "PageAnime"
|
||||
msgid "Enable display"
|
||||
msgstr "启用"
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:74 rog-control-center/ui/pages/anime.slint:97
|
||||
msgctxt "PageAnime"
|
||||
msgid "Advanced"
|
||||
msgstr "高级"
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:89
|
||||
msgctxt "PageAnime"
|
||||
msgid "Use built-in animations"
|
||||
msgstr "使用内置动效"
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:146
|
||||
msgctxt "PageAnime"
|
||||
msgid "Set which builtin animations are played"
|
||||
msgstr "选择内置动效"
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:150
|
||||
msgctxt "Anime built-in selection"
|
||||
msgid "Boot Animation"
|
||||
msgstr "开机"
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:160
|
||||
msgctxt "Anime built-in selection"
|
||||
msgid "Running Animation"
|
||||
msgstr "运行"
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:170
|
||||
msgctxt "Anime built-in selection"
|
||||
msgid "Sleep Animation"
|
||||
msgstr "睡眠"
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:180
|
||||
msgctxt "Anime built-in selection"
|
||||
msgid "Shutdown Animation"
|
||||
msgstr "关机"
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:220
|
||||
msgctxt "PageAnime"
|
||||
msgid "Advanced Display Settings"
|
||||
msgstr "高级显示设置"
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:225
|
||||
msgctxt "PageAnime"
|
||||
msgid "Off when lid closed"
|
||||
msgstr "合上盖子时关闭"
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:234
|
||||
msgctxt "PageAnime"
|
||||
msgid "Off when suspended"
|
||||
msgstr "睡眠时关闭"
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:243
|
||||
msgctxt "PageAnime"
|
||||
msgid "Off when on battery"
|
||||
msgstr "电池供电时关闭"
|
||||
|
||||
#: rog-control-center/ui/pages/app_settings.slint:26
|
||||
msgctxt "PageAppSettings"
|
||||
msgid "Run in background after closing"
|
||||
msgstr "保持在后台运行"
|
||||
|
||||
#: rog-control-center/ui/pages/app_settings.slint:34
|
||||
msgctxt "PageAppSettings"
|
||||
msgid "Start app in background (UI closed)"
|
||||
msgstr "启动至后台"
|
||||
|
||||
#: rog-control-center/ui/pages/app_settings.slint:42
|
||||
msgctxt "PageAppSettings"
|
||||
msgid "Enable system tray icon"
|
||||
msgstr "启用托盘图标"
|
||||
|
||||
#: rog-control-center/ui/pages/app_settings.slint:50
|
||||
msgctxt "PageAppSettings"
|
||||
msgid "Enable dGPU notifications"
|
||||
msgstr "启用独显通知"
|
||||
|
||||
#: rog-control-center/ui/pages/aura.slint:28
|
||||
msgctxt "PageAura"
|
||||
msgid "Brightness"
|
||||
msgstr "亮度"
|
||||
|
||||
#: rog-control-center/ui/pages/aura.slint:39
|
||||
msgctxt "PageAura"
|
||||
msgid "Aura mode"
|
||||
msgstr "Aura 模式"
|
||||
|
||||
#: rog-control-center/ui/pages/aura.slint:59
|
||||
msgctxt "PageAura"
|
||||
msgid "Colour 1"
|
||||
msgstr "颜色 1"
|
||||
|
||||
#: rog-control-center/ui/pages/aura.slint:85
|
||||
msgctxt "PageAura"
|
||||
msgid "Colour 2"
|
||||
msgstr "颜色 2"
|
||||
|
||||
#: rog-control-center/ui/pages/aura.slint:119
|
||||
msgctxt "PageAura"
|
||||
msgid "Zone"
|
||||
msgstr "区域"
|
||||
|
||||
#: rog-control-center/ui/pages/aura.slint:142
|
||||
msgctxt "PageAura"
|
||||
msgid "Direction"
|
||||
msgstr "方向"
|
||||
|
||||
#: rog-control-center/ui/pages/aura.slint:164
|
||||
msgctxt "PageAura"
|
||||
msgid "Speed"
|
||||
msgstr "速度"
|
||||
|
||||
#: rog-control-center/ui/pages/aura.slint:185
|
||||
msgctxt "PageAura"
|
||||
msgid "Power Settings"
|
||||
msgstr "电源设置"
|
||||
|
||||
#: rog-control-center/ui/pages/aura.slint:270
|
||||
msgctxt "PageAura"
|
||||
msgid "Power Zones"
|
||||
msgstr "区域供电"
|
||||
|
||||
#: rog-control-center/ui/pages/fans.slint:26
|
||||
msgctxt "FanTab"
|
||||
msgid "This fan is not avilable on this machine"
|
||||
msgstr "该风扇在本机不可用"
|
||||
|
||||
#: rog-control-center/ui/pages/fans.slint:34
|
||||
msgctxt "FanTab"
|
||||
msgid "Enabled"
|
||||
msgstr "启用"
|
||||
|
||||
#: rog-control-center/ui/pages/fans.slint:43
|
||||
msgctxt "FanTab"
|
||||
msgid "Apply"
|
||||
msgstr "应用"
|
||||
|
||||
#: rog-control-center/ui/pages/fans.slint:51
|
||||
msgctxt "FanTab"
|
||||
msgid "Cancel"
|
||||
msgstr "取消"
|
||||
|
||||
#: rog-control-center/ui/pages/fans.slint:59
|
||||
msgctxt "FanTab"
|
||||
msgid "Factory Default (all fans)"
|
||||
msgstr "全部恢复出厂设置"
|
||||
|
||||
#: rog-control-center/ui/pages/fans.slint:72
|
||||
msgctxt "PageFans"
|
||||
msgid "Balanced"
|
||||
msgstr "平衡"
|
||||
|
||||
#: rog-control-center/ui/pages/fans.slint:75 rog-control-center/ui/pages/fans.slint:134 rog-control-center/ui/pages/fans.slint:193
|
||||
msgctxt "PageFans"
|
||||
msgid "CPU"
|
||||
msgstr "CPU"
|
||||
|
||||
#: rog-control-center/ui/pages/fans.slint:93 rog-control-center/ui/pages/fans.slint:152 rog-control-center/ui/pages/fans.slint:211
|
||||
msgctxt "PageFans"
|
||||
msgid "Mid"
|
||||
msgstr "中部"
|
||||
|
||||
#: rog-control-center/ui/pages/fans.slint:111 rog-control-center/ui/pages/fans.slint:170 rog-control-center/ui/pages/fans.slint:229
|
||||
msgctxt "PageFans"
|
||||
msgid "GPU"
|
||||
msgstr "GPU"
|
||||
|
||||
#: rog-control-center/ui/pages/fans.slint:131
|
||||
msgctxt "PageFans"
|
||||
msgid "Performance"
|
||||
msgstr "性能"
|
||||
|
||||
#: rog-control-center/ui/pages/fans.slint:190
|
||||
msgctxt "PageFans"
|
||||
msgid "Quiet"
|
||||
msgstr "省电"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:26
|
||||
msgctxt "SystemPageData"
|
||||
msgid "Balanced"
|
||||
msgstr "平衡"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:26 rog-control-center/ui/pages/system.slint:30
|
||||
msgctxt "SystemPageData"
|
||||
msgid "Performance"
|
||||
msgstr "性能"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:26
|
||||
msgctxt "SystemPageData"
|
||||
msgid "Quiet"
|
||||
msgstr "省电"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:29
|
||||
msgctxt "SystemPageData"
|
||||
msgid "Default"
|
||||
msgstr "默认"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:31
|
||||
msgctxt "SystemPageData"
|
||||
msgid "BalancePerformance"
|
||||
msgstr "平衡(侧重性能)"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:32
|
||||
msgctxt "SystemPageData"
|
||||
msgid "BalancePower"
|
||||
msgstr "平衡(侧重省电)"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:33
|
||||
msgctxt "SystemPageData"
|
||||
msgid "Power"
|
||||
msgstr "省电"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:110
|
||||
msgctxt "PageSystem"
|
||||
msgid "Base system settings"
|
||||
msgstr "基本设置"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:115
|
||||
msgctxt "PageSystem"
|
||||
msgid "Charge limit"
|
||||
msgstr "充电上限"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:127
|
||||
msgctxt "PageSystem"
|
||||
msgid "Throttle Policy"
|
||||
msgstr "电源管理方案"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:137
|
||||
msgctxt "PageSystem"
|
||||
msgid "Advanced"
|
||||
msgstr "高级"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:149
|
||||
msgctxt "PageSystem"
|
||||
msgid "Panel Overdrive"
|
||||
msgstr "屏幕快显"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:157
|
||||
msgctxt "PageSystem"
|
||||
msgid "MiniLED Mode"
|
||||
msgstr "MiniLED 模式"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:165
|
||||
msgctxt "PageSystem"
|
||||
msgid "POST boot sound"
|
||||
msgstr "POST 开机音效"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:183
|
||||
msgctxt "PageSystem"
|
||||
msgid "System performance settings"
|
||||
msgstr "性能设置"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:188
|
||||
msgctxt "ppt_pl1_spl"
|
||||
msgid "PL1, sustained power limit"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:198
|
||||
msgctxt "ppt_pl2_sppt"
|
||||
msgid "PL2, turbo power limit"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:208
|
||||
msgctxt "ppt_fppt"
|
||||
msgid "FPPT, Fast Power Limit"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:218
|
||||
msgctxt "ppt_apu_sppt"
|
||||
msgid "SPPT, APU slow power limit"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:228
|
||||
msgctxt "ppt_platform_sppt"
|
||||
msgid "Slow package power tracking limit"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:238
|
||||
#, fuzzy
|
||||
msgctxt "nv_dynamic_boost"
|
||||
msgid "dGPU boost overclock"
|
||||
msgstr "独显动态增强"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:248
|
||||
msgctxt "nv_temp_target"
|
||||
msgid "dGPU temperature max"
|
||||
msgstr "独显最高温度"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:294
|
||||
msgctxt "PageSystem"
|
||||
msgid "Energy Performance Preference linked to Throttle Policy"
|
||||
msgstr "绑定至电源管理方案的 EPP"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:298
|
||||
msgctxt "PageSystem"
|
||||
msgid "Change EPP based on Throttle Policy"
|
||||
msgstr "基于电源管理方案更改 EPP"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:306
|
||||
msgctxt "PageSystem"
|
||||
msgid "EPP for Balanced Policy"
|
||||
msgstr "平衡"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:316
|
||||
msgctxt "PageSystem"
|
||||
msgid "EPP for Performance Policy"
|
||||
msgstr "性能"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:326
|
||||
msgctxt "PageSystem"
|
||||
msgid "EPP for Quiet Policy"
|
||||
msgstr "省电"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:344
|
||||
msgctxt "PageSystem"
|
||||
msgid "Throttle Policy for power state"
|
||||
msgstr "基于供电状态的电源管理方案"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:350
|
||||
msgctxt "PageSystem"
|
||||
msgid "Throttle Policy on Battery"
|
||||
msgstr "电池供电"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:360 rog-control-center/ui/pages/system.slint:381
|
||||
msgctxt "PageSystem"
|
||||
msgid "Enabled"
|
||||
msgstr "启用"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:371
|
||||
msgctxt "PageSystem"
|
||||
msgid "Throttle Policy on AC"
|
||||
msgstr "交流供电"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:49
|
||||
msgctxt "Aura power zone"
|
||||
msgid "Logo"
|
||||
msgstr "徽标"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:50 rog-control-center/ui/types/aura_types.slint:59
|
||||
msgctxt "Aura power zone"
|
||||
msgid "Keyboard"
|
||||
msgstr "键盘"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:51 rog-control-center/ui/types/aura_types.slint:60
|
||||
msgctxt "Aura power zone"
|
||||
msgid "Lightbar"
|
||||
msgstr "灯带"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:52
|
||||
msgctxt "Aura power zone"
|
||||
msgid "Lid"
|
||||
msgstr "盖子"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:53
|
||||
msgctxt "Aura power zone"
|
||||
msgid "Rear Glow"
|
||||
msgstr "后灯"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:54 rog-control-center/ui/types/aura_types.slint:61
|
||||
msgctxt "Aura power zone"
|
||||
msgid "Keyboard and Lightbar"
|
||||
msgstr "键盘和灯带"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:64
|
||||
msgctxt "Aura brightness"
|
||||
msgid "Off"
|
||||
msgstr "关"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:65
|
||||
msgctxt "Aura brightness"
|
||||
msgid "Low"
|
||||
msgstr "暗"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:66
|
||||
msgctxt "Aura brightness"
|
||||
msgid "Med"
|
||||
msgstr "中"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:67
|
||||
msgctxt "Aura brightness"
|
||||
msgid "High"
|
||||
msgstr "亮"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:72 rog-control-center/ui/types/aura_types.slint:87
|
||||
#, fuzzy
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Static"
|
||||
msgstr "恒亮"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:73 rog-control-center/ui/types/aura_types.slint:88
|
||||
#, fuzzy
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Breathe"
|
||||
msgstr "呼吸"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:74 rog-control-center/ui/types/aura_types.slint:89
|
||||
#, fuzzy
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Strobe"
|
||||
msgstr "频谱"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:75
|
||||
#, fuzzy
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Rainbow"
|
||||
msgstr "彩虹"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:76
|
||||
#, fuzzy
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Star"
|
||||
msgstr "星光"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:77
|
||||
#, fuzzy
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Rain"
|
||||
msgstr "落雨"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:78
|
||||
#, fuzzy
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Highlight"
|
||||
msgstr "高亮"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:79
|
||||
#, fuzzy
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Laser"
|
||||
msgstr "激光"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:80
|
||||
#, fuzzy
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Ripple"
|
||||
msgstr "涟漪"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:81
|
||||
#, fuzzy
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Nothing"
|
||||
msgstr "无"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:82
|
||||
#, fuzzy
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Pulse"
|
||||
msgstr "脉冲"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:83
|
||||
#, fuzzy
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Comet"
|
||||
msgstr "彗星"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:84
|
||||
#, fuzzy
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Flash"
|
||||
msgstr "闪烁"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:96
|
||||
msgctxt "Aura zone"
|
||||
msgid "None"
|
||||
msgstr "无"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:97
|
||||
msgctxt "Aura zone"
|
||||
msgid "Key1"
|
||||
msgstr "按键 1"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:98
|
||||
msgctxt "Aura zone"
|
||||
msgid "Key2"
|
||||
msgstr "按键 2"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:99
|
||||
msgctxt "Aura zone"
|
||||
msgid "Key3"
|
||||
msgstr "按键 3"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:100
|
||||
msgctxt "Aura zone"
|
||||
msgid "Key4"
|
||||
msgstr "按键 4"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:101
|
||||
msgctxt "Aura zone"
|
||||
msgid "Logo"
|
||||
msgstr "徽标"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:102
|
||||
msgctxt "Aura zone"
|
||||
msgid "Lightbar Left"
|
||||
msgstr "左灯带"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:103
|
||||
msgctxt "Aura zone"
|
||||
msgid "Lightbar Right"
|
||||
msgstr "右灯带"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:107
|
||||
msgctxt "Aura direction"
|
||||
msgid "Right"
|
||||
msgstr "右"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:108
|
||||
msgctxt "Aura direction"
|
||||
msgid "Left"
|
||||
msgstr "左"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:109
|
||||
msgctxt "Aura direction"
|
||||
msgid "Up"
|
||||
msgstr "上"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:110
|
||||
msgctxt "Aura direction"
|
||||
msgid "Down"
|
||||
msgstr "下"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:114
|
||||
msgctxt "Aura speed"
|
||||
msgid "Low"
|
||||
msgstr "慢"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:115
|
||||
msgctxt "Aura speed"
|
||||
msgid "Medium"
|
||||
msgstr "中"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:116
|
||||
msgctxt "Aura speed"
|
||||
msgid "High"
|
||||
msgstr "快"
|
||||
|
||||
#: rog-control-center/ui/widgets/aura_power.slint:33
|
||||
msgctxt "AuraPowerGroup"
|
||||
msgid "Boot"
|
||||
msgstr "开机"
|
||||
|
||||
#: rog-control-center/ui/widgets/aura_power.slint:43
|
||||
msgctxt "AuraPowerGroup"
|
||||
msgid "Awake"
|
||||
msgstr "唤醒"
|
||||
|
||||
#: rog-control-center/ui/widgets/aura_power.slint:53
|
||||
msgctxt "AuraPowerGroup"
|
||||
msgid "Sleep"
|
||||
msgstr "睡眠"
|
||||
|
||||
#: rog-control-center/ui/widgets/aura_power.slint:63
|
||||
msgctxt "AuraPowerGroup"
|
||||
msgid "Shutdown"
|
||||
msgstr "关机"
|
||||
|
||||
#: rog-control-center/ui/widgets/aura_power.slint:102
|
||||
msgctxt "AuraPowerGroupOld"
|
||||
msgid "Zone Selection"
|
||||
msgstr "区域"
|
||||
|
||||
#: rog-control-center/ui/widgets/aura_power.slint:114
|
||||
msgctxt "AuraPowerGroupOld"
|
||||
msgid "Boot"
|
||||
msgstr "开机"
|
||||
|
||||
#: rog-control-center/ui/widgets/aura_power.slint:124
|
||||
msgctxt "AuraPowerGroupOld"
|
||||
msgid "Awake"
|
||||
msgstr "唤醒"
|
||||
|
||||
#: rog-control-center/ui/widgets/aura_power.slint:134
|
||||
msgctxt "AuraPowerGroupOld"
|
||||
msgid "Sleep"
|
||||
msgstr "睡眠"
|
||||
|
||||
#: rog-control-center/ui/main_window.slint:51
|
||||
msgctxt "MainWindow"
|
||||
msgid "ROG"
|
||||
msgstr "ROG"
|
||||
|
||||
#: rog-control-center/ui/main_window.slint:53
|
||||
msgctxt "Menu1"
|
||||
msgid "System Control"
|
||||
msgstr "系统设置"
|
||||
|
||||
#: rog-control-center/ui/main_window.slint:54
|
||||
msgctxt "Menu2"
|
||||
msgid "Keyboard Aura"
|
||||
msgstr "Aura 键盘灯效"
|
||||
|
||||
#: rog-control-center/ui/main_window.slint:55
|
||||
msgctxt "Menu3"
|
||||
msgid "AniMe Matrix"
|
||||
msgstr "AniMe 光显矩阵"
|
||||
|
||||
#: rog-control-center/ui/main_window.slint:56
|
||||
msgctxt "Menu4"
|
||||
msgid "Fan Curves"
|
||||
msgstr "风扇曲线"
|
||||
|
||||
#: rog-control-center/ui/main_window.slint:57
|
||||
msgctxt "Menu5"
|
||||
msgid "App Settings"
|
||||
msgstr "应用设置"
|
||||
|
||||
#: rog-control-center/ui/main_window.slint:58
|
||||
msgctxt "Menu6"
|
||||
msgid "About"
|
||||
msgstr "关于"
|
||||
|
||||
#: rog-control-center/ui/main_window.slint:70
|
||||
msgctxt "MainWindow"
|
||||
msgid "Quit App"
|
||||
msgstr "退出"
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ export enum AuraDevType {
|
||||
Tuf,
|
||||
ScsiExtDisk,
|
||||
Unknown,
|
||||
Ally,
|
||||
}
|
||||
|
||||
export struct AuraEffect {
|
||||
@@ -28,6 +29,7 @@ export enum PowerZones {
|
||||
Lid,
|
||||
RearGlow,
|
||||
KeyboardAndLightbar,
|
||||
Ally,
|
||||
}
|
||||
|
||||
export struct AuraPowerState {
|
||||
@@ -52,6 +54,7 @@ export global AuraPageData {
|
||||
@tr("Aura power zone" => "Lid"),
|
||||
@tr("Aura power zone" => "Rear Glow"),
|
||||
@tr("Aura power zone" => "Keyboard and Lightbar"),
|
||||
@tr("Aura power zone" => "Ally"),
|
||||
];
|
||||
// Exists only for the older 0x1866 keybaords. On page setup it must
|
||||
// be set to match the supported_power_zones
|
||||
|
||||
@@ -0,0 +1,288 @@
|
||||
use std::fs::{read_dir, File};
|
||||
use std::io::Read;
|
||||
use std::path::Path;
|
||||
|
||||
use crate::error::PlatformError;
|
||||
|
||||
const BASE_DIR: &str = "/sys/class/firmware-attributes/asus-armoury/attributes/";
|
||||
|
||||
fn read_i32(path: &Path) -> Result<i32, PlatformError> {
|
||||
if let Ok(mut f) = File::open(path) {
|
||||
let mut buf = String::new();
|
||||
f.read_to_string(&mut buf)?;
|
||||
buf.trim()
|
||||
.parse::<i32>()
|
||||
.map_err(|_| PlatformError::ParseNum)
|
||||
} else {
|
||||
Err(PlatformError::ParseNum)
|
||||
}
|
||||
}
|
||||
|
||||
fn read_string(path: &Path) -> Result<String, PlatformError> {
|
||||
let mut f = File::open(path)?;
|
||||
let mut buf = String::new();
|
||||
f.read_to_string(&mut buf)?;
|
||||
Ok(buf.trim().to_string())
|
||||
}
|
||||
|
||||
#[derive(Debug, Default, PartialEq, PartialOrd)]
|
||||
pub enum AttrValue {
|
||||
Integer(i32),
|
||||
String(String),
|
||||
EnumInt(Vec<i32>),
|
||||
EnumStr(Vec<String>),
|
||||
#[default]
|
||||
None,
|
||||
}
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
pub struct Attribute {
|
||||
name: String,
|
||||
help: String,
|
||||
current_value: AttrValue,
|
||||
default_value: AttrValue,
|
||||
possible_values: AttrValue,
|
||||
min_value: AttrValue,
|
||||
max_value: AttrValue,
|
||||
scalar_increment: Option<i32>,
|
||||
}
|
||||
|
||||
impl Attribute {
|
||||
pub fn name(&self) -> &str {
|
||||
&self.name
|
||||
}
|
||||
|
||||
pub fn help(&self) -> &str {
|
||||
&self.help
|
||||
}
|
||||
|
||||
pub fn current_value(&self) -> &AttrValue {
|
||||
&self.current_value
|
||||
}
|
||||
|
||||
pub fn default_value(&self) -> &AttrValue {
|
||||
&self.default_value
|
||||
}
|
||||
|
||||
pub fn possible_values(&self) -> &AttrValue {
|
||||
&self.possible_values
|
||||
}
|
||||
|
||||
pub fn min_value(&self) -> &AttrValue {
|
||||
&self.min_value
|
||||
}
|
||||
|
||||
pub fn max_value(&self) -> &AttrValue {
|
||||
&self.max_value
|
||||
}
|
||||
|
||||
pub fn scalar_increment(&self) -> Option<i32> {
|
||||
self.scalar_increment
|
||||
}
|
||||
|
||||
fn read_values(
|
||||
base_path: &Path,
|
||||
) -> (
|
||||
AttrValue,
|
||||
AttrValue,
|
||||
AttrValue,
|
||||
AttrValue,
|
||||
AttrValue,
|
||||
Option<i32>,
|
||||
) {
|
||||
let current_value = match read_string(&base_path.join("current_value")) {
|
||||
Ok(val) => {
|
||||
if let Ok(int) = val.parse::<i32>() {
|
||||
AttrValue::Integer(int)
|
||||
} else {
|
||||
AttrValue::String(val)
|
||||
}
|
||||
}
|
||||
Err(_) => AttrValue::None,
|
||||
};
|
||||
|
||||
let default_value = match read_string(&base_path.join("default_value")) {
|
||||
Ok(val) => {
|
||||
if let Ok(int) = val.parse::<i32>() {
|
||||
AttrValue::Integer(int)
|
||||
} else {
|
||||
AttrValue::String(val)
|
||||
}
|
||||
}
|
||||
Err(_) => AttrValue::None,
|
||||
};
|
||||
|
||||
let possible_values = match read_string(&base_path.join("possible_values")) {
|
||||
Ok(val) => {
|
||||
if let Ok(int) = val.parse::<i32>() {
|
||||
AttrValue::Integer(int)
|
||||
} else if val.contains(';') {
|
||||
AttrValue::EnumInt(val.split(';').filter_map(|s| s.parse().ok()).collect())
|
||||
} else {
|
||||
AttrValue::EnumStr(val.split(';').map(|s| s.to_string()).collect())
|
||||
}
|
||||
}
|
||||
Err(_) => AttrValue::None,
|
||||
};
|
||||
|
||||
let min_value = read_i32(&base_path.join("min_value"))
|
||||
.ok()
|
||||
.map(AttrValue::Integer)
|
||||
.unwrap_or_default();
|
||||
let max_value = read_i32(&base_path.join("max_value"))
|
||||
.ok()
|
||||
.map(AttrValue::Integer)
|
||||
.unwrap_or_default();
|
||||
let scalar_increment = read_i32(&base_path.join("scalar_increment")).ok();
|
||||
|
||||
(
|
||||
current_value,
|
||||
default_value,
|
||||
possible_values,
|
||||
min_value,
|
||||
max_value,
|
||||
scalar_increment,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct FirmwareAttributes {
|
||||
attrs: Vec<Attribute>,
|
||||
}
|
||||
|
||||
#[allow(clippy::new_without_default)]
|
||||
impl FirmwareAttributes {
|
||||
pub fn new() -> Self {
|
||||
let mut attrs = Vec::new();
|
||||
if let Ok(dir) = read_dir(BASE_DIR) {
|
||||
for entry in dir.flatten() {
|
||||
let base_path = entry.path();
|
||||
let name = base_path.file_name().unwrap().to_string_lossy().to_string();
|
||||
let help = read_string(&base_path.join("display_name")).unwrap_or_default();
|
||||
|
||||
let (
|
||||
current_value,
|
||||
default_value,
|
||||
possible_values,
|
||||
min_value,
|
||||
max_value,
|
||||
scalar_increment,
|
||||
) = Attribute::read_values(&base_path);
|
||||
|
||||
attrs.push(Attribute {
|
||||
name,
|
||||
help,
|
||||
current_value,
|
||||
default_value,
|
||||
possible_values,
|
||||
min_value,
|
||||
max_value,
|
||||
scalar_increment,
|
||||
});
|
||||
}
|
||||
}
|
||||
Self { attrs }
|
||||
}
|
||||
|
||||
pub fn attributes(&self) -> &Vec<Attribute> {
|
||||
&self.attrs
|
||||
}
|
||||
|
||||
pub fn attributes_mut(&mut self) -> &mut Vec<Attribute> {
|
||||
&mut self.attrs
|
||||
}
|
||||
}
|
||||
|
||||
macro_rules! define_attribute_getters {
|
||||
($($attr:ident),*) => {
|
||||
impl FirmwareAttributes {
|
||||
$(
|
||||
pub fn $attr(&self) -> Option<&Attribute> {
|
||||
self.attrs.iter().find(|a| a.name() == stringify!($attr))
|
||||
}
|
||||
|
||||
concat_idents::concat_idents!(attr_mut = $attr, _mut {
|
||||
pub fn attr_mut(&mut self) -> Option<&mut Attribute> {
|
||||
self.attrs.iter_mut().find(|a| a.name() == stringify!($attr))
|
||||
}
|
||||
});
|
||||
)*
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
define_attribute_getters!(
|
||||
apu_mem,
|
||||
cores_performance,
|
||||
cores_efficiency,
|
||||
ppt_pl1_spl,
|
||||
ppt_pl2_sppt,
|
||||
ppt_apu_sppt,
|
||||
ppt_platform_sppt,
|
||||
ppt_fppt,
|
||||
nv_dynamic_boost,
|
||||
nv_temp_target,
|
||||
dgpu_base_tgp,
|
||||
dgpu_tgp,
|
||||
charge_mode,
|
||||
boot_sound,
|
||||
mcu_powersave,
|
||||
panel_od,
|
||||
panel_hd_mode,
|
||||
egpu_connected,
|
||||
egpu_enable,
|
||||
dgpu_disable,
|
||||
gpu_mux_mode,
|
||||
mini_led_mode
|
||||
);
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn find_attributes() {
|
||||
let attrs = FirmwareAttributes::new();
|
||||
for attr in attrs.attributes() {
|
||||
dbg!(attr.name());
|
||||
match attr.name() {
|
||||
"nv_dynamic_boost" => {
|
||||
assert!(!attr.help().is_empty());
|
||||
assert!(matches!(attr.current_value, AttrValue::Integer(_)));
|
||||
if let AttrValue::Integer(val) = attr.current_value {
|
||||
assert_eq!(val, 5);
|
||||
}
|
||||
if let AttrValue::Integer(val) = attr.default_value {
|
||||
assert_eq!(val, 25);
|
||||
}
|
||||
assert_eq!(attr.min_value, AttrValue::Integer(0));
|
||||
assert_eq!(attr.max_value, AttrValue::Integer(25));
|
||||
}
|
||||
"boot_sound" => {
|
||||
assert!(!attr.help().is_empty());
|
||||
assert!(matches!(attr.current_value, AttrValue::Integer(0)));
|
||||
// dbg!(attr.current_value());
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_boot_sound() {
|
||||
let attrs = FirmwareAttributes::new();
|
||||
let attr = attrs
|
||||
.attributes()
|
||||
.iter()
|
||||
.find(|a| a.name() == "boot_sound")
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(attr.name(), "boot_sound");
|
||||
assert!(!attr.help().is_empty());
|
||||
assert!(matches!(attr.current_value(), AttrValue::Integer(_)));
|
||||
if let AttrValue::Integer(val) = attr.current_value() {
|
||||
assert_eq!(*val, 0); // assuming value is 0
|
||||
}
|
||||
// Check other members if applicable
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,7 @@ pub struct HidRaw {
|
||||
syspath: PathBuf,
|
||||
/// The product ID. The vendor ID is not kept
|
||||
prod_id: String,
|
||||
device_bcd: u32,
|
||||
/// Retaining a handle to the file for the duration of `HidRaw`
|
||||
file: RefCell<File>,
|
||||
}
|
||||
@@ -52,6 +53,12 @@ impl HidRaw {
|
||||
devfs_path: dev_node.to_owned(),
|
||||
prod_id: id_product.to_string(),
|
||||
syspath: endpoint.syspath().into(),
|
||||
device_bcd: usb_device
|
||||
.attribute_value("bcdDevice")
|
||||
.unwrap_or_default()
|
||||
.to_string_lossy()
|
||||
.parse()
|
||||
.unwrap_or_default(),
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -70,6 +77,12 @@ impl HidRaw {
|
||||
devfs_path: dev_node.to_owned(),
|
||||
prod_id: id_product.to_string(),
|
||||
syspath: endpoint.syspath().into(),
|
||||
device_bcd: endpoint
|
||||
.attribute_value("bcdDevice")
|
||||
.unwrap_or_default()
|
||||
.to_string_lossy()
|
||||
.parse()
|
||||
.unwrap_or_default(),
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -94,6 +107,12 @@ impl HidRaw {
|
||||
devfs_path: dev_node.to_owned(),
|
||||
prod_id: id_product.to_string_lossy().into(),
|
||||
syspath: device.syspath().into(),
|
||||
device_bcd: device
|
||||
.attribute_value("bcdDevice")
|
||||
.unwrap_or_default()
|
||||
.to_string_lossy()
|
||||
.parse()
|
||||
.unwrap_or_default(),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,23 +43,17 @@ impl KeyboardBacklight {
|
||||
PlatformError::Udev("match_subsystem failed".into(), err)
|
||||
})?;
|
||||
|
||||
enumerator
|
||||
.match_sysname("asus::kbd_backlight")
|
||||
.map_err(|err| {
|
||||
warn!("{}", err);
|
||||
PlatformError::Udev("match_subsystem failed".into(), err)
|
||||
})?;
|
||||
|
||||
if let Some(device) = (enumerator.scan_devices().map_err(|err| {
|
||||
for device in enumerator.scan_devices().map_err(|err| {
|
||||
warn!("{}", err);
|
||||
PlatformError::Udev("scan_devices failed".into(), err)
|
||||
})?)
|
||||
.next()
|
||||
{
|
||||
info!("Found keyboard LED controls at {:?}", device.sysname());
|
||||
return Ok(Self {
|
||||
path: device.syspath().to_owned(),
|
||||
});
|
||||
})? {
|
||||
let sys = device.sysname().to_string_lossy();
|
||||
if sys.contains("kbd_backlight") || sys.contains("ally:rgb:gamepad") {
|
||||
info!("Found keyboard LED controls at {:?}", device.sysname());
|
||||
return Ok(Self {
|
||||
path: device.syspath().to_owned(),
|
||||
});
|
||||
}
|
||||
}
|
||||
Err(PlatformError::MissingFunction(
|
||||
"KeyboardLed:new(), asus::kbd_backlight not found".into(),
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
pub mod cpu;
|
||||
pub mod error;
|
||||
pub mod firmware_attributes;
|
||||
pub mod hid_raw;
|
||||
pub mod keyboard_led;
|
||||
pub(crate) mod macros;
|
||||
@@ -44,7 +45,7 @@ pub fn read_attr_bool(device: &Device, attr_name: &str) -> Result<bool> {
|
||||
|
||||
pub fn write_attr_bool(device: &mut Device, attr: &str, value: bool) -> Result<()> {
|
||||
device
|
||||
.set_attribute_value(attr, &(value as u8).to_string())
|
||||
.set_attribute_value(attr, value.to_string())
|
||||
.map_err(|e| PlatformError::IoPath(attr.into(), e))
|
||||
}
|
||||
|
||||
@@ -58,7 +59,7 @@ pub fn read_attr_u8(device: &Device, attr_name: &str) -> Result<u8> {
|
||||
|
||||
pub fn write_attr_u8(device: &mut Device, attr: &str, value: u8) -> Result<()> {
|
||||
device
|
||||
.set_attribute_value(attr, &(value).to_string())
|
||||
.set_attribute_value(attr, value.to_string())
|
||||
.map_err(|e| PlatformError::IoPath(attr.into(), e))
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ dbus = ["zbus"]
|
||||
log.workspace = true
|
||||
udev.workspace = true
|
||||
serde.workspace = true
|
||||
serde_derive.workspace = true
|
||||
typeshare.workspace = true
|
||||
rog_platform = { path = "../rog-platform" }
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use log::{error, trace};
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
use udev::Device;
|
||||
#[cfg(feature = "dbus")]
|
||||
@@ -91,7 +91,7 @@ impl std::str::FromStr for CurveData {
|
||||
}
|
||||
|
||||
for (index, value) in input.split(',').enumerate() {
|
||||
for (select, num) in value.splitn(2, |c| c == 'c' || c == ':').enumerate() {
|
||||
for (select, num) in value.splitn(2, ['c', ':']).enumerate() {
|
||||
if num.contains('%') {
|
||||
percentages = true;
|
||||
}
|
||||
@@ -173,13 +173,13 @@ impl CurveData {
|
||||
for (index, out) in self.pwm.iter().enumerate() {
|
||||
let pwm = pwm_str(pwm_num, index);
|
||||
trace!("writing {pwm}");
|
||||
device.set_attribute_value(&pwm, &out.to_string())?;
|
||||
device.set_attribute_value(&pwm, out.to_string())?;
|
||||
}
|
||||
|
||||
for (index, out) in self.temp.iter().enumerate() {
|
||||
let temp = temp_str(pwm_num, index);
|
||||
trace!("writing {temp}");
|
||||
device.set_attribute_value(&temp, &out.to_string())?;
|
||||
device.set_attribute_value(&temp, out.to_string())?;
|
||||
}
|
||||
|
||||
// Enable must be done *after* all points are written pwm3_enable
|
||||
|
||||
@@ -5,7 +5,7 @@ use error::ProfileError;
|
||||
use fan_curve_set::CurveData;
|
||||
use log::debug;
|
||||
use rog_platform::platform::ThrottlePolicy;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
pub use udev::Device;
|
||||
#[cfg(feature = "dbus")]
|
||||
|
||||
@@ -23,7 +23,6 @@ path = "src/lib.rs"
|
||||
|
||||
[dependencies]
|
||||
serde.workspace = true
|
||||
serde_derive.workspace = true
|
||||
typeshare.workspace = true
|
||||
zbus = { workspace = true, optional = true }
|
||||
dmi_id = { path = "../dmi-id", optional = true }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use std::fmt::Display;
|
||||
use std::str::FromStr;
|
||||
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typeshare::typeshare;
|
||||
#[cfg(feature = "dbus")]
|
||||
use zbus::zvariant::Type;
|
||||
@@ -13,6 +13,7 @@ use crate::error::SlashError;
|
||||
pub enum SlashType {
|
||||
GA403,
|
||||
GA605,
|
||||
GU605,
|
||||
Unsupported,
|
||||
}
|
||||
|
||||
@@ -23,6 +24,7 @@ impl FromStr for SlashType {
|
||||
Ok(match s {
|
||||
"ga403" | "GA403" => Self::GA403,
|
||||
"ga605" | "GA605" => Self::GA605,
|
||||
"gu605" | "GU605" => Self::GU605,
|
||||
_ => Self::Unsupported,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -36,6 +36,8 @@ pub fn get_maybe_slash_type() -> Result<SlashType, SlashError> {
|
||||
return Ok(SlashType::GA403);
|
||||
} else if board_name.contains("GA605") {
|
||||
return Ok(SlashType::GA605);
|
||||
} else if board_name.contains("GU605") {
|
||||
return Ok(SlashType::GU605);
|
||||
}
|
||||
Ok(SlashType::Unsupported)
|
||||
}
|
||||
|
||||
@@ -19,6 +19,6 @@ uhid-virt = "^0.0.7"
|
||||
rog_anime = { path = "../rog-anime", features = ["dbus"] }
|
||||
|
||||
[dependencies.sdl2]
|
||||
version = "0.36"
|
||||
version = "0.37"
|
||||
default-features = false
|
||||
# features = ["gfx"]
|
||||
|
||||
Reference in New Issue
Block a user