Fix the handling of of the kernel change from "quiet" to "low-power"

A coming kernel change will convert "quiet" to "low-power" due to how
platform_profile can now have multiple registered handlers.
(kernel 6.14 est)

Fixes #609
This commit is contained in:
Luke Jones
2025-02-14 19:38:02 +13:00
parent 2c006699f2
commit 4dd29952c8
13 changed files with 146 additions and 71 deletions

View File

@@ -35,7 +35,9 @@ async fn main() -> Result<()> {
// If we're running under gamescope we have to set WAYLAND_DISPLAY for winit to
// use
if let Ok(gamescope) = env::var("GAMESCOPE_WAYLAND_DISPLAY") {
env::set_var("WAYLAND_DISPLAY", gamescope);
if !gamescope.is_empty() {
env::set_var("WAYLAND_DISPLAY", gamescope);
}
}
// Try to open a proxy and check for app state first

View File

@@ -9,6 +9,7 @@ impl From<Profile> for PlatformProfile {
Profile::Balanced => PlatformProfile::Balanced,
Profile::Performance => PlatformProfile::Performance,
Profile::Quiet => PlatformProfile::Quiet,
Profile::LowPower => PlatformProfile::LowPower,
}
}
}
@@ -19,6 +20,7 @@ impl From<PlatformProfile> for Profile {
PlatformProfile::Balanced => Profile::Balanced,
PlatformProfile::Performance => Profile::Performance,
PlatformProfile::Quiet => Profile::Quiet,
PlatformProfile::LowPower => Profile::LowPower,
}
}
}

View File

@@ -2,7 +2,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2025-02-14 03:05+0000\n"
"POT-Creation-Date: 2025-02-14 06:37+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"
@@ -27,6 +27,11 @@ msgctxt "SystemPageData"
msgid "Quiet"
msgstr ""
#: rog-control-center/ui/pages/system.slint:20
msgctxt "SystemPageData"
msgid "LowPower"
msgstr ""
#: rog-control-center/ui/pages/system.slint:23
msgctxt "SystemPageData"
msgid "Default"

View File

@@ -4,6 +4,7 @@ export enum Profile {
Balanced,
Performance,
Quiet,
LowPower,
}
export enum FanType {