mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Changes after my own PR review
This commit is contained in:
@@ -29,11 +29,10 @@ version = "6.0.0-alpha1"
|
|||||||
rust-version = "1.76"
|
rust-version = "1.76"
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
tokio = { version = "^1.23.0", default-features = false, features = [
|
tokio = { version = "^1.36.0", default-features = false,features = [
|
||||||
"macros",
|
"macros",
|
||||||
"sync",
|
"sync",
|
||||||
"time",
|
"time",
|
||||||
"rt",
|
|
||||||
"rt-multi-thread"
|
"rt-multi-thread"
|
||||||
] }
|
] }
|
||||||
concat-idents = "^1.1"
|
concat-idents = "^1.1"
|
||||||
|
|||||||
6
Makefile
6
Makefile
@@ -124,9 +124,9 @@ bindings:
|
|||||||
typeshare ./rog-platform/src/ --lang=typescript --output-file=bindings/ts/platform.ts
|
typeshare ./rog-platform/src/ --lang=typescript --output-file=bindings/ts/platform.ts
|
||||||
|
|
||||||
introspect:
|
introspect:
|
||||||
# gdbus introspect --system -d org.asuslinux.Daemon -o /org/asuslinux/Platform -x > bindings/dbus-xml/org-asuslinux-platform-4.xml
|
gdbus introspect --system -d org.asuslinux.Daemon -o /org/asuslinux/Platform -x > bindings/dbus-xml/org-asuslinux-platform-4.xml
|
||||||
# gdbus introspect --system -d org.asuslinux.Daemon -o /org/asuslinux/Aura -x > bindings/dbus-xml/org-asuslinux-aura-4.xml
|
gdbus introspect --system -d org.asuslinux.Daemon -o /org/asuslinux/Aura -x > bindings/dbus-xml/org-asuslinux-aura-4.xml
|
||||||
# gdbus introspect --system -d org.asuslinux.Daemon -o /org/asuslinux/Anime -x > bindings/dbus-xml/org-asuslinux-anime-4.xml
|
gdbus introspect --system -d org.asuslinux.Daemon -o /org/asuslinux/Anime -x > bindings/dbus-xml/org-asuslinux-anime-4.xml
|
||||||
gdbus introspect --system -d org.asuslinux.Daemon -o /org/asuslinux -x > bindings/dbus-xml/org-asuslinux-platform-4.xml
|
gdbus introspect --system -d org.asuslinux.Daemon -o /org/asuslinux -x > bindings/dbus-xml/org-asuslinux-platform-4.xml
|
||||||
gdbus introspect --system -d org.asuslinux.Daemon -o /org/asuslinux/19b6_4_4 -x > bindings/dbus-xml/org-asuslinux-19b6-4-4-4.xml
|
gdbus introspect --system -d org.asuslinux.Daemon -o /org/asuslinux/19b6_4_4 -x > bindings/dbus-xml/org-asuslinux-19b6-4-4-4.xml
|
||||||
xmlstarlet ed -L -O -d '//interface[@name="org.freedesktop.DBus.Introspectable"]' bindings/dbus-xml/org-asuslinux-*
|
xmlstarlet ed -L -O -d '//interface[@name="org.freedesktop.DBus.Introspectable"]' bindings/dbus-xml/org-asuslinux-*
|
||||||
|
|||||||
@@ -88,15 +88,15 @@ impl FromStr for LedBrightness {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
impl Display for LedBrightness {
|
impl ToString for LedBrightness {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn to_string(&self) -> String {
|
||||||
let s = match self.level {
|
let s = match self.level {
|
||||||
Some(0x00) => "low",
|
Some(0x00) => "low",
|
||||||
Some(0x01) => "med",
|
Some(0x01) => "med",
|
||||||
Some(0x02) => "high",
|
Some(0x02) => "high",
|
||||||
_ => "unknown",
|
_ => "unknown",
|
||||||
};
|
};
|
||||||
write!(f, "{}", s.to_owned())
|
s.to_owned()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,105 +0,0 @@
|
|||||||
|
|
||||||
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
|
|
||||||
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
|
|
||||||
<node>
|
|
||||||
<interface name="org.asuslinux.Aura">
|
|
||||||
<!--
|
|
||||||
Get the data set for every mode available
|
|
||||||
-->
|
|
||||||
<method name="AllModeData">
|
|
||||||
<arg type="a{u(uu(yyy)(yyy)ss)}" direction="out"/>
|
|
||||||
</method>
|
|
||||||
<!--
|
|
||||||
On machine that have some form of either per-key keyboard or per-zone
|
|
||||||
this can be used to write custom effects over dbus. The input is a
|
|
||||||
nested `Vec<Vec<8>>` where `Vec<u8>` is a raw USB packet
|
|
||||||
-->
|
|
||||||
<method name="DirectAddressingRaw">
|
|
||||||
<arg name="data" type="aay" direction="in"/>
|
|
||||||
</method>
|
|
||||||
<!--
|
|
||||||
Return the current LED brightness
|
|
||||||
-->
|
|
||||||
<!--
|
|
||||||
Set the keyboard brightness level (0-3)
|
|
||||||
-->
|
|
||||||
<property name="Brightness" type="u" access="readwrite"/>
|
|
||||||
<!--
|
|
||||||
Return the device type for this Aura keyboard
|
|
||||||
-->
|
|
||||||
<property name="DeviceType" type="s" access="read"/>
|
|
||||||
<!--
|
|
||||||
The current mode data
|
|
||||||
-->
|
|
||||||
<!--
|
|
||||||
Set an Aura effect if the effect mode or zone is supported.
|
|
||||||
|
|
||||||
On success the aura config file is read to refresh cached values, then
|
|
||||||
the effect is stored and config written to disk.
|
|
||||||
-->
|
|
||||||
<property name="LedMode" type="u" access="readwrite"/>
|
|
||||||
<!--
|
|
||||||
The current mode data
|
|
||||||
-->
|
|
||||||
<!--
|
|
||||||
Set an Aura effect if the effect mode or zone is supported.
|
|
||||||
|
|
||||||
On success the aura config file is read to refresh cached values, then
|
|
||||||
the effect is stored and config written to disk.
|
|
||||||
-->
|
|
||||||
<property name="LedModeData" type="(uu(yyy)(yyy)ss)" access="readwrite"/>
|
|
||||||
<!--
|
|
||||||
Set a variety of states, input is array of enum.
|
|
||||||
`enabled` sets if the sent array should be disabled or enabled
|
|
||||||
|
|
||||||
For Modern ROG devices the "enabled" flag is ignored.
|
|
||||||
-->
|
|
||||||
<property name="LedPower" type="(auau((ubbbb)(ubbbb)(ubbbb)(ubbbb)(ubbbb)))" access="readwrite"/>
|
|
||||||
<!--
|
|
||||||
The total available modes
|
|
||||||
-->
|
|
||||||
<property name="SupportedBasicModes" type="au" access="read"/>
|
|
||||||
<property name="SupportedBasicZones" type="au" access="read"/>
|
|
||||||
<!--
|
|
||||||
Total levels of brightness available
|
|
||||||
-->
|
|
||||||
<property name="SupportedBrightness" type="au" access="read"/>
|
|
||||||
<property name="SupportedPowerZones" type="au" access="read"/>
|
|
||||||
</interface>
|
|
||||||
<interface name="org.freedesktop.DBus.Introspectable">
|
|
||||||
<method name="Introspect">
|
|
||||||
<arg type="s" direction="out"/>
|
|
||||||
</method>
|
|
||||||
</interface>
|
|
||||||
<interface name="org.freedesktop.DBus.Properties">
|
|
||||||
<method name="Get">
|
|
||||||
<arg name="interface_name" type="s" direction="in"/>
|
|
||||||
<arg name="property_name" type="s" direction="in"/>
|
|
||||||
<arg type="v" direction="out"/>
|
|
||||||
</method>
|
|
||||||
<method name="Set">
|
|
||||||
<arg name="interface_name" type="s" direction="in"/>
|
|
||||||
<arg name="property_name" type="s" direction="in"/>
|
|
||||||
<arg name="value" type="v" direction="in"/>
|
|
||||||
</method>
|
|
||||||
<method name="GetAll">
|
|
||||||
<arg name="interface_name" type="s" direction="in"/>
|
|
||||||
<arg type="a{sv}" direction="out"/>
|
|
||||||
</method>
|
|
||||||
<!--
|
|
||||||
Emits the `org.freedesktop.DBus.Properties.PropertiesChanged` signal.
|
|
||||||
-->
|
|
||||||
<signal name="PropertiesChanged">
|
|
||||||
<arg name="interface_name" type="s"/>
|
|
||||||
<arg name="changed_properties" type="a{sv}"/>
|
|
||||||
<arg name="invalidated_properties" type="as"/>
|
|
||||||
</signal>
|
|
||||||
</interface>
|
|
||||||
<interface name="org.freedesktop.DBus.Peer">
|
|
||||||
<method name="Ping">
|
|
||||||
</method>
|
|
||||||
<method name="GetMachineId">
|
|
||||||
<arg type="s" direction="out"/>
|
|
||||||
</method>
|
|
||||||
</interface>
|
|
||||||
</node>
|
|
||||||
@@ -1,101 +1,8 @@
|
|||||||
|
|
||||||
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
|
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
|
||||||
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
|
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
|
||||||
<node>
|
<node>
|
||||||
<interface name="org.freedesktop.DBus.Introspectable">
|
<interface name="org.asuslinux.Daemon">
|
||||||
<method name="Introspect">
|
|
||||||
<arg type="s" direction="out"/>
|
|
||||||
</method>
|
|
||||||
</interface>
|
|
||||||
<interface name="org.freedesktop.DBus.Properties">
|
|
||||||
<method name="Get">
|
|
||||||
<arg name="interface_name" type="s" direction="in"/>
|
|
||||||
<arg name="property_name" type="s" direction="in"/>
|
|
||||||
<arg type="v" direction="out"/>
|
|
||||||
</method>
|
|
||||||
<method name="Set">
|
|
||||||
<arg name="interface_name" type="s" direction="in"/>
|
|
||||||
<arg name="property_name" type="s" direction="in"/>
|
|
||||||
<arg name="value" type="v" direction="in"/>
|
|
||||||
</method>
|
|
||||||
<method name="GetAll">
|
|
||||||
<arg name="interface_name" type="s" direction="in"/>
|
|
||||||
<arg type="a{sv}" direction="out"/>
|
|
||||||
</method>
|
|
||||||
<!--
|
|
||||||
Emits the `org.freedesktop.DBus.Properties.PropertiesChanged` signal.
|
|
||||||
-->
|
|
||||||
<signal name="PropertiesChanged">
|
|
||||||
<arg name="interface_name" type="s"/>
|
|
||||||
<arg name="changed_properties" type="a{sv}"/>
|
|
||||||
<arg name="invalidated_properties" type="as"/>
|
|
||||||
</signal>
|
|
||||||
</interface>
|
|
||||||
<interface name="org.asuslinux.FanCurves">
|
|
||||||
<!--
|
|
||||||
Set all fan curves for a profile to enabled status. Will also activate a
|
|
||||||
fan curve if in the same profile mode
|
|
||||||
-->
|
|
||||||
<method name="SetFanCurvesEnabled">
|
|
||||||
<arg name="profile" type="u" direction="in"/>
|
|
||||||
<arg name="enabled" type="b" direction="in"/>
|
|
||||||
</method>
|
|
||||||
<!--
|
|
||||||
Set a single fan curve for a profile to enabled status. Will also
|
|
||||||
activate a fan curve if in the same profile mode
|
|
||||||
-->
|
|
||||||
<method name="SetProfileFanCurveEnabled">
|
|
||||||
<arg name="profile" type="u" direction="in"/>
|
|
||||||
<arg name="fan" type="s" direction="in"/>
|
|
||||||
<arg name="enabled" type="b" direction="in"/>
|
|
||||||
</method>
|
|
||||||
<!--
|
|
||||||
Get the fan-curve data for the currently active ThrottlePolicy
|
|
||||||
-->
|
|
||||||
<method name="FanCurveData">
|
|
||||||
<arg name="profile" type="u" direction="in"/>
|
|
||||||
<arg type="a(s(yyyyyyyy)(yyyyyyyy)b)" direction="out"/>
|
|
||||||
</method>
|
|
||||||
<!--
|
|
||||||
Set the fan curve for the specified profile.
|
|
||||||
Will also activate the fan curve if the user is in the same mode.
|
|
||||||
-->
|
|
||||||
<method name="SetFanCurve">
|
|
||||||
<arg name="profile" type="u" direction="in"/>
|
|
||||||
<arg name="curve" type="(s(yyyyyyyy)(yyyyyyyy)b)" direction="in"/>
|
|
||||||
</method>
|
|
||||||
<!--
|
|
||||||
Reset the stored (self) and device curves to the defaults of the
|
|
||||||
platform.
|
|
||||||
|
|
||||||
Each platform_profile has a different default and the default can be
|
|
||||||
read only for the currently active profile.
|
|
||||||
-->
|
|
||||||
<method name="SetCurvesToDefaults">
|
|
||||||
<arg name="profile" type="u" direction="in"/>
|
|
||||||
</method>
|
|
||||||
<!--
|
|
||||||
Reset the stored (self) and device curve to the defaults of the
|
|
||||||
platform.
|
|
||||||
|
|
||||||
Each platform_profile has a different default and the defualt can be
|
|
||||||
read only for the currently active profile.
|
|
||||||
-->
|
|
||||||
<method name="ResetProfileCurves">
|
|
||||||
<arg name="profile" type="u" direction="in"/>
|
|
||||||
</method>
|
|
||||||
</interface>
|
|
||||||
<interface name="org.freedesktop.DBus.Peer">
|
|
||||||
<method name="Ping">
|
|
||||||
</method>
|
|
||||||
<method name="GetMachineId">
|
|
||||||
<arg type="s" direction="out"/>
|
|
||||||
</method>
|
|
||||||
</interface>
|
|
||||||
<interface name="org.asuslinux.Platform">
|
|
||||||
<method name="Version">
|
|
||||||
<arg type="s" direction="out"/>
|
|
||||||
</method>
|
|
||||||
<!--
|
<!--
|
||||||
Returns a list of property names that this system supports
|
Returns a list of property names that this system supports
|
||||||
-->
|
-->
|
||||||
@@ -111,11 +18,6 @@
|
|||||||
-->
|
-->
|
||||||
<method name="NextThrottleThermalPolicy">
|
<method name="NextThrottleThermalPolicy">
|
||||||
</method>
|
</method>
|
||||||
<!--
|
|
||||||
Get the `boot_sound` value from platform. Updates the stored value in
|
|
||||||
internal config also.
|
|
||||||
-->
|
|
||||||
<property name="BootSound" type="b" access="readwrite"/>
|
|
||||||
<property name="ChargeControlEndThreshold" type="y" access="readwrite"/>
|
<property name="ChargeControlEndThreshold" type="y" access="readwrite"/>
|
||||||
<property name="DgpuDisable" type="b" access="read"/>
|
<property name="DgpuDisable" type="b" access="read"/>
|
||||||
<property name="EgpuEnable" type="b" access="read"/>
|
<property name="EgpuEnable" type="b" access="read"/>
|
||||||
@@ -140,6 +42,10 @@
|
|||||||
internal config also.
|
internal config also.
|
||||||
-->
|
-->
|
||||||
<property name="PanelOd" type="b" access="readwrite"/>
|
<property name="PanelOd" type="b" access="readwrite"/>
|
||||||
|
<!--
|
||||||
|
***********************************************************************
|
||||||
|
-->
|
||||||
|
<property name="PostAnimationSound" type="b" access="readwrite"/>
|
||||||
<!--
|
<!--
|
||||||
Set the APU SPPT limit. Shown on full AMD systems only:
|
Set the APU SPPT limit. Shown on full AMD systems only:
|
||||||
* min=5, max=130
|
* min=5, max=130
|
||||||
@@ -188,160 +94,40 @@
|
|||||||
<property name="ThrottleQuietEpp" type="u" access="readwrite"/>
|
<property name="ThrottleQuietEpp" type="u" access="readwrite"/>
|
||||||
<property name="ThrottleThermalPolicy" type="u" access="readwrite"/>
|
<property name="ThrottleThermalPolicy" type="u" access="readwrite"/>
|
||||||
</interface>
|
</interface>
|
||||||
<interface name="org.asuslinux.Anime">
|
<interface name="org.freedesktop.DBus.Properties">
|
||||||
<!--
|
<method name="Get">
|
||||||
Writes a data stream of length. Will force system thread to exit until
|
<arg name="interface_name" type="s" direction="in"/>
|
||||||
it is restarted
|
<arg name="property_name" type="s" direction="in"/>
|
||||||
-->
|
<arg type="v" direction="out"/>
|
||||||
<method name="Write">
|
</method>
|
||||||
<arg name="input" type="(ays)" direction="in"/>
|
<method name="Set">
|
||||||
|
<arg name="interface_name" type="s" direction="in"/>
|
||||||
|
<arg name="property_name" type="s" direction="in"/>
|
||||||
|
<arg name="value" type="v" direction="in"/>
|
||||||
|
</method>
|
||||||
|
<method name="GetAll">
|
||||||
|
<arg name="interface_name" type="s" direction="in"/>
|
||||||
|
<arg type="a{sv}" direction="out"/>
|
||||||
</method>
|
</method>
|
||||||
<!--
|
<!--
|
||||||
The main loop is the base system set action if the user isn't running
|
Emits the `org.freedesktop.DBus.Properties.PropertiesChanged` signal.
|
||||||
the user daemon
|
|
||||||
-->
|
-->
|
||||||
<method name="RunMainLoop">
|
<signal name="PropertiesChanged">
|
||||||
<arg name="start" type="b" direction="in"/>
|
<arg name="interface_name" type="s"/>
|
||||||
</method>
|
<arg name="changed_properties" type="a{sv}"/>
|
||||||
<!--
|
<arg name="invalidated_properties" type="as"/>
|
||||||
Get the device state as stored by asusd
|
</signal>
|
||||||
-->
|
</interface>
|
||||||
<method name="DeviceState">
|
<interface name="org.freedesktop.DBus.Introspectable">
|
||||||
<arg type="(bub(ssss)bbbu)" direction="out"/>
|
<method name="Introspect">
|
||||||
</method>
|
<arg type="s" direction="out"/>
|
||||||
<!--
|
</method>
|
||||||
Set base brightness level
|
</interface>
|
||||||
-->
|
<interface name="org.freedesktop.DBus.Peer">
|
||||||
<!--
|
<method name="Ping">
|
||||||
Set base brightness level
|
</method>
|
||||||
-->
|
<method name="GetMachineId">
|
||||||
<property name="Brightness" type="u" access="readwrite"/>
|
<arg type="s" direction="out"/>
|
||||||
<!--
|
</method>
|
||||||
Set which builtin animation is used for each stage
|
|
||||||
-->
|
|
||||||
<property name="BuiltinAnimations" type="(ssss)" access="readwrite"/>
|
|
||||||
<!--
|
|
||||||
Enable the builtin animations or not. This is quivalent to "Powersave
|
|
||||||
animations" in Armory crate
|
|
||||||
-->
|
|
||||||
<property name="BuiltinsEnabled" type="b" access="readwrite"/>
|
|
||||||
<!--
|
|
||||||
Set whether the AniMe is enabled at all
|
|
||||||
-->
|
|
||||||
<property name="EnableDisplay" type="b" access="readwrite"/>
|
|
||||||
<!--
|
|
||||||
Set if to turn the AniMe Matrix off when the lid is closed
|
|
||||||
-->
|
|
||||||
<property name="OffWhenLidClosed" type="b" access="readwrite"/>
|
|
||||||
<!--
|
|
||||||
Set if to turn the AniMe Matrix off when the laptop is suspended
|
|
||||||
-->
|
|
||||||
<property name="OffWhenSuspended" type="b" access="readwrite"/>
|
|
||||||
<!--
|
|
||||||
Set if to turn the AniMe Matrix off when external power is unplugged
|
|
||||||
-->
|
|
||||||
<property name="OffWhenUnplugged" type="b" access="readwrite"/>
|
|
||||||
</interface>
|
</interface>
|
||||||
<node name="19b6_4_4">
|
|
||||||
<interface name="org.asuslinux.Aura">
|
|
||||||
<!--
|
|
||||||
Get the data set for every mode available
|
|
||||||
-->
|
|
||||||
<method name="AllModeData">
|
|
||||||
<arg type="a{u(uu(yyy)(yyy)ss)}" direction="out"/>
|
|
||||||
</method>
|
|
||||||
<!--
|
|
||||||
On machine that have some form of either per-key keyboard or per-zone
|
|
||||||
this can be used to write custom effects over dbus. The input is a
|
|
||||||
nested `Vec<Vec<8>>` where `Vec<u8>` is a raw USB packet
|
|
||||||
-->
|
|
||||||
<method name="DirectAddressingRaw">
|
|
||||||
<arg name="data" type="aay" direction="in"/>
|
|
||||||
</method>
|
|
||||||
<!--
|
|
||||||
Return the current LED brightness
|
|
||||||
-->
|
|
||||||
<!--
|
|
||||||
Set the keyboard brightness level (0-3)
|
|
||||||
-->
|
|
||||||
<property name="Brightness" type="u" access="readwrite"/>
|
|
||||||
<!--
|
|
||||||
Return the device type for this Aura keyboard
|
|
||||||
-->
|
|
||||||
<property name="DeviceType" type="s" access="read"/>
|
|
||||||
<!--
|
|
||||||
The current mode data
|
|
||||||
-->
|
|
||||||
<!--
|
|
||||||
Set an Aura effect if the effect mode or zone is supported.
|
|
||||||
|
|
||||||
On success the aura config file is read to refresh cached values, then
|
|
||||||
the effect is stored and config written to disk.
|
|
||||||
-->
|
|
||||||
<property name="LedMode" type="u" access="readwrite"/>
|
|
||||||
<!--
|
|
||||||
The current mode data
|
|
||||||
-->
|
|
||||||
<!--
|
|
||||||
Set an Aura effect if the effect mode or zone is supported.
|
|
||||||
|
|
||||||
On success the aura config file is read to refresh cached values, then
|
|
||||||
the effect is stored and config written to disk.
|
|
||||||
-->
|
|
||||||
<property name="LedModeData" type="(uu(yyy)(yyy)ss)" access="readwrite"/>
|
|
||||||
<!--
|
|
||||||
Set a variety of states, input is array of enum.
|
|
||||||
`enabled` sets if the sent array should be disabled or enabled
|
|
||||||
|
|
||||||
For Modern ROG devices the "enabled" flag is ignored.
|
|
||||||
-->
|
|
||||||
<property name="LedPower" type="(auau((ubbbb)(ubbbb)(ubbbb)(ubbbb)(ubbbb)))" access="readwrite"/>
|
|
||||||
<!--
|
|
||||||
The total available modes
|
|
||||||
-->
|
|
||||||
<property name="SupportedBasicModes" type="au" access="read"/>
|
|
||||||
<property name="SupportedBasicZones" type="au" access="read"/>
|
|
||||||
<!--
|
|
||||||
Total levels of brightness available
|
|
||||||
-->
|
|
||||||
<property name="SupportedBrightness" type="au" access="read"/>
|
|
||||||
<property name="SupportedPowerZones" type="au" access="read"/>
|
|
||||||
</interface>
|
|
||||||
<interface name="org.freedesktop.DBus.Introspectable">
|
|
||||||
<method name="Introspect">
|
|
||||||
<arg type="s" direction="out"/>
|
|
||||||
</method>
|
|
||||||
</interface>
|
|
||||||
<interface name="org.freedesktop.DBus.Properties">
|
|
||||||
<method name="Get">
|
|
||||||
<arg name="interface_name" type="s" direction="in"/>
|
|
||||||
<arg name="property_name" type="s" direction="in"/>
|
|
||||||
<arg type="v" direction="out"/>
|
|
||||||
</method>
|
|
||||||
<method name="Set">
|
|
||||||
<arg name="interface_name" type="s" direction="in"/>
|
|
||||||
<arg name="property_name" type="s" direction="in"/>
|
|
||||||
<arg name="value" type="v" direction="in"/>
|
|
||||||
</method>
|
|
||||||
<method name="GetAll">
|
|
||||||
<arg name="interface_name" type="s" direction="in"/>
|
|
||||||
<arg type="a{sv}" direction="out"/>
|
|
||||||
</method>
|
|
||||||
<!--
|
|
||||||
Emits the `org.freedesktop.DBus.Properties.PropertiesChanged` signal.
|
|
||||||
-->
|
|
||||||
<signal name="PropertiesChanged">
|
|
||||||
<arg name="interface_name" type="s"/>
|
|
||||||
<arg name="changed_properties" type="a{sv}"/>
|
|
||||||
<arg name="invalidated_properties" type="as"/>
|
|
||||||
</signal>
|
|
||||||
</interface>
|
|
||||||
<interface name="org.freedesktop.DBus.Peer">
|
|
||||||
<method name="Ping">
|
|
||||||
</method>
|
|
||||||
<method name="GetMachineId">
|
|
||||||
<arg type="s" direction="out"/>
|
|
||||||
</method>
|
|
||||||
</interface>
|
|
||||||
</node>
|
|
||||||
</node>
|
</node>
|
||||||
|
|||||||
@@ -486,7 +486,7 @@ impl Default for AuraEffect {
|
|||||||
Self {
|
Self {
|
||||||
mode: AuraModeNum::Static,
|
mode: AuraModeNum::Static,
|
||||||
zone: AuraZone::None,
|
zone: AuraZone::None,
|
||||||
colour1: Colour { r: 166, g: 166, b: 166 },
|
colour1: Colour { r: 166, g: 0, b: 0 },
|
||||||
colour2: Colour { r: 0, g: 0, b: 0 },
|
colour2: Colour { r: 0, g: 0, b: 0 },
|
||||||
speed: Speed::Med,
|
speed: Speed::Med,
|
||||||
direction: Direction::Right,
|
direction: Direction::Right,
|
||||||
|
|||||||
@@ -72,10 +72,14 @@ fn main() -> Result<()> {
|
|||||||
})
|
})
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
let supported_properties = dbus.proxies().platform().supported_properties().unwrap_or_else(|_e| {
|
let supported_properties = dbus
|
||||||
// TODO: show an error window
|
.proxies()
|
||||||
Vec::default()
|
.platform()
|
||||||
});
|
.supported_properties()
|
||||||
|
.unwrap_or_else(|_e| {
|
||||||
|
// TODO: show an error window
|
||||||
|
Vec::default()
|
||||||
|
});
|
||||||
|
|
||||||
// Startup
|
// Startup
|
||||||
let mut config = Config::new().load();
|
let mut config = Config::new().load();
|
||||||
@@ -113,7 +117,8 @@ fn main() -> Result<()> {
|
|||||||
init_tray(supported_properties, states.clone(), config.clone());
|
init_tray(supported_properties, states.clone(), config.clone());
|
||||||
}
|
}
|
||||||
|
|
||||||
thread_local! { pub static UI: std::cell::RefCell<Option<MainWindow>> = Default::default()};
|
thread_local! { pub static UI: std::cell::RefCell<Option<MainWindow>> = Default::default()}
|
||||||
|
;
|
||||||
i_slint_backend_selector::with_platform(|_| Ok(())).unwrap();
|
i_slint_backend_selector::with_platform(|_| Ok(())).unwrap();
|
||||||
|
|
||||||
let mut do_once = !startup_in_background;
|
let mut do_once = !startup_in_background;
|
||||||
@@ -170,7 +175,7 @@ fn main() -> Result<()> {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.unwrap();
|
.unwrap();
|
||||||
} else {
|
} else {
|
||||||
if buf[1] == QUIT_APP {
|
if buf[1] == QUIT_APP {
|
||||||
slint::quit_event_loop().unwrap();
|
slint::quit_event_loop().unwrap();
|
||||||
@@ -192,7 +197,7 @@ fn main() -> Result<()> {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.unwrap();
|
.unwrap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"POT-Creation-Date: 2024-03-30 17:43+0000\n"
|
"POT-Creation-Date: 2024-03-23 01:29+0000\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@@ -12,184 +12,44 @@ msgstr ""
|
|||||||
"Language: \n"
|
"Language: \n"
|
||||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||||
|
|
||||||
#: rog-control-center/ui/types/aura_types.slint:69
|
#: rog-control-center/ui/main_window.slint:50
|
||||||
msgctxt "Aura brightness"
|
msgctxt "MainWindow"
|
||||||
msgid "Off"
|
msgid "ROG"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/types/aura_types.slint:70
|
#: rog-control-center/ui/main_window.slint:52
|
||||||
msgctxt "Aura brightness"
|
msgctxt "Menu1"
|
||||||
msgid "Low"
|
msgid "System Control"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/types/aura_types.slint:71
|
#: rog-control-center/ui/main_window.slint:53
|
||||||
msgctxt "Aura brightness"
|
msgctxt "Menu2"
|
||||||
msgid "Med"
|
msgid "Keyboard Aura"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/types/aura_types.slint:72
|
#: rog-control-center/ui/main_window.slint:54
|
||||||
msgctxt "Aura brightness"
|
msgctxt "Menu3"
|
||||||
msgid "High"
|
msgid "AniMe Matrix"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/types/aura_types.slint:77 rog-control-center/ui/types/aura_types.slint:92
|
#: rog-control-center/ui/main_window.slint:55
|
||||||
msgctxt "Basic aura mode"
|
msgctxt "Menu4"
|
||||||
msgid "Static"
|
msgid "Fan Curves"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/types/aura_types.slint:78 rog-control-center/ui/types/aura_types.slint:93
|
#: rog-control-center/ui/main_window.slint:56
|
||||||
msgctxt "Basic aura mode"
|
msgctxt "Menu5"
|
||||||
msgid "Breathe"
|
msgid "App Settings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/types/aura_types.slint:79 rog-control-center/ui/types/aura_types.slint:94
|
#: rog-control-center/ui/main_window.slint:57
|
||||||
msgctxt "Basic aura mode"
|
msgctxt "Menu6"
|
||||||
msgid "Strobe"
|
msgid "About"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/types/aura_types.slint:80
|
#: rog-control-center/ui/main_window.slint:69
|
||||||
msgctxt "Basic aura mode"
|
msgctxt "MainWindow"
|
||||||
msgid "Rainbow"
|
msgid "Quit"
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/types/aura_types.slint:81
|
|
||||||
msgctxt "Basic aura mode"
|
|
||||||
msgid "Star"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/types/aura_types.slint:82
|
|
||||||
msgctxt "Basic aura mode"
|
|
||||||
msgid "Rain"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/types/aura_types.slint:83
|
|
||||||
msgctxt "Basic aura mode"
|
|
||||||
msgid "Highlight"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/types/aura_types.slint:84
|
|
||||||
msgctxt "Basic aura mode"
|
|
||||||
msgid "Laser"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/types/aura_types.slint:85
|
|
||||||
msgctxt "Basic aura mode"
|
|
||||||
msgid "Ripple"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/types/aura_types.slint:86
|
|
||||||
msgctxt "Basic aura mode"
|
|
||||||
msgid "Nothing"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/types/aura_types.slint:87
|
|
||||||
msgctxt "Basic aura mode"
|
|
||||||
msgid "Pulse"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/types/aura_types.slint:88
|
|
||||||
msgctxt "Basic aura mode"
|
|
||||||
msgid "Comet"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/types/aura_types.slint:89
|
|
||||||
msgctxt "Basic aura mode"
|
|
||||||
msgid "Flash"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/types/aura_types.slint:101
|
|
||||||
msgctxt "Aura zone"
|
|
||||||
msgid "None"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/types/aura_types.slint:102
|
|
||||||
msgctxt "Aura zone"
|
|
||||||
msgid "Key1"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/types/aura_types.slint:103
|
|
||||||
msgctxt "Aura zone"
|
|
||||||
msgid "Key2"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/types/aura_types.slint:104
|
|
||||||
msgctxt "Aura zone"
|
|
||||||
msgid "Key3"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/types/aura_types.slint:105
|
|
||||||
msgctxt "Aura zone"
|
|
||||||
msgid "Key4"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/types/aura_types.slint:106
|
|
||||||
msgctxt "Aura zone"
|
|
||||||
msgid "Logo"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/types/aura_types.slint:107
|
|
||||||
msgctxt "Aura zone"
|
|
||||||
msgid "Lightbar Left"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/types/aura_types.slint:108
|
|
||||||
msgctxt "Aura zone"
|
|
||||||
msgid "Lightbar Right"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/types/aura_types.slint:112
|
|
||||||
msgctxt "Aura direction"
|
|
||||||
msgid "Right"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/types/aura_types.slint:113
|
|
||||||
msgctxt "Aura direction"
|
|
||||||
msgid "Left"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/types/aura_types.slint:114
|
|
||||||
msgctxt "Aura direction"
|
|
||||||
msgid "Up"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/types/aura_types.slint:115
|
|
||||||
msgctxt "Aura direction"
|
|
||||||
msgid "Down"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/types/aura_types.slint:119
|
|
||||||
msgctxt "Aura speed"
|
|
||||||
msgid "Low"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/types/aura_types.slint:120
|
|
||||||
msgctxt "Aura speed"
|
|
||||||
msgid "Medium"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/types/aura_types.slint:121
|
|
||||||
msgctxt "Aura speed"
|
|
||||||
msgid "High"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/widgets/aura_power.slint:32
|
|
||||||
msgctxt "AuraPowerGroup"
|
|
||||||
msgid "Boot"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/widgets/aura_power.slint:42
|
|
||||||
msgctxt "AuraPowerGroup"
|
|
||||||
msgid "Awake"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/widgets/aura_power.slint:52
|
|
||||||
msgctxt "AuraPowerGroup"
|
|
||||||
msgid "Sleep"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rog-control-center/ui/widgets/aura_power.slint:62
|
|
||||||
msgctxt "AuraPowerGroup"
|
|
||||||
msgid "Shutdown"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/anime.slint:6
|
#: rog-control-center/ui/pages/anime.slint:6
|
||||||
@@ -317,6 +177,26 @@ msgctxt "PageAnime"
|
|||||||
msgid "Off when on battery"
|
msgid "Off when on battery"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/pages/app_settings.slint:29
|
||||||
|
msgctxt "PageAppSettings"
|
||||||
|
msgid "Run in background after closing"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/pages/app_settings.slint:38
|
||||||
|
msgctxt "PageAppSettings"
|
||||||
|
msgid "Start app in background (UI closed)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/pages/app_settings.slint:50
|
||||||
|
msgctxt "PageAppSettings"
|
||||||
|
msgid "Enable system tray icon"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/pages/app_settings.slint:59
|
||||||
|
msgctxt "PageAppSettings"
|
||||||
|
msgid "Enable change notifications"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/aura.slint:27
|
#: rog-control-center/ui/pages/aura.slint:27
|
||||||
msgctxt "PageAura"
|
msgctxt "PageAura"
|
||||||
msgid "Brightness"
|
msgid "Brightness"
|
||||||
@@ -607,63 +487,183 @@ msgctxt "PageSystem"
|
|||||||
msgid "Throttle Policy on AC"
|
msgid "Throttle Policy on AC"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/app_settings.slint:29
|
#: rog-control-center/ui/types/aura_types.slint:69
|
||||||
msgctxt "PageAppSettings"
|
msgctxt "Aura brightness"
|
||||||
msgid "Run in background after closing"
|
msgid "Off"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/app_settings.slint:38
|
#: rog-control-center/ui/types/aura_types.slint:70
|
||||||
msgctxt "PageAppSettings"
|
msgctxt "Aura brightness"
|
||||||
msgid "Start app in background (UI closed)"
|
msgid "Low"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/app_settings.slint:50
|
#: rog-control-center/ui/types/aura_types.slint:71
|
||||||
msgctxt "PageAppSettings"
|
msgctxt "Aura brightness"
|
||||||
msgid "Enable system tray icon"
|
msgid "Med"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/app_settings.slint:59
|
#: rog-control-center/ui/types/aura_types.slint:72
|
||||||
msgctxt "PageAppSettings"
|
msgctxt "Aura brightness"
|
||||||
msgid "Enable change notifications"
|
msgid "High"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/main_window.slint:50
|
#: rog-control-center/ui/types/aura_types.slint:77 rog-control-center/ui/types/aura_types.slint:92
|
||||||
msgctxt "MainWindow"
|
msgctxt "Basic aura mode"
|
||||||
msgid "ROG"
|
msgid "Static"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/main_window.slint:52
|
#: rog-control-center/ui/types/aura_types.slint:78 rog-control-center/ui/types/aura_types.slint:93
|
||||||
msgctxt "Menu1"
|
msgctxt "Basic aura mode"
|
||||||
msgid "System Control"
|
msgid "Breathe"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/main_window.slint:53
|
#: rog-control-center/ui/types/aura_types.slint:79 rog-control-center/ui/types/aura_types.slint:94
|
||||||
msgctxt "Menu2"
|
msgctxt "Basic aura mode"
|
||||||
msgid "Keyboard Aura"
|
msgid "Strobe"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/main_window.slint:54
|
#: rog-control-center/ui/types/aura_types.slint:80
|
||||||
msgctxt "Menu3"
|
msgctxt "Basic aura mode"
|
||||||
msgid "AniMe Matrix"
|
msgid "Rainbow"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/main_window.slint:55
|
#: rog-control-center/ui/types/aura_types.slint:81
|
||||||
msgctxt "Menu4"
|
msgctxt "Basic aura mode"
|
||||||
msgid "Fan Curves"
|
msgid "Star"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/main_window.slint:56
|
#: rog-control-center/ui/types/aura_types.slint:82
|
||||||
msgctxt "Menu5"
|
msgctxt "Basic aura mode"
|
||||||
msgid "App Settings"
|
msgid "Rain"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/main_window.slint:57
|
#: rog-control-center/ui/types/aura_types.slint:83
|
||||||
msgctxt "Menu6"
|
msgctxt "Basic aura mode"
|
||||||
msgid "About"
|
msgid "Highlight"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/main_window.slint:69
|
#: rog-control-center/ui/types/aura_types.slint:84
|
||||||
msgctxt "MainWindow"
|
msgctxt "Basic aura mode"
|
||||||
msgid "Quit"
|
msgid "Laser"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:85
|
||||||
|
msgctxt "Basic aura mode"
|
||||||
|
msgid "Ripple"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:86
|
||||||
|
msgctxt "Basic aura mode"
|
||||||
|
msgid "Nothing"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:87
|
||||||
|
msgctxt "Basic aura mode"
|
||||||
|
msgid "Pulse"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:88
|
||||||
|
msgctxt "Basic aura mode"
|
||||||
|
msgid "Comet"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:89
|
||||||
|
msgctxt "Basic aura mode"
|
||||||
|
msgid "Flash"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:101
|
||||||
|
msgctxt "Aura zone"
|
||||||
|
msgid "None"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:102
|
||||||
|
msgctxt "Aura zone"
|
||||||
|
msgid "Key1"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:103
|
||||||
|
msgctxt "Aura zone"
|
||||||
|
msgid "Key2"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:104
|
||||||
|
msgctxt "Aura zone"
|
||||||
|
msgid "Key3"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:105
|
||||||
|
msgctxt "Aura zone"
|
||||||
|
msgid "Key4"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:106
|
||||||
|
msgctxt "Aura zone"
|
||||||
|
msgid "Logo"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:107
|
||||||
|
msgctxt "Aura zone"
|
||||||
|
msgid "Lightbar Left"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:108
|
||||||
|
msgctxt "Aura zone"
|
||||||
|
msgid "Lightbar Right"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:112
|
||||||
|
msgctxt "Aura direction"
|
||||||
|
msgid "Right"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:113
|
||||||
|
msgctxt "Aura direction"
|
||||||
|
msgid "Left"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:114
|
||||||
|
msgctxt "Aura direction"
|
||||||
|
msgid "Up"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:115
|
||||||
|
msgctxt "Aura direction"
|
||||||
|
msgid "Down"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:119
|
||||||
|
msgctxt "Aura speed"
|
||||||
|
msgid "Low"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:120
|
||||||
|
msgctxt "Aura speed"
|
||||||
|
msgid "Medium"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/types/aura_types.slint:121
|
||||||
|
msgctxt "Aura speed"
|
||||||
|
msgid "High"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/widgets/aura_power.slint:32
|
||||||
|
msgctxt "AuraPowerGroup"
|
||||||
|
msgid "Boot"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/widgets/aura_power.slint:42
|
||||||
|
msgctxt "AuraPowerGroup"
|
||||||
|
msgid "Awake"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/widgets/aura_power.slint:52
|
||||||
|
msgctxt "AuraPowerGroup"
|
||||||
|
msgid "Sleep"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/widgets/aura_power.slint:62
|
||||||
|
msgctxt "AuraPowerGroup"
|
||||||
|
msgid "Shutdown"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ const BLOCKING_TIME: u64 = 33; // 100ms = 10 FPS, max 50ms = 20 FPS, 40ms = 25 F
|
|||||||
#[proxy(
|
#[proxy(
|
||||||
interface = "org.asuslinux.Aura",
|
interface = "org.asuslinux.Aura",
|
||||||
default_service = "org.asuslinux.Daemon",
|
default_service = "org.asuslinux.Daemon",
|
||||||
default_path = "/org/asuslinux/19b6_4_4"
|
default_path = "/org/asuslinux/Aura"
|
||||||
)]
|
)]
|
||||||
trait Aura {
|
trait Aura {
|
||||||
/// AllModeData method
|
/// AllModeData method
|
||||||
|
|||||||
@@ -11,11 +11,9 @@ impl USBRaw {
|
|||||||
pub fn new(id_product: u16) -> Result<Self> {
|
pub fn new(id_product: u16) -> Result<Self> {
|
||||||
for device in rusb::devices()?.iter() {
|
for device in rusb::devices()?.iter() {
|
||||||
let device_desc = device.device_descriptor()?;
|
let device_desc = device.device_descriptor()?;
|
||||||
if device_desc.vendor_id() == 0x0b05 {
|
if device_desc.vendor_id() == 0x0b05 && device_desc.product_id() == id_product {
|
||||||
if device_desc.product_id() == id_product {
|
let handle = Self::get_dev_handle(&device)?;
|
||||||
let handle = Self::get_dev_handle(&device)?;
|
return Ok(Self(handle));
|
||||||
return Ok(Self(handle));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -28,17 +26,11 @@ impl USBRaw {
|
|||||||
fn get_dev_handle(
|
fn get_dev_handle(
|
||||||
device: &Device<rusb::GlobalContext>,
|
device: &Device<rusb::GlobalContext>,
|
||||||
) -> Result<DeviceHandle<rusb::GlobalContext>> {
|
) -> Result<DeviceHandle<rusb::GlobalContext>> {
|
||||||
// We don't expect this ID to ever change
|
let mut device = device.open()?;
|
||||||
let device_open = device.open();
|
device.reset()?;
|
||||||
if let Err(err) = device_open {
|
device.set_auto_detach_kernel_driver(true)?;
|
||||||
panic!("Could not open device, try running as root: {}", err);
|
device.claim_interface(0)?;
|
||||||
} else {
|
Ok(device)
|
||||||
let mut device = device_open.unwrap();
|
|
||||||
device.reset()?;
|
|
||||||
device.set_auto_detach_kernel_driver(true)?;
|
|
||||||
device.claim_interface(0)?;
|
|
||||||
Ok(device)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn write_bytes(&self, message: &[u8]) -> Result<usize> {
|
pub fn write_bytes(&self, message: &[u8]) -> Result<usize> {
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
<svg data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32"><defs><linearGradient id="a" x1="2.18" y1="23.255" x2="30.041" y2="8.782" gradientUnits="userSpaceOnUse"><stop offset=".043" stop-color="#ff8618"/><stop offset=".382" stop-color="#ff246e"/><stop offset=".989" stop-color="#af1df5"/></linearGradient></defs><title>ToolBox_trayIcon_colour_32-01</title><path d="M26,22.4713l-6.83,3.8311V23.2578L26,19.4268v3.0445Z" fill="#fff"/><path fill="#000001" d="M16 32.076L30 24.065 30 8.057 16 16.067 16 32.076"/><path fill="#fff" d="M18.925 24.641L18.925 27.041 25.026 23.55 25.026 21.15 18.925 24.641"/><path fill="url(#a)" d="M16 0.076L2 8.057 2 8.057 2 8.057 2 24.065 16 32.076 16 16.067 30 8.057 16 0.076"/></svg>
|
|
||||||
|
Before Width: | Height: | Size: 758 B |
Reference in New Issue
Block a user