mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 66a501ecf6 | |||
| 6b129763d4 | |||
| a0368d4345 | |||
| f2f090a88f | |||
| 6c7e1a6467 | |||
| 92ca7bc70d | |||
| dd1e6b845b | |||
| 882fa9bed8 | |||
| 9c7dfb4030 | |||
| f855908c82 | |||
| 293a087b8a | |||
| fd72a04bb8 | |||
| f131a3fa70 | |||
| ccf8d8df91 | |||
| b970d364f7 | |||
| 1da68ea69d | |||
| e62e7e8eca | |||
| 1b1d10c461 | |||
| 14ea0f6d83 | |||
| 5107a6c39c | |||
| 2c77ec9e24 | |||
| 817a66bdf1 | |||
| 664a3d5533 | |||
| 37bc5e45b9 | |||
| a18692ef1e |
@@ -7,6 +7,59 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [v6.0.7]
|
||||
|
||||
### Changed
|
||||
|
||||
- Add a config option to set if throttle policy is changed on ac/bat change (UI only)
|
||||
- Allow X11 GUI. This is *not* supported. Please see readme.
|
||||
- Fixes to some GUI widget layouts and sizing
|
||||
- Do a backup HID raw write fro brightness if the read-back value does not match. This is a temporary solve for some G14 and G16 until the kernel patch is ready.
|
||||
- Reimplement the older 0x1866 MCU keyboard control power bits plus UI control for it. If you had a keyboard affected by Lightbar issues and it is older than a couple of years this should help. If not, please file a bug.
|
||||
|
||||
## [v6.0.6]
|
||||
|
||||
### Added
|
||||
- Add GX650R laptop to aura DB
|
||||
|
||||
### Changed
|
||||
- Further tweaks to aura init
|
||||
- More logging
|
||||
- Fix TUF laptop led power
|
||||
- Sanitize the dbus path for aura devices (remove `.` chars)
|
||||
- Even more error handling (gracefully)
|
||||
- Better checking for dbus interfaces
|
||||
- Remove dbus `supported_interfaces`
|
||||
- dbus ObjectManager is now at root `/`
|
||||
|
||||
## [v6.0.5]
|
||||
|
||||
### Changed
|
||||
|
||||
- Better more robust error handling in ROGCC
|
||||
- Try to better handle pre-2021 laptops with lightbar
|
||||
- Add more logging to try and trace the charge_control_end_threshold issue
|
||||
- Make `kbd_brightness` optional to work around issues on some laptops that seem to lack it. Likely this will all need a refactor *again* if work proceeds in kernel for better RGB support.
|
||||
|
||||
## [v6.0.4]
|
||||
|
||||
### Changed
|
||||
|
||||
- Remove some `todo()` in rogcc
|
||||
- Add missing `#[zbus(property)]` derive to Slash dbus properties
|
||||
- Match G533Q laptop explicitly to the 0x8166 PID
|
||||
|
||||
## [v6.0.3]
|
||||
|
||||
### NOTE
|
||||
|
||||
- Xorg is not supported any longer. All major desktops and distros are Wayland.
|
||||
|
||||
### Changed
|
||||
|
||||
- Add a check to prevent non-TUF laptops with screwed up method return from TUF acpi methods from trying to add a TUF aura device without actually being a TUF laptop.
|
||||
- Make the G834JZ entry in aura db generic for all G834J
|
||||
|
||||
## [v6.0.2]
|
||||
|
||||
### Changed
|
||||
|
||||
Generated
+261
-90
@@ -4,9 +4,9 @@ version = 3
|
||||
|
||||
[[package]]
|
||||
name = "ab_glyph"
|
||||
version = "0.2.25"
|
||||
version = "0.2.26"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6f90148830dac590fac7ccfe78ec4a8ea404c60f75a24e16407a71f0f40de775"
|
||||
checksum = "2e53b0a3d5760cd2ba9b787ae0c6440ad18ee294ff71b05e3381c900a7d16cfd"
|
||||
dependencies = [
|
||||
"ab_glyph_rasterizer",
|
||||
"owned_ttf_parser",
|
||||
@@ -115,9 +115,15 @@ version = "0.7.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
|
||||
|
||||
[[package]]
|
||||
name = "as-raw-xcb-connection"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b"
|
||||
|
||||
[[package]]
|
||||
name = "asusctl"
|
||||
version = "6.0.2"
|
||||
version = "6.0.7"
|
||||
dependencies = [
|
||||
"asusd",
|
||||
"cargo-husky",
|
||||
@@ -135,7 +141,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "asusd"
|
||||
version = "6.0.2"
|
||||
version = "6.0.7"
|
||||
dependencies = [
|
||||
"cargo-husky",
|
||||
"concat-idents",
|
||||
@@ -161,7 +167,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "asusd-user"
|
||||
version = "6.0.2"
|
||||
version = "6.0.7"
|
||||
dependencies = [
|
||||
"cargo-husky",
|
||||
"config-traits",
|
||||
@@ -203,9 +209,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "async-channel"
|
||||
version = "2.2.1"
|
||||
version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "136d4d23bcc79e27423727b36823d86233aad06dfea531837b038394d11e9928"
|
||||
checksum = "9f2776ead772134d55b62dd45e59a79e21612d85d0af729b8b7d3967d601a62a"
|
||||
dependencies = [
|
||||
"concurrent-queue",
|
||||
"event-listener 5.3.0",
|
||||
@@ -343,7 +349,7 @@ version = "2.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a53fc6301894e04a92cb2584fedde80cb25ba8e02d9dc39d4a87d036e22f397d"
|
||||
dependencies = [
|
||||
"async-channel 2.2.1",
|
||||
"async-channel 2.3.0",
|
||||
"async-io 2.3.2",
|
||||
"async-lock 3.3.0",
|
||||
"async-signal",
|
||||
@@ -365,7 +371,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.61",
|
||||
"syn 2.0.63",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -400,7 +406,7 @@ checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.61",
|
||||
"syn 2.0.63",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -418,7 +424,7 @@ dependencies = [
|
||||
"derive_utils",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.61",
|
||||
"syn 2.0.63",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -492,7 +498,7 @@ dependencies = [
|
||||
"regex",
|
||||
"rustc-hash",
|
||||
"shlex",
|
||||
"syn 2.0.61",
|
||||
"syn 2.0.63",
|
||||
"which",
|
||||
]
|
||||
|
||||
@@ -567,7 +573,7 @@ version = "1.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "495f7104e962b7356f0aeb34247aca1fe7d2e783b346582db7f2904cb5717e88"
|
||||
dependencies = [
|
||||
"async-channel 2.2.1",
|
||||
"async-channel 2.3.0",
|
||||
"async-lock 3.3.0",
|
||||
"async-task",
|
||||
"futures-io",
|
||||
@@ -604,7 +610,7 @@ checksum = "4da9a32f3fed317401fa3c862968128267c3106685286e15d5aaa3d7389c2f60"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.61",
|
||||
"syn 2.0.63",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -691,9 +697,9 @@ checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e"
|
||||
|
||||
[[package]]
|
||||
name = "cfg_aliases"
|
||||
version = "0.2.0"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "77e53693616d3075149f4ead59bdeecd204ac6b8192d8969757601b74bddf00f"
|
||||
checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
|
||||
|
||||
[[package]]
|
||||
name = "cgl"
|
||||
@@ -726,7 +732,7 @@ checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1"
|
||||
dependencies = [
|
||||
"glob",
|
||||
"libc",
|
||||
"libloading",
|
||||
"libloading 0.8.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -814,7 +820,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f76990911f2267d837d9d0ad060aa63aaad170af40904b29461734c339030d4d"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"syn 2.0.61",
|
||||
"syn 2.0.63",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -828,7 +834,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "config-traits"
|
||||
version = "6.0.2"
|
||||
version = "6.0.7"
|
||||
dependencies = [
|
||||
"cargo-husky",
|
||||
"log",
|
||||
@@ -839,7 +845,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "const-field-offset"
|
||||
version = "0.1.5"
|
||||
source = "git+https://github.com/slint-ui/slint.git#c0b79024cc6d064f9e94695d63a18ae490add2d3"
|
||||
source = "git+https://github.com/slint-ui/slint.git#7b3e2fcf32d2937a8ed58bcc742e45dd4852bced"
|
||||
dependencies = [
|
||||
"const-field-offset-macro",
|
||||
"field-offset",
|
||||
@@ -848,11 +854,11 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "const-field-offset-macro"
|
||||
version = "0.1.5"
|
||||
source = "git+https://github.com/slint-ui/slint.git#c0b79024cc6d064f9e94695d63a18ae490add2d3"
|
||||
source = "git+https://github.com/slint-ui/slint.git#7b3e2fcf32d2937a8ed58bcc742e45dd4852bced"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.61",
|
||||
"syn 2.0.63",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -872,6 +878,7 @@ dependencies = [
|
||||
"objc-foundation",
|
||||
"objc_id",
|
||||
"smithay-clipboard",
|
||||
"x11-clipboard",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -934,7 +941,7 @@ checksum = "7704b5fdd17b18ae31c4c1da5a2e0305a2bf17b5249300a9ee9ed7b72114c636"
|
||||
|
||||
[[package]]
|
||||
name = "cpuctl"
|
||||
version = "6.0.2"
|
||||
version = "6.0.7"
|
||||
|
||||
[[package]]
|
||||
name = "cpufeatures"
|
||||
@@ -1010,6 +1017,16 @@ dependencies = [
|
||||
"lazy_static",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ctor"
|
||||
version = "0.2.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"syn 2.0.63",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cursor-icon"
|
||||
version = "1.1.0"
|
||||
@@ -1063,7 +1080,7 @@ checksum = "61bb5a1014ce6dfc2a378578509abe775a5aa06bff584a547555d9efdb81b926"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.61",
|
||||
"syn 2.0.63",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1129,12 +1146,12 @@ version = "0.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412"
|
||||
dependencies = [
|
||||
"libloading",
|
||||
"libloading 0.8.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dmi_id"
|
||||
version = "6.0.2"
|
||||
version = "6.0.7"
|
||||
dependencies = [
|
||||
"log",
|
||||
"udev 0.8.0",
|
||||
@@ -1228,7 +1245,7 @@ checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.61",
|
||||
"syn 2.0.63",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1252,9 +1269,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
|
||||
|
||||
[[package]]
|
||||
name = "errno"
|
||||
version = "0.3.8"
|
||||
version = "0.3.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245"
|
||||
checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"windows-sys 0.52.0",
|
||||
@@ -1396,7 +1413,7 @@ version = "0.3.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f"
|
||||
dependencies = [
|
||||
"memoffset",
|
||||
"memoffset 0.9.1",
|
||||
"rustc_version",
|
||||
]
|
||||
|
||||
@@ -1466,7 +1483,7 @@ dependencies = [
|
||||
"memmap2 0.9.4",
|
||||
"slotmap",
|
||||
"tinyvec",
|
||||
"ttf-parser",
|
||||
"ttf-parser 0.20.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1476,7 +1493,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9099a2f86b8e674b75d03ff154b3fe4c5208ed249ced8d69cc313a9fa40bb488"
|
||||
dependencies = [
|
||||
"hashbrown",
|
||||
"ttf-parser",
|
||||
"ttf-parser 0.20.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1497,7 +1514,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.61",
|
||||
"syn 2.0.63",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1615,6 +1632,26 @@ dependencies = [
|
||||
"version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gethostname"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bb65d4ba3173c56a500b555b532f72c42e8d1fe64962b518897f8959fae2c177"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gethostname"
|
||||
version = "0.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"windows-targets 0.48.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "getrandom"
|
||||
version = "0.2.15"
|
||||
@@ -1724,14 +1761,16 @@ dependencies = [
|
||||
"core-foundation",
|
||||
"dispatch",
|
||||
"glutin_egl_sys",
|
||||
"glutin_glx_sys",
|
||||
"glutin_wgl_sys",
|
||||
"icrate 0.0.4",
|
||||
"libloading",
|
||||
"libloading 0.8.3",
|
||||
"objc2 0.4.1",
|
||||
"once_cell",
|
||||
"raw-window-handle 0.5.2",
|
||||
"wayland-sys",
|
||||
"windows-sys 0.48.0",
|
||||
"x11-dl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1756,6 +1795,16 @@ dependencies = [
|
||||
"windows-sys 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "glutin_glx_sys"
|
||||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a165fd686c10dcc2d45380b35796e577eacfd43d4660ee741ec8ebe2201b3b4f"
|
||||
dependencies = [
|
||||
"gl_generator",
|
||||
"x11-dl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "glutin_wgl_sys"
|
||||
version = "0.5.0"
|
||||
@@ -1841,7 +1890,7 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
|
||||
[[package]]
|
||||
name = "i-slint-backend-linuxkms"
|
||||
version = "1.6.0"
|
||||
source = "git+https://github.com/slint-ui/slint.git#c0b79024cc6d064f9e94695d63a18ae490add2d3"
|
||||
source = "git+https://github.com/slint-ui/slint.git#7b3e2fcf32d2937a8ed58bcc742e45dd4852bced"
|
||||
dependencies = [
|
||||
"calloop",
|
||||
"drm",
|
||||
@@ -1861,7 +1910,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "i-slint-backend-selector"
|
||||
version = "1.6.0"
|
||||
source = "git+https://github.com/slint-ui/slint.git#c0b79024cc6d064f9e94695d63a18ae490add2d3"
|
||||
source = "git+https://github.com/slint-ui/slint.git#7b3e2fcf32d2937a8ed58bcc742e45dd4852bced"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"i-slint-backend-linuxkms",
|
||||
@@ -1873,10 +1922,10 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "i-slint-backend-winit"
|
||||
version = "1.6.0"
|
||||
source = "git+https://github.com/slint-ui/slint.git#c0b79024cc6d064f9e94695d63a18ae490add2d3"
|
||||
source = "git+https://github.com/slint-ui/slint.git#7b3e2fcf32d2937a8ed58bcc742e45dd4852bced"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"cfg_aliases 0.2.0",
|
||||
"cfg_aliases 0.2.1",
|
||||
"cocoa",
|
||||
"const-field-offset",
|
||||
"copypasta",
|
||||
@@ -1903,18 +1952,18 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "i-slint-common"
|
||||
version = "1.6.0"
|
||||
source = "git+https://github.com/slint-ui/slint.git#c0b79024cc6d064f9e94695d63a18ae490add2d3"
|
||||
source = "git+https://github.com/slint-ui/slint.git#7b3e2fcf32d2937a8ed58bcc742e45dd4852bced"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"derive_more",
|
||||
"fontdb",
|
||||
"libloading",
|
||||
"libloading 0.8.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "i-slint-compiler"
|
||||
version = "1.6.0"
|
||||
source = "git+https://github.com/slint-ui/slint.git#c0b79024cc6d064f9e94695d63a18ae490add2d3"
|
||||
source = "git+https://github.com/slint-ui/slint.git#7b3e2fcf32d2937a8ed58bcc742e45dd4852bced"
|
||||
dependencies = [
|
||||
"by_address",
|
||||
"codemap",
|
||||
@@ -1943,7 +1992,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "i-slint-core"
|
||||
version = "1.6.0"
|
||||
source = "git+https://github.com/slint-ui/slint.git#c0b79024cc6d064f9e94695d63a18ae490add2d3"
|
||||
source = "git+https://github.com/slint-ui/slint.git#7b3e2fcf32d2937a8ed58bcc742e45dd4852bced"
|
||||
dependencies = [
|
||||
"auto_enums",
|
||||
"bitflags 2.5.0",
|
||||
@@ -1986,16 +2035,16 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "i-slint-core-macros"
|
||||
version = "1.6.0"
|
||||
source = "git+https://github.com/slint-ui/slint.git#c0b79024cc6d064f9e94695d63a18ae490add2d3"
|
||||
source = "git+https://github.com/slint-ui/slint.git#7b3e2fcf32d2937a8ed58bcc742e45dd4852bced"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"syn 2.0.61",
|
||||
"syn 2.0.63",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "i-slint-renderer-femtovg"
|
||||
version = "1.6.0"
|
||||
source = "git+https://github.com/slint-ui/slint.git#c0b79024cc6d064f9e94695d63a18ae490add2d3"
|
||||
source = "git+https://github.com/slint-ui/slint.git#7b3e2fcf32d2937a8ed58bcc742e45dd4852bced"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"const-field-offset",
|
||||
@@ -2015,7 +2064,7 @@ dependencies = [
|
||||
"raw-window-handle 0.5.2",
|
||||
"rgb",
|
||||
"scoped-tls-hkt",
|
||||
"ttf-parser",
|
||||
"ttf-parser 0.20.0",
|
||||
"unicode-script",
|
||||
"unicode-segmentation",
|
||||
"wasm-bindgen",
|
||||
@@ -2026,11 +2075,11 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "i-slint-renderer-skia"
|
||||
version = "1.6.0"
|
||||
source = "git+https://github.com/slint-ui/slint.git#c0b79024cc6d064f9e94695d63a18ae490add2d3"
|
||||
source = "git+https://github.com/slint-ui/slint.git#7b3e2fcf32d2937a8ed58bcc742e45dd4852bced"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
"cfg-if",
|
||||
"cfg_aliases 0.2.0",
|
||||
"cfg_aliases 0.2.1",
|
||||
"cocoa",
|
||||
"const-field-offset",
|
||||
"core-foundation",
|
||||
@@ -2342,6 +2391,16 @@ version = "0.2.154"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346"
|
||||
|
||||
[[package]]
|
||||
name = "libloading"
|
||||
version = "0.7.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libloading"
|
||||
version = "0.8.3"
|
||||
@@ -2580,6 +2639,15 @@ dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "memoffset"
|
||||
version = "0.7.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "memoffset"
|
||||
version = "0.9.1"
|
||||
@@ -2690,6 +2758,7 @@ dependencies = [
|
||||
"bitflags 1.3.2",
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"memoffset 0.7.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2713,7 +2782,7 @@ dependencies = [
|
||||
"cfg-if",
|
||||
"cfg_aliases 0.1.1",
|
||||
"libc",
|
||||
"memoffset",
|
||||
"memoffset 0.9.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2781,7 +2850,7 @@ dependencies = [
|
||||
"proc-macro-crate",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.61",
|
||||
"syn 2.0.63",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2901,11 +2970,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "owned_ttf_parser"
|
||||
version = "0.20.0"
|
||||
version = "0.21.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d4586edfe4c648c71797a74c84bacb32b52b212eff5dfe2bb9f2c599844023e7"
|
||||
checksum = "6b41438d2fc63c46c74a2203bf5ccd82c41ba04347b2fcf5754f230b167067d5"
|
||||
dependencies = [
|
||||
"ttf-parser",
|
||||
"ttf-parser 0.21.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2972,7 +3041,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.61",
|
||||
"syn 2.0.63",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2995,9 +3064,9 @@ checksum = "b330c9d1b92dfe68442ca20b009c717d5f0b1e3cf4965e62f704c3c6e95a1305"
|
||||
|
||||
[[package]]
|
||||
name = "piper"
|
||||
version = "0.2.1"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4"
|
||||
checksum = "464db0c665917b13ebb5d453ccdec4add5658ee1adc7affc7677615356a8afaf"
|
||||
dependencies = [
|
||||
"atomic-waker",
|
||||
"fastrand 2.1.0",
|
||||
@@ -3098,7 +3167,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"syn 2.0.61",
|
||||
"syn 2.0.63",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3309,7 +3378,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rog-control-center"
|
||||
version = "6.0.2"
|
||||
version = "6.0.7"
|
||||
dependencies = [
|
||||
"asusd",
|
||||
"betrayer",
|
||||
@@ -3341,7 +3410,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rog_anime"
|
||||
version = "6.0.2"
|
||||
version = "6.0.7"
|
||||
dependencies = [
|
||||
"cargo-husky",
|
||||
"dmi_id",
|
||||
@@ -3358,7 +3427,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rog_aura"
|
||||
version = "6.0.2"
|
||||
version = "6.0.7"
|
||||
dependencies = [
|
||||
"cargo-husky",
|
||||
"dmi_id",
|
||||
@@ -3372,7 +3441,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rog_dbus"
|
||||
version = "6.0.2"
|
||||
version = "6.0.7"
|
||||
dependencies = [
|
||||
"asusd",
|
||||
"cargo-husky",
|
||||
@@ -3386,7 +3455,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rog_platform"
|
||||
version = "6.0.2"
|
||||
version = "6.0.7"
|
||||
dependencies = [
|
||||
"cargo-husky",
|
||||
"concat-idents",
|
||||
@@ -3401,7 +3470,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rog_profiles"
|
||||
version = "6.0.2"
|
||||
version = "6.0.7"
|
||||
dependencies = [
|
||||
"cargo-husky",
|
||||
"log",
|
||||
@@ -3415,7 +3484,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rog_simulators"
|
||||
version = "6.0.2"
|
||||
version = "6.0.7"
|
||||
dependencies = [
|
||||
"log",
|
||||
"rog_anime",
|
||||
@@ -3425,7 +3494,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rog_slash"
|
||||
version = "6.0.2"
|
||||
version = "6.0.7"
|
||||
dependencies = [
|
||||
"cargo-husky",
|
||||
"dmi_id",
|
||||
@@ -3455,7 +3524,7 @@ checksum = "32a58fa8a7ccff2aec4f39cc45bf5f985cec7125ab271cf681c279fd00192b49"
|
||||
dependencies = [
|
||||
"countme",
|
||||
"hashbrown",
|
||||
"memoffset",
|
||||
"memoffset 0.9.1",
|
||||
"rustc-hash",
|
||||
"text-size",
|
||||
]
|
||||
@@ -3539,7 +3608,7 @@ dependencies = [
|
||||
"bitflags 2.5.0",
|
||||
"bytemuck",
|
||||
"smallvec",
|
||||
"ttf-parser",
|
||||
"ttf-parser 0.20.0",
|
||||
"unicode-bidi-mirroring",
|
||||
"unicode-ccc",
|
||||
"unicode-properties",
|
||||
@@ -3638,7 +3707,7 @@ checksum = "c5e405930b9796f1c00bee880d03fc7e0bb4b9a11afc776885ffe84320da2865"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.61",
|
||||
"syn 2.0.63",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3660,7 +3729,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.61",
|
||||
"syn 2.0.63",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3760,7 +3829,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "slint"
|
||||
version = "1.6.0"
|
||||
source = "git+https://github.com/slint-ui/slint.git#c0b79024cc6d064f9e94695d63a18ae490add2d3"
|
||||
source = "git+https://github.com/slint-ui/slint.git#7b3e2fcf32d2937a8ed58bcc742e45dd4852bced"
|
||||
dependencies = [
|
||||
"const-field-offset",
|
||||
"i-slint-backend-selector",
|
||||
@@ -3776,7 +3845,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "slint-build"
|
||||
version = "1.6.0"
|
||||
source = "git+https://github.com/slint-ui/slint.git#c0b79024cc6d064f9e94695d63a18ae490add2d3"
|
||||
source = "git+https://github.com/slint-ui/slint.git#7b3e2fcf32d2937a8ed58bcc742e45dd4852bced"
|
||||
dependencies = [
|
||||
"i-slint-compiler",
|
||||
"spin_on",
|
||||
@@ -3787,7 +3856,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "slint-macros"
|
||||
version = "1.6.0"
|
||||
source = "git+https://github.com/slint-ui/slint.git#c0b79024cc6d064f9e94695d63a18ae490add2d3"
|
||||
source = "git+https://github.com/slint-ui/slint.git#7b3e2fcf32d2937a8ed58bcc742e45dd4852bced"
|
||||
dependencies = [
|
||||
"i-slint-compiler",
|
||||
"proc-macro2",
|
||||
@@ -3898,6 +3967,7 @@ version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f266ce2aa23eaaaa4e758ed44495d505d00fb79f359d46f6c1900cb053123b62"
|
||||
dependencies = [
|
||||
"as-raw-xcb-connection",
|
||||
"bytemuck",
|
||||
"cfg_aliases 0.1.1",
|
||||
"cocoa",
|
||||
@@ -3911,12 +3981,14 @@ dependencies = [
|
||||
"raw-window-handle 0.5.2",
|
||||
"redox_syscall 0.4.1",
|
||||
"rustix 0.38.34",
|
||||
"tiny-xlib",
|
||||
"wasm-bindgen",
|
||||
"wayland-backend",
|
||||
"wayland-client",
|
||||
"wayland-sys",
|
||||
"web-sys",
|
||||
"windows-sys 0.48.0",
|
||||
"x11rb 0.12.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3977,7 +4049,7 @@ dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"rustversion",
|
||||
"syn 2.0.61",
|
||||
"syn 2.0.63",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4018,9 +4090,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.61"
|
||||
version = "2.0.63"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c993ed8ccba56ae856363b1845da7266a7cb78e1d146c8a32d54b45a8b831fc9"
|
||||
checksum = "bf5be731623ca1a1fb7d8be6f261a3be6d3e2337b8a1f97be944d020c8fcb704"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -4098,7 +4170,7 @@ checksum = "e2470041c06ec3ac1ab38d0356a6119054dedaea53e12fbefc0de730a1c08524"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.61",
|
||||
"syn 2.0.63",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4157,6 +4229,18 @@ dependencies = [
|
||||
"strict-num",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tiny-xlib"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d4098d49269baa034a8d1eae9bd63e9fa532148d772121dace3bcd6a6c98eb6d"
|
||||
dependencies = [
|
||||
"as-raw-xcb-connection",
|
||||
"ctor",
|
||||
"libloading 0.8.3",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tinyvec"
|
||||
version = "1.6.0"
|
||||
@@ -4196,7 +4280,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.61",
|
||||
"syn 2.0.63",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4263,7 +4347,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.61",
|
||||
"syn 2.0.63",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4281,6 +4365,12 @@ version = "0.20.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "17f77d76d837a7830fe1d4f12b7b4ba4192c1888001c7164257e4bc6d21d96b4"
|
||||
|
||||
[[package]]
|
||||
name = "ttf-parser"
|
||||
version = "0.21.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2c591d83f69777866b9126b24c6dd9a18351f177e49d625920d19f989fd31cf8"
|
||||
|
||||
[[package]]
|
||||
name = "typenum"
|
||||
version = "1.17.0"
|
||||
@@ -4306,7 +4396,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a615d6c2764852a2e88a4f16e9ce1ea49bb776b5872956309e170d63a042a34f"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"syn 2.0.61",
|
||||
"syn 2.0.63",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4339,7 +4429,7 @@ version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9"
|
||||
dependencies = [
|
||||
"memoffset",
|
||||
"memoffset 0.9.1",
|
||||
"tempfile",
|
||||
"winapi",
|
||||
]
|
||||
@@ -4496,7 +4586,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "vtable"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/slint-ui/slint.git#c0b79024cc6d064f9e94695d63a18ae490add2d3"
|
||||
source = "git+https://github.com/slint-ui/slint.git#7b3e2fcf32d2937a8ed58bcc742e45dd4852bced"
|
||||
dependencies = [
|
||||
"const-field-offset",
|
||||
"portable-atomic",
|
||||
@@ -4507,18 +4597,18 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "vtable-macro"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/slint-ui/slint.git#c0b79024cc6d064f9e94695d63a18ae490add2d3"
|
||||
source = "git+https://github.com/slint-ui/slint.git#7b3e2fcf32d2937a8ed58bcc742e45dd4852bced"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.61",
|
||||
"syn 2.0.63",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "waker-fn"
|
||||
version = "1.1.1"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690"
|
||||
checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7"
|
||||
|
||||
[[package]]
|
||||
name = "walkdir"
|
||||
@@ -4557,7 +4647,7 @@ dependencies = [
|
||||
"once_cell",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.61",
|
||||
"syn 2.0.63",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
@@ -4591,7 +4681,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.61",
|
||||
"syn 2.0.63",
|
||||
"wasm-bindgen-backend",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
@@ -4784,6 +4874,15 @@ dependencies = [
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi-wsapoll"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1eafc5f679c576995526e81635d0cf9695841736712b4e892f87abbe6fed3f28"
|
||||
dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi-x86_64-pc-windows-gnu"
|
||||
version = "0.4.0"
|
||||
@@ -4868,7 +4967,7 @@ checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.61",
|
||||
"syn 2.0.63",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4879,7 +4978,7 @@ checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.61",
|
||||
"syn 2.0.63",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5106,6 +5205,7 @@ dependencies = [
|
||||
"android-activity",
|
||||
"atomic-waker",
|
||||
"bitflags 2.5.0",
|
||||
"bytemuck",
|
||||
"calloop",
|
||||
"cfg_aliases 0.1.1",
|
||||
"core-foundation",
|
||||
@@ -5121,6 +5221,7 @@ dependencies = [
|
||||
"objc2 0.4.1",
|
||||
"once_cell",
|
||||
"orbclient",
|
||||
"percent-encoding",
|
||||
"raw-window-handle 0.5.2",
|
||||
"redox_syscall 0.3.5",
|
||||
"rustix 0.38.34",
|
||||
@@ -5137,6 +5238,8 @@ dependencies = [
|
||||
"web-sys",
|
||||
"web-time 0.2.4",
|
||||
"windows-sys 0.48.0",
|
||||
"x11-dl",
|
||||
"x11rb 0.13.1",
|
||||
"xkbcommon-dl",
|
||||
]
|
||||
|
||||
@@ -5167,6 +5270,74 @@ dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "x11-clipboard"
|
||||
version = "0.9.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b98785a09322d7446e28a13203d2cae1059a0dd3dfb32cb06d0a225f023d8286"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"x11rb 0.13.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "x11-dl"
|
||||
version = "2.21.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"once_cell",
|
||||
"pkg-config",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "x11rb"
|
||||
version = "0.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b1641b26d4dec61337c35a1b1aaf9e3cba8f46f0b43636c609ab0291a648040a"
|
||||
dependencies = [
|
||||
"as-raw-xcb-connection",
|
||||
"gethostname 0.3.0",
|
||||
"libc",
|
||||
"libloading 0.7.4",
|
||||
"nix 0.26.4",
|
||||
"once_cell",
|
||||
"winapi",
|
||||
"winapi-wsapoll",
|
||||
"x11rb-protocol 0.12.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "x11rb"
|
||||
version = "0.13.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5d91ffca73ee7f68ce055750bf9f6eca0780b8c85eff9bc046a3b0da41755e12"
|
||||
dependencies = [
|
||||
"as-raw-xcb-connection",
|
||||
"gethostname 0.4.3",
|
||||
"libc",
|
||||
"libloading 0.8.3",
|
||||
"once_cell",
|
||||
"rustix 0.38.34",
|
||||
"x11rb-protocol 0.13.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "x11rb-protocol"
|
||||
version = "0.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "82d6c3f9a0fb6701fab8f6cea9b0c0bd5d6876f1f89f7fada07e558077c344bc"
|
||||
dependencies = [
|
||||
"nix 0.26.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "x11rb-protocol"
|
||||
version = "0.13.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ec107c4503ea0b4a98ef47356329af139c0a4f7750e621cf2973cd3385ebcb3d"
|
||||
|
||||
[[package]]
|
||||
name = "xattr"
|
||||
version = "1.3.1"
|
||||
@@ -5317,7 +5488,7 @@ checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.61",
|
||||
"syn 2.0.63",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
+12
-12
@@ -1,4 +1,16 @@
|
||||
[workspace.package]
|
||||
version = "6.0.7"
|
||||
rust-version = "1.77"
|
||||
license = "MPL-2.0"
|
||||
readme = "README.md"
|
||||
authors = ["Luke <luke@ljones.dev>"]
|
||||
repository = "https://gitlab.com/asus-linux/asusctl"
|
||||
homepage = "https://gitlab.com/asus-linux/asusctl"
|
||||
description = "Laptop feature control for ASUS ROG laptops and others"
|
||||
edition = "2021"
|
||||
|
||||
[workspace]
|
||||
resolver = "2"
|
||||
members = [
|
||||
"asusctl",
|
||||
"asusd",
|
||||
@@ -22,18 +34,6 @@ default-members = [
|
||||
"cpuctl",
|
||||
"rog-control-center",
|
||||
]
|
||||
resolver = "2"
|
||||
|
||||
[workspace.package]
|
||||
version = "6.0.2"
|
||||
rust-version = "1.77"
|
||||
license = "MPL-2.0"
|
||||
readme = "README.md"
|
||||
authors = ["Luke <luke@ljones.dev>"]
|
||||
repository = "https://gitlab.com/asus-linux/asusctl"
|
||||
homepage = "https://gitlab.com/asus-linux/asusctl"
|
||||
description = "Laptop feature control for ASUS ROG laptops and others"
|
||||
edition = "2021"
|
||||
|
||||
[workspace.dependencies]
|
||||
tokio = { version = "^1.36.0", default-features = false, features = [
|
||||
|
||||
@@ -23,10 +23,10 @@ STRIP_BINARIES ?= 0
|
||||
|
||||
DEBUG ?= 0
|
||||
ifeq ($(DEBUG),0)
|
||||
ARGS += --release
|
||||
ARGS += --release --features "rog-control-center/x11"
|
||||
TARGET = release
|
||||
else
|
||||
ARGS += --profile dev
|
||||
ARGS += --profile dev --features "rog-control-center/x11"
|
||||
TARGET = debug
|
||||
endif
|
||||
|
||||
|
||||
@@ -15,6 +15,10 @@ Now includes a GUI, `rog-control-center`.
|
||||
|
||||
Z13 devices will need [these](https://lore.kernel.org/linux-input/20240416090402.31057-1-luke@ljones.dev/T/#t)
|
||||
|
||||
## X11 support
|
||||
|
||||
X11 is not supported at all, as in I will not help you with X11 issues if there are any due to limited time and it being unmaintained itself. You can however build `rog-control-center` with it enabled `cargo build --features "rog-control-center/x11"`.
|
||||
|
||||
## Goals
|
||||
|
||||
The main goal of this work is to provide a safe and easy to use abstraction over various laptop features via DBUS, and to provide some helpful defaults and other behaviour such as toggling throttle/profile on AC/battery change.
|
||||
@@ -72,14 +76,15 @@ The list is a bit outdated as many features have been enabled in the Linux kerne
|
||||
|
||||
A gui is now in the repo - ROG Control Center. At this time it is still a WIP, but it has almost all features in place already.
|
||||
|
||||
**NOTE**: Xorg is not supported.
|
||||
|
||||
# BUILDING
|
||||
|
||||
Rust and cargo are required, they can be installed from [rustup.rs](https://rustup.rs/) or from the distro repos if newer than 1.75.
|
||||
|
||||
**fedora:**
|
||||
|
||||
dnf install cmake clang-devel libinput-devel libseat-devel libgbm-devel libxkbcommon-devel systemd-devel \
|
||||
libdrm-devel expat-devel pcre2-devel libzstd-devel libappindicator-gtk3
|
||||
dnf install cmake clang-devel libinput-devel libseat-devel libgbm-devel libxkbcommon-devel systemd-devel libdrm-devel expat-devel pcre2-devel libzstd-devel gtk3-devel
|
||||
make
|
||||
sudo make install
|
||||
|
||||
@@ -88,7 +93,7 @@ Rust and cargo are required, they can be installed from [rustup.rs](https://rust
|
||||
Works with KDE Plasma (without GTK packages)
|
||||
|
||||
zypper in -t pattern devel_basis
|
||||
zypper in rustup make cmake libinput-devel libseat-devel libgbm-devel systemd-devel clang-devel llvm-devel gdk-pixbuf-devel cairo-devel pango-devel freetype-devel libexpat-devel libayatana-indicator3-7
|
||||
zypper in rustup make cmake clang-devel libinput-devel libseat-devel libgbm-devel libxkbcommon-devel systemd-devel libdrm-devel expat-devel pcre2-devel libzstd-devel gtk3-devel
|
||||
make
|
||||
sudo make install
|
||||
|
||||
|
||||
+49
-21
@@ -14,6 +14,7 @@ use rog_anime::usb::get_anime_type;
|
||||
use rog_anime::{AnimTime, AnimeDataBuffer, AnimeDiagonal, AnimeGif, AnimeImage, AnimeType, Vec2};
|
||||
use rog_aura::keyboard::{AuraPowerState, LaptopAuraPower};
|
||||
use rog_aura::{self, AuraDeviceType, AuraEffect, PowerZones};
|
||||
use rog_dbus::list_iface_blocking;
|
||||
use rog_dbus::zbus_anime::AnimeProxyBlocking;
|
||||
use rog_dbus::zbus_aura::AuraProxyBlocking;
|
||||
use rog_dbus::zbus_fan_curves::FanCurvesProxyBlocking;
|
||||
@@ -65,7 +66,7 @@ fn main() {
|
||||
}
|
||||
|
||||
let supported_properties = platform_proxy.supported_properties().unwrap();
|
||||
let supported_interfaces = platform_proxy.supported_interfaces().unwrap();
|
||||
let supported_interfaces = list_iface_blocking().unwrap();
|
||||
|
||||
if parsed.version {
|
||||
println!("asusctl v{}", env!("CARGO_PKG_VERSION"));
|
||||
@@ -89,7 +90,10 @@ fn print_error_help(
|
||||
print_info();
|
||||
println!();
|
||||
println!("Supported interfaces:\n\n{:#?}\n", supported_interfaces);
|
||||
println!("Supported properties:\n\n{:#?}\n", supported_properties);
|
||||
println!(
|
||||
"Supported properties on Platform:\n\n{:#?}\n",
|
||||
supported_properties
|
||||
);
|
||||
}
|
||||
|
||||
fn print_info() {
|
||||
@@ -120,12 +124,8 @@ fn check_service(name: &str) -> bool {
|
||||
|
||||
fn find_aura_iface() -> Result<Vec<AuraProxyBlocking<'static>>, Box<dyn std::error::Error>> {
|
||||
let conn = zbus::blocking::Connection::system().unwrap();
|
||||
let f = zbus::blocking::fdo::ObjectManagerProxy::new(
|
||||
&conn,
|
||||
"org.asuslinux.Daemon",
|
||||
"/org/asuslinux",
|
||||
)
|
||||
.unwrap();
|
||||
let f =
|
||||
zbus::blocking::fdo::ObjectManagerProxy::new(&conn, "org.asuslinux.Daemon", "/").unwrap();
|
||||
let interfaces = f.get_managed_objects().unwrap();
|
||||
let mut aura_paths = Vec::new();
|
||||
for v in interfaces.iter() {
|
||||
@@ -203,6 +203,31 @@ fn do_parsed(
|
||||
};
|
||||
let commands: Vec<String> = cmdlist.lines().map(|s| s.to_owned()).collect();
|
||||
for command in commands.iter().filter(|command| {
|
||||
if command.trim().starts_with("fan-curve")
|
||||
&& !supported_interfaces
|
||||
.contains(&"org.asuslinux.FanCurves".to_string())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if command.trim().starts_with("anime")
|
||||
&& !supported_interfaces.contains(&"org.asuslinux.Anime".to_string())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if command.trim().starts_with("slash")
|
||||
&& !supported_interfaces.contains(&"org.asuslinux.Slash".to_string())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if command.trim().starts_with("bios")
|
||||
&& !supported_interfaces.contains(&"org.asuslinux.Platform".to_string())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if !dev_type.is_old_laptop()
|
||||
&& !dev_type.is_tuf_laptop()
|
||||
&& command.trim().starts_with("led-pow-1")
|
||||
@@ -645,25 +670,28 @@ fn handle_led_power_1_do_1866(
|
||||
aura: &AuraProxyBlocking,
|
||||
power: &LedPowerCommand1,
|
||||
) -> Result<(), Box<dyn std::error::Error>> {
|
||||
let zone = if power.keyboard && power.lightbar {
|
||||
PowerZones::KeyboardAndLightbar
|
||||
} else if power.lightbar {
|
||||
PowerZones::Lightbar
|
||||
} else {
|
||||
PowerZones::Keyboard
|
||||
};
|
||||
let states = LaptopAuraPower {
|
||||
states: vec![AuraPowerState {
|
||||
zone,
|
||||
let mut states = Vec::new();
|
||||
if power.keyboard {
|
||||
states.push(AuraPowerState {
|
||||
zone: PowerZones::Keyboard,
|
||||
boot: power.boot.unwrap_or_default(),
|
||||
awake: power.awake.unwrap_or_default(),
|
||||
sleep: power.sleep.unwrap_or_default(),
|
||||
shutdown: false,
|
||||
}],
|
||||
};
|
||||
});
|
||||
}
|
||||
if power.lightbar {
|
||||
states.push(AuraPowerState {
|
||||
zone: PowerZones::Lightbar,
|
||||
boot: power.boot.unwrap_or_default(),
|
||||
awake: power.awake.unwrap_or_default(),
|
||||
sleep: power.sleep.unwrap_or_default(),
|
||||
shutdown: false,
|
||||
});
|
||||
}
|
||||
|
||||
let states = LaptopAuraPower { states };
|
||||
aura.set_led_power(states)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,10 @@ edition.workspace = true
|
||||
name = "asusd-user"
|
||||
path = "src/daemon.rs"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
local_data = []
|
||||
|
||||
[dependencies]
|
||||
dirs.workspace = true
|
||||
smol.workspace = true
|
||||
|
||||
@@ -11,8 +11,7 @@ use rog_aura::aura_detection::LedSupportData;
|
||||
use rog_aura::keyboard::KeyLayout;
|
||||
use rog_dbus::zbus_anime::AnimeProxyBlocking;
|
||||
use rog_dbus::zbus_aura::AuraProxyBlocking;
|
||||
use rog_dbus::zbus_platform::PlatformProxyBlocking;
|
||||
use rog_dbus::DBUS_NAME;
|
||||
use rog_dbus::{list_iface_blocking, DBUS_NAME};
|
||||
use smol::Executor;
|
||||
use zbus::Connection;
|
||||
|
||||
@@ -36,18 +35,14 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
println!("rog-platform v{}", rog_platform::VERSION);
|
||||
|
||||
let conn = zbus::blocking::Connection::system().unwrap();
|
||||
let platform_proxy = PlatformProxyBlocking::new(&conn).unwrap();
|
||||
|
||||
let supported = platform_proxy
|
||||
.supported_interfaces()
|
||||
.unwrap_or_default()
|
||||
.contains(&"Anime".to_string());
|
||||
let supported = list_iface_blocking()?;
|
||||
let config = ConfigBase::new().load();
|
||||
let executor = Executor::new();
|
||||
|
||||
let early_return = Arc::new(AtomicBool::new(false));
|
||||
// Set up the anime data and run loop/thread
|
||||
if supported {
|
||||
if supported.contains(&"org.asuslinux.Anime".to_string()) {
|
||||
if let Some(cfg) = config.active_anime {
|
||||
let anime_type = get_anime_type()?;
|
||||
let anime_config = ConfigAnime::new().set_name(cfg).load();
|
||||
|
||||
+10
-78
@@ -1,4 +1,4 @@
|
||||
use config_traits::{StdConfig, StdConfigLoad3};
|
||||
use config_traits::{StdConfig, StdConfigLoad1};
|
||||
use rog_platform::cpu::CPUEPP;
|
||||
use rog_platform::platform::ThrottlePolicy;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
@@ -22,8 +22,12 @@ pub struct Config {
|
||||
pub throttle_policy_linked_epp: bool,
|
||||
/// Which throttle/profile to use on battery power
|
||||
pub throttle_policy_on_battery: ThrottlePolicy,
|
||||
/// Should the throttle policy be set on bat/ac change?
|
||||
pub change_throttle_policy_on_battery: bool,
|
||||
/// Which throttle/profile to use on AC power
|
||||
pub throttle_policy_on_ac: ThrottlePolicy,
|
||||
/// Should the throttle policy be set on bat/ac change?
|
||||
pub change_throttle_policy_on_ac: bool,
|
||||
/// The energy_performance_preference for this throttle/platform profile
|
||||
pub throttle_quiet_epp: CPUEPP,
|
||||
/// The energy_performance_preference for this throttle/platform profile
|
||||
@@ -68,7 +72,9 @@ impl Default for Config {
|
||||
bat_command: Default::default(),
|
||||
throttle_policy_linked_epp: true,
|
||||
throttle_policy_on_battery: ThrottlePolicy::Quiet,
|
||||
change_throttle_policy_on_battery: true,
|
||||
throttle_policy_on_ac: ThrottlePolicy::Performance,
|
||||
change_throttle_policy_on_ac: true,
|
||||
throttle_quiet_epp: CPUEPP::Power,
|
||||
throttle_balanced_epp: CPUEPP::BalancePower,
|
||||
throttle_performance_epp: CPUEPP::Performance,
|
||||
@@ -106,7 +112,7 @@ impl StdConfig for Config {
|
||||
}
|
||||
}
|
||||
|
||||
impl StdConfigLoad3<Config472, Config506, Config507> for Config {}
|
||||
impl StdConfigLoad1<Config507> for Config {}
|
||||
|
||||
#[derive(Deserialize, Serialize)]
|
||||
pub struct Config507 {
|
||||
@@ -142,7 +148,9 @@ impl From<Config507> for Config {
|
||||
mini_led_mode: c.mini_led_mode,
|
||||
throttle_policy_linked_epp: true,
|
||||
throttle_policy_on_battery: c.platform_policy_on_battery,
|
||||
change_throttle_policy_on_battery: true,
|
||||
throttle_policy_on_ac: c.platform_policy_on_ac,
|
||||
change_throttle_policy_on_ac: true,
|
||||
throttle_quiet_epp: CPUEPP::Power,
|
||||
throttle_balanced_epp: CPUEPP::BalancePower,
|
||||
throttle_performance_epp: CPUEPP::Performance,
|
||||
@@ -157,79 +165,3 @@ impl From<Config507> for Config {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Serialize)]
|
||||
pub struct Config506 {
|
||||
/// Save charge limit for restoring on boot
|
||||
pub charge_control_end_threshold: u8,
|
||||
pub panel_od: bool,
|
||||
pub mini_led_mode: bool,
|
||||
pub disable_nvidia_powerd_on_battery: bool,
|
||||
pub ac_command: String,
|
||||
pub bat_command: String,
|
||||
/// Restored on boot as well as when power is plugged
|
||||
#[serde(skip)]
|
||||
pub platform_policy_to_restore: ThrottlePolicy,
|
||||
pub platform_policy_on_battery: ThrottlePolicy,
|
||||
pub platform_policy_on_ac: ThrottlePolicy,
|
||||
//
|
||||
pub ppt_pl1_spl: Option<u8>,
|
||||
pub ppt_pl2_sppt: Option<u8>,
|
||||
pub ppt_fppt: Option<u8>,
|
||||
pub ppt_apu_sppt: Option<u8>,
|
||||
pub ppt_platform_sppt: Option<u8>,
|
||||
pub nv_dynamic_boost: Option<u8>,
|
||||
pub nv_temp_target: Option<u8>,
|
||||
}
|
||||
|
||||
impl From<Config506> for Config {
|
||||
fn from(c: Config506) -> Self {
|
||||
Self {
|
||||
charge_control_end_threshold: c.charge_control_end_threshold,
|
||||
panel_od: c.panel_od,
|
||||
boot_sound: false,
|
||||
disable_nvidia_powerd_on_battery: c.disable_nvidia_powerd_on_battery,
|
||||
ac_command: c.ac_command,
|
||||
bat_command: c.bat_command,
|
||||
mini_led_mode: c.mini_led_mode,
|
||||
throttle_policy_linked_epp: true,
|
||||
throttle_policy_on_battery: c.platform_policy_on_battery,
|
||||
throttle_policy_on_ac: c.platform_policy_on_ac,
|
||||
throttle_quiet_epp: CPUEPP::Power,
|
||||
throttle_balanced_epp: CPUEPP::BalancePower,
|
||||
throttle_performance_epp: CPUEPP::Performance,
|
||||
ppt_pl1_spl: c.ppt_pl1_spl,
|
||||
ppt_pl2_sppt: c.ppt_pl2_sppt,
|
||||
ppt_fppt: c.ppt_fppt,
|
||||
ppt_apu_sppt: c.ppt_apu_sppt,
|
||||
ppt_platform_sppt: c.ppt_platform_sppt,
|
||||
nv_dynamic_boost: c.nv_dynamic_boost,
|
||||
nv_temp_target: c.nv_temp_target,
|
||||
last_power_plugged: 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Serialize)]
|
||||
pub struct Config472 {
|
||||
/// Save charge limit for restoring on boot
|
||||
pub bat_charge_limit: u8,
|
||||
pub panel_od: bool,
|
||||
pub mini_led_mode: bool,
|
||||
pub disable_nvidia_powerd_on_battery: bool,
|
||||
pub ac_command: String,
|
||||
pub bat_command: String,
|
||||
}
|
||||
|
||||
impl From<Config472> for Config {
|
||||
fn from(c: Config472) -> Self {
|
||||
Self {
|
||||
charge_control_end_threshold: c.bat_charge_limit,
|
||||
panel_od: c.panel_od,
|
||||
disable_nvidia_powerd_on_battery: true,
|
||||
ac_command: c.ac_command,
|
||||
bat_command: c.bat_command,
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
use std::collections::{BTreeMap, HashSet};
|
||||
|
||||
use config_traits::{StdConfig, StdConfigLoad};
|
||||
use dmi_id::DMIID;
|
||||
use inotify::Inotify;
|
||||
use log::{debug, info, warn};
|
||||
use rog_aura::aura_detection::LedSupportData;
|
||||
@@ -10,19 +11,23 @@ use rog_aura::{
|
||||
AuraDeviceType, AuraEffect, Direction, LedBrightness, Speed, GRADIENT, LED_MSG_LEN,
|
||||
};
|
||||
use rog_platform::hid_raw::HidRaw;
|
||||
use rog_platform::keyboard_led::KeyboardLed;
|
||||
use rog_platform::keyboard_led::KeyboardBacklight;
|
||||
use udev::Device;
|
||||
use zbus::zvariant::OwnedObjectPath;
|
||||
use zbus::Connection;
|
||||
|
||||
use super::config::AuraConfig;
|
||||
use crate::ctrl_aura::manager::{dbus_path_for_dev, dbus_path_for_tuf};
|
||||
use crate::ctrl_aura::manager::{dbus_path_for_dev, dbus_path_for_tuf, start_tasks};
|
||||
use crate::ctrl_aura::trait_impls::CtrlAuraZbus;
|
||||
use crate::error::RogError;
|
||||
use crate::CtrlTask;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum LEDNode {
|
||||
/// Brightness and/or TUF RGB controls
|
||||
KbdLed(KeyboardLed),
|
||||
KbdLed(KeyboardBacklight),
|
||||
/// Raw HID handle
|
||||
Rog(KeyboardLed, HidRaw),
|
||||
Rog(Option<KeyboardBacklight>, HidRaw),
|
||||
}
|
||||
|
||||
impl LEDNode {
|
||||
@@ -30,7 +35,22 @@ impl LEDNode {
|
||||
pub fn set_brightness(&self, value: u8) -> Result<(), RogError> {
|
||||
match self {
|
||||
LEDNode::KbdLed(k) => k.set_brightness(value)?,
|
||||
LEDNode::Rog(k, _) => k.set_brightness(value)?,
|
||||
LEDNode::Rog(k, r) => {
|
||||
if let Some(k) = k {
|
||||
k.set_brightness(value)?;
|
||||
let x = k.get_brightness()?;
|
||||
if x != value {
|
||||
debug!(
|
||||
"Kernel brightness control didn't read back correct value, setting \
|
||||
with raw hid"
|
||||
);
|
||||
r.write_bytes(&[0x5a, 0xba, 0xc5, 0xc4, value])?;
|
||||
}
|
||||
} else {
|
||||
debug!("No brightness control found, trying raw write");
|
||||
r.write_bytes(&[0x5a, 0xba, 0xc5, 0xc4, value])?;
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
@@ -38,16 +58,47 @@ impl LEDNode {
|
||||
pub fn get_brightness(&self) -> Result<u8, RogError> {
|
||||
Ok(match self {
|
||||
LEDNode::KbdLed(k) => k.get_brightness()?,
|
||||
LEDNode::Rog(k, _) => k.get_brightness()?,
|
||||
LEDNode::Rog(k, _) => {
|
||||
if let Some(k) = k {
|
||||
k.get_brightness()?
|
||||
} else {
|
||||
debug!("No brightness control found");
|
||||
return Err(RogError::MissingFunction(
|
||||
"No keyboard brightness control found".to_string(),
|
||||
));
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
pub fn monitor_brightness(&self) -> Result<Inotify, RogError> {
|
||||
Ok(match self {
|
||||
LEDNode::KbdLed(k) => k.monitor_brightness()?,
|
||||
LEDNode::Rog(k, _) => k.monitor_brightness()?,
|
||||
LEDNode::Rog(k, _) => {
|
||||
if let Some(k) = k {
|
||||
k.monitor_brightness()?
|
||||
} else {
|
||||
debug!("No brightness control found");
|
||||
return Err(RogError::MissingFunction(
|
||||
"No keyboard brightness control found".to_string(),
|
||||
));
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
pub fn has_brightness_control(&self) -> bool {
|
||||
match self {
|
||||
LEDNode::KbdLed(k) => k.has_brightness(),
|
||||
LEDNode::Rog(k, _) => {
|
||||
if let Some(k) = k {
|
||||
k.has_brightness()
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Individual controller for one Aura device
|
||||
@@ -61,10 +112,85 @@ pub struct CtrlKbdLed {
|
||||
}
|
||||
|
||||
impl CtrlKbdLed {
|
||||
pub fn add_to_dbus_and_start(
|
||||
self,
|
||||
interfaces: &mut HashSet<OwnedObjectPath>,
|
||||
conn: Connection,
|
||||
) -> Result<(), RogError> {
|
||||
let dbus_path = self.dbus_path.clone();
|
||||
let dbus_path_cpy = self.dbus_path.clone();
|
||||
info!(
|
||||
"AuraManager starting device at: {:?}, {:?}",
|
||||
dbus_path, self.led_type
|
||||
);
|
||||
let conn_copy = conn.clone();
|
||||
let sig_ctx1 = CtrlAuraZbus::signal_context(&conn_copy)?;
|
||||
let sig_ctx2 = CtrlAuraZbus::signal_context(&conn_copy)?;
|
||||
let zbus = CtrlAuraZbus::new(self, sig_ctx1);
|
||||
tokio::spawn(
|
||||
async move { start_tasks(zbus, conn_copy.clone(), sig_ctx2, dbus_path).await },
|
||||
);
|
||||
interfaces.insert(dbus_path_cpy);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Build and init a `CtrlKbdLed` from a udev device. Maybe.
|
||||
/// This will initialise the config also.
|
||||
pub fn maybe_device(
|
||||
device: Device,
|
||||
interfaces: &mut HashSet<OwnedObjectPath>,
|
||||
) -> Result<Option<Self>, RogError> {
|
||||
// usb_device gives us a product and vendor ID
|
||||
if let Some(usb_device) = device.parent_with_subsystem_devtype("usb", "usb_device")? {
|
||||
let dbus_path = dbus_path_for_dev(&usb_device).unwrap_or_default();
|
||||
if interfaces.contains(&dbus_path) {
|
||||
debug!("Already a ctrl at {dbus_path:?}, ignoring this end-point");
|
||||
return Ok(None);
|
||||
}
|
||||
|
||||
// The asus_wmi driver latches MCU that controls the USB endpoints
|
||||
if let Some(parent) = device.parent() {
|
||||
if let Some(driver) = parent.driver() {
|
||||
// There is a tree of devices added so filter by driver
|
||||
if driver != "asus" {
|
||||
return Ok(None);
|
||||
}
|
||||
} else {
|
||||
return Ok(None);
|
||||
}
|
||||
}
|
||||
// Device is something like 002, while its parent is the MCU
|
||||
// Think of it like the device is an endpoint of the USB device attached
|
||||
let mut prod_id = String::new();
|
||||
if let Some(usb_id) = usb_device.attribute_value("idProduct") {
|
||||
prod_id = usb_id.to_string_lossy().to_string();
|
||||
let aura_device = AuraDeviceType::from(prod_id.as_str());
|
||||
if aura_device == AuraDeviceType::Unknown {
|
||||
log::debug!("Unknown or invalid device: {usb_id:?}, skipping");
|
||||
return Ok(None);
|
||||
}
|
||||
}
|
||||
|
||||
let dev_node = if let Some(dev_node) = usb_device.devnode() {
|
||||
dev_node
|
||||
} else {
|
||||
debug!("Device has no devnode, skipping");
|
||||
return Ok(None);
|
||||
};
|
||||
info!("AuraControl found device at: {:?}", dev_node);
|
||||
let dev = HidRaw::from_device(device)?;
|
||||
let mut controller = Self::from_hidraw(dev, dbus_path.clone())?;
|
||||
controller.config = Self::init_config(&prod_id);
|
||||
interfaces.insert(dbus_path);
|
||||
return Ok(Some(controller));
|
||||
}
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
pub fn find_all() -> Result<Vec<Self>, RogError> {
|
||||
info!("Searching for all Aura devices");
|
||||
let mut devices = Vec::new();
|
||||
let mut found = HashSet::new(); // track and ensure we use only one hidraw per prod_id
|
||||
let mut interfaces = HashSet::new(); // track and ensure we use only one hidraw per prod_id
|
||||
|
||||
let mut enumerator = udev::Enumerator::new().map_err(|err| {
|
||||
warn!("{}", err);
|
||||
@@ -77,63 +203,37 @@ impl CtrlKbdLed {
|
||||
})?;
|
||||
|
||||
for end_point in enumerator.scan_devices()? {
|
||||
// usb_device gives us a product and vendor ID
|
||||
if let Some(usb_device) =
|
||||
end_point.parent_with_subsystem_devtype("usb", "usb_device")?
|
||||
{
|
||||
// The asus_wmi driver latches MCU that controls the USB endpoints
|
||||
if let Some(parent) = end_point.parent() {
|
||||
if let Some(driver) = parent.driver() {
|
||||
// There is a tree of devices added so filter by driver
|
||||
if driver != "asus" {
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// Device is something like 002, while its parent is the MCU
|
||||
// Think of it like the device is an endpoint of the USB device attached
|
||||
let mut prod_id = String::new();
|
||||
if let Some(usb_id) = usb_device.attribute_value("idProduct") {
|
||||
prod_id = usb_id.to_string_lossy().to_string();
|
||||
let aura_dev = AuraDeviceType::from(prod_id.as_str());
|
||||
if aura_dev == AuraDeviceType::Unknown || found.contains(&aura_dev) {
|
||||
log::debug!("Unknown or invalid device: {usb_id:?}, skipping");
|
||||
continue;
|
||||
}
|
||||
found.insert(aura_dev);
|
||||
}
|
||||
|
||||
let dev_node = if let Some(dev_node) = usb_device.devnode() {
|
||||
dev_node
|
||||
} else {
|
||||
debug!("Device has no devnode, skipping");
|
||||
continue;
|
||||
};
|
||||
info!("AuraControl found device at: {:?}", dev_node);
|
||||
let dbus_path = dbus_path_for_dev(&usb_device).unwrap_or_default();
|
||||
let dev = HidRaw::from_device(end_point)?;
|
||||
let mut dev = Self::from_hidraw(dev, dbus_path)?;
|
||||
dev.config = Self::init_config(&prod_id);
|
||||
devices.push(dev);
|
||||
// maybe?
|
||||
if let Some(device) = Self::maybe_device(end_point, &mut interfaces)? {
|
||||
devices.push(device);
|
||||
}
|
||||
}
|
||||
|
||||
// Check for a TUF laptop LED. Assume there is only ever one.
|
||||
if let Ok(kbd_backlight) = KeyboardLed::new() {
|
||||
if let Ok(kbd_backlight) = KeyboardBacklight::new() {
|
||||
if kbd_backlight.has_kbd_rgb_mode() {
|
||||
info!("AuraControl found a TUF laptop keyboard");
|
||||
let ctrl = CtrlKbdLed {
|
||||
led_type: AuraDeviceType::LaptopTuf,
|
||||
led_node: LEDNode::KbdLed(kbd_backlight),
|
||||
supported_data: LedSupportData::get_data("tuf"),
|
||||
per_key_mode_active: false,
|
||||
config: Self::init_config("tuf"),
|
||||
dbus_path: dbus_path_for_tuf(),
|
||||
};
|
||||
devices.push(ctrl);
|
||||
// Extra sure double-check that this isn't a laptop with crap
|
||||
// ACPI with borked return on the TUF rgb methods
|
||||
let dmi = DMIID::new().unwrap_or_default();
|
||||
info!("Found a TUF with product family: {}", dmi.product_family);
|
||||
info!("and board name: {}", dmi.board_name);
|
||||
|
||||
if dmi.product_family.contains("TUF") {
|
||||
info!("AuraControl found a TUF laptop keyboard");
|
||||
let ctrl = CtrlKbdLed {
|
||||
led_type: AuraDeviceType::LaptopTuf,
|
||||
led_node: LEDNode::KbdLed(kbd_backlight),
|
||||
supported_data: LedSupportData::get_data("tuf"),
|
||||
per_key_mode_active: false,
|
||||
config: Self::init_config("tuf"),
|
||||
dbus_path: dbus_path_for_tuf(),
|
||||
};
|
||||
devices.push(ctrl);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let dmi = DMIID::new().unwrap_or_default();
|
||||
warn!("No asus::kbd_backlight found for {} ??", dmi.product_family);
|
||||
}
|
||||
|
||||
info!("Found {} Aura devices", devices.len());
|
||||
@@ -145,7 +245,14 @@ impl CtrlKbdLed {
|
||||
/// should be overwritten. The reason for the default config is because
|
||||
/// of async issues between this and udev/hidraw
|
||||
pub fn from_hidraw(device: HidRaw, dbus_path: OwnedObjectPath) -> Result<Self, RogError> {
|
||||
let rgb_led = KeyboardLed::new()?;
|
||||
let rgb_led = KeyboardBacklight::new()
|
||||
.map_err(|e| {
|
||||
log::error!(
|
||||
"{} is missing a keyboard backlight brightness control: {e:?}",
|
||||
device.prod_id()
|
||||
);
|
||||
})
|
||||
.ok();
|
||||
let prod_id = AuraDeviceType::from(device.prod_id());
|
||||
if prod_id == AuraDeviceType::Unknown {
|
||||
log::error!("{} is AuraDevice::Unknown", device.prod_id());
|
||||
@@ -208,13 +315,10 @@ impl CtrlKbdLed {
|
||||
/// 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> {
|
||||
if let LEDNode::KbdLed(_platform) = &mut self.led_node {
|
||||
if let LEDNode::KbdLed(platform) = &mut self.led_node {
|
||||
// TODO: tuf bool array
|
||||
// if let Some(pwr) =
|
||||
// AuraPowerConfig::to_tuf_bool_array(&self.config.enabled) {
|
||||
// let buf = [1, pwr[1] as u8, pwr[2] as u8, pwr[3] as u8,
|
||||
// pwr[4] as u8]; platform.set_kbd_rgb_state(&buf)?;
|
||||
// }
|
||||
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]];
|
||||
@@ -364,7 +468,7 @@ mod tests {
|
||||
use rog_aura::aura_detection::LedSupportData;
|
||||
use rog_aura::{AuraDeviceType, AuraModeNum, AuraZone, PowerZones};
|
||||
use rog_platform::hid_raw::HidRaw;
|
||||
use rog_platform::keyboard_led::KeyboardLed;
|
||||
use rog_platform::keyboard_led::KeyboardBacklight;
|
||||
use zbus::zvariant::OwnedObjectPath;
|
||||
|
||||
use super::CtrlKbdLed;
|
||||
@@ -387,7 +491,10 @@ mod tests {
|
||||
};
|
||||
let mut controller = CtrlKbdLed {
|
||||
led_type: AuraDeviceType::LaptopPost2021,
|
||||
led_node: LEDNode::Rog(KeyboardLed::default(), HidRaw::new("19b6").unwrap()),
|
||||
led_node: LEDNode::Rog(
|
||||
Some(KeyboardBacklight::default()),
|
||||
HidRaw::new("19b6").unwrap(),
|
||||
),
|
||||
supported_data: supported_basic_modes,
|
||||
per_key_mode_active: false,
|
||||
config,
|
||||
@@ -428,7 +535,10 @@ mod tests {
|
||||
};
|
||||
let mut controller = CtrlKbdLed {
|
||||
led_type: AuraDeviceType::LaptopPost2021,
|
||||
led_node: LEDNode::Rog(KeyboardLed::default(), HidRaw::new("19b6").unwrap()),
|
||||
led_node: LEDNode::Rog(
|
||||
Some(KeyboardBacklight::default()),
|
||||
HidRaw::new("19b6").unwrap(),
|
||||
),
|
||||
supported_data: supported_basic_modes,
|
||||
per_key_mode_active: false,
|
||||
config,
|
||||
|
||||
@@ -6,10 +6,8 @@
|
||||
|
||||
use std::collections::HashSet;
|
||||
|
||||
use log::{debug, error, info, warn};
|
||||
use log::{error, info, warn};
|
||||
use mio::{Events, Interest, Poll, Token};
|
||||
use rog_aura::AuraDeviceType;
|
||||
use rog_platform::hid_raw::HidRaw;
|
||||
use tokio::task::spawn_blocking;
|
||||
use udev::{Device, MonitorBuilder};
|
||||
use zbus::object_server::SignalContext;
|
||||
@@ -59,93 +57,42 @@ impl AuraManager {
|
||||
continue;
|
||||
}
|
||||
for event in monitor.iter() {
|
||||
let parent = if let Some(parent) =
|
||||
let action = event.action().unwrap_or_default();
|
||||
|
||||
if let Some(parent) =
|
||||
event.parent_with_subsystem_devtype("usb", "usb_device")?
|
||||
{
|
||||
parent
|
||||
} else {
|
||||
continue;
|
||||
};
|
||||
|
||||
let action = if let Some(action) = event.action() {
|
||||
action
|
||||
} else {
|
||||
continue;
|
||||
};
|
||||
|
||||
let id_product = if let Some(id_product) = parent.attribute_value("idProduct") {
|
||||
id_product.to_string_lossy()
|
||||
} else {
|
||||
continue;
|
||||
};
|
||||
|
||||
let path = if let Some(path) = dbus_path_for_dev(&parent) {
|
||||
path
|
||||
} else {
|
||||
continue;
|
||||
};
|
||||
|
||||
let aura_device = AuraDeviceType::from(&*id_product);
|
||||
if aura_device == AuraDeviceType::Unknown {
|
||||
warn!("idProduct:{id_product:?} is unknown, not using");
|
||||
continue;
|
||||
}
|
||||
|
||||
if action == "remove" {
|
||||
if interfaces.remove(&path) {
|
||||
info!("AuraManager removing: {path:?}");
|
||||
let conn_copy = conn_copy.clone();
|
||||
tokio::spawn(async move {
|
||||
let res = conn_copy
|
||||
.object_server()
|
||||
.remove::<CtrlAuraZbus, _>(&path)
|
||||
.await
|
||||
.map_err(|e| {
|
||||
error!("Failed to remove {path:?}, {e:?}");
|
||||
e
|
||||
})?;
|
||||
info!("AuraManager removed: {path:?}, {res}");
|
||||
Ok::<(), RogError>(())
|
||||
});
|
||||
}
|
||||
} else if action == "add" {
|
||||
if interfaces.contains(&path) {
|
||||
debug!("Already a ctrl at {path:?}");
|
||||
continue;
|
||||
}
|
||||
|
||||
// Need to check the driver is asus to prevent using hid_generic
|
||||
if let Some(p2) = event.parent() {
|
||||
if let Some(driver) = p2.driver() {
|
||||
// There is a tree of devices added so filter by driver
|
||||
if driver != "asus" {
|
||||
debug!("{id_product:?} driver was not asus, skipping");
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(dev_node) = event.devnode() {
|
||||
if let Ok(raw) = HidRaw::from_device(event.device())
|
||||
.map_err(|e| error!("device path error: {e:?}"))
|
||||
{
|
||||
if let Ok(mut ctrl) = CtrlKbdLed::from_hidraw(raw, path.clone()) {
|
||||
ctrl.config = CtrlKbdLed::init_config(&id_product);
|
||||
interfaces.insert(path.clone());
|
||||
info!("AuraManager starting device at: {dev_node:?}, {path:?}");
|
||||
let sig_ctx = CtrlAuraZbus::signal_context(&conn_copy)?;
|
||||
let zbus = CtrlAuraZbus::new(ctrl, sig_ctx);
|
||||
let sig_ctx = CtrlAuraZbus::signal_context(&conn_copy)?;
|
||||
if action == "remove" {
|
||||
if let Some(path) = dbus_path_for_dev(&parent) {
|
||||
if interfaces.remove(&path) {
|
||||
info!("AuraManager removing: {path:?}");
|
||||
let conn_copy = conn_copy.clone();
|
||||
tokio::spawn(async move {
|
||||
start_tasks(zbus, conn_copy.clone(), sig_ctx, path).await
|
||||
let res = conn_copy
|
||||
.object_server()
|
||||
.remove::<CtrlAuraZbus, _>(&path)
|
||||
.await
|
||||
.map_err(|e| {
|
||||
error!("Failed to remove {path:?}, {e:?}");
|
||||
e
|
||||
})?;
|
||||
info!("AuraManager removed: {path:?}, {res}");
|
||||
Ok::<(), RogError>(())
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
} else if action == "add" {
|
||||
if let Ok(Some(ctrl)) =
|
||||
CtrlKbdLed::maybe_device(event.device(), &mut interfaces)
|
||||
{
|
||||
ctrl.add_to_dbus_and_start(&mut interfaces, conn_copy.clone())
|
||||
.map_err(|e| {
|
||||
error!("Couldn't start aura device on dbus: {e:?}")
|
||||
})
|
||||
.ok();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
// Required for return type on spawn
|
||||
@@ -169,7 +116,7 @@ pub(crate) fn dbus_path_for_tuf() -> OwnedObjectPath {
|
||||
ObjectPath::from_str_unchecked(&format!("{AURA_ZBUS_PATH}/tuf")).into()
|
||||
}
|
||||
|
||||
async fn start_tasks(
|
||||
pub async fn start_tasks(
|
||||
mut zbus: CtrlAuraZbus,
|
||||
connection: Connection,
|
||||
_signal_ctx: SignalContext<'static>,
|
||||
@@ -180,7 +127,12 @@ async fn start_tasks(
|
||||
zbus.reload()
|
||||
.await
|
||||
.unwrap_or_else(|err| warn!("Controller error: {}", err));
|
||||
connection.object_server().at(path, zbus).await.unwrap();
|
||||
connection
|
||||
.object_server()
|
||||
.at(path.clone(), zbus)
|
||||
.await
|
||||
.map_err(|e| error!("Couldn't add server at path: {path}, {e:?}"))
|
||||
.ok();
|
||||
// TODO: skip this until we keep handles to tasks so they can be killed
|
||||
// task.create_tasks(signal_ctx).await
|
||||
Ok(())
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
use log::warn;
|
||||
use udev::Device;
|
||||
use zbus::zvariant::{ObjectPath, OwnedObjectPath};
|
||||
|
||||
@@ -12,7 +13,7 @@ pub mod trait_impls;
|
||||
pub(super) fn filename_partial(parent: &Device) -> Option<OwnedObjectPath> {
|
||||
if let Some(id_product) = parent.attribute_value("idProduct") {
|
||||
let id_product = id_product.to_string_lossy();
|
||||
let path = if let Some(devnum) = parent.attribute_value("devnum") {
|
||||
let mut path = if let Some(devnum) = parent.attribute_value("devnum") {
|
||||
let devnum = devnum.to_string_lossy();
|
||||
if let Some(devpath) = parent.attribute_value("devpath") {
|
||||
let devpath = devpath.to_string_lossy();
|
||||
@@ -23,6 +24,10 @@ pub(super) fn filename_partial(parent: &Device) -> Option<OwnedObjectPath> {
|
||||
} else {
|
||||
format!("{id_product}")
|
||||
};
|
||||
if path.contains('.') {
|
||||
warn!("dbus path for {id_product} contains `.`, removing");
|
||||
path.replace('.', "").clone_into(&mut path);
|
||||
}
|
||||
return Some(ObjectPath::from_str_unchecked(&path).into());
|
||||
}
|
||||
None
|
||||
|
||||
@@ -26,7 +26,7 @@ impl CtrlAuraZbus {
|
||||
}
|
||||
|
||||
fn update_config(lock: &mut CtrlKbdLed) -> Result<(), RogError> {
|
||||
let bright = lock.led_node.get_brightness()?;
|
||||
let bright = lock.led_node.get_brightness().unwrap_or_default();
|
||||
lock.config.read();
|
||||
lock.config.brightness = bright.into();
|
||||
lock.config.write();
|
||||
@@ -109,8 +109,10 @@ impl CtrlAuraZbus {
|
||||
if ctrl.config.brightness == LedBrightness::Off {
|
||||
ctrl.config.brightness = LedBrightness::Med;
|
||||
}
|
||||
ctrl.led_node
|
||||
.set_brightness(ctrl.config.brightness.into())?;
|
||||
if ctrl.led_node.has_brightness_control() {
|
||||
ctrl.led_node
|
||||
.set_brightness(ctrl.config.brightness.into())?;
|
||||
}
|
||||
ctrl.config.write();
|
||||
|
||||
self.led_mode_data_invalidate(&self.1).await.ok();
|
||||
@@ -148,8 +150,10 @@ impl CtrlAuraZbus {
|
||||
if ctrl.config.brightness == LedBrightness::Off {
|
||||
ctrl.config.brightness = LedBrightness::Med;
|
||||
}
|
||||
ctrl.led_node
|
||||
.set_brightness(ctrl.config.brightness.into())?;
|
||||
if ctrl.led_node.has_brightness_control() {
|
||||
ctrl.led_node
|
||||
.set_brightness(ctrl.config.brightness.into())?;
|
||||
}
|
||||
ctrl.config.set_builtin(effect);
|
||||
ctrl.config.write();
|
||||
|
||||
@@ -213,12 +217,14 @@ impl CtrlTask for CtrlAuraZbus {
|
||||
// If waking up
|
||||
if !start {
|
||||
info!("CtrlKbdLedTask reloading brightness and modes");
|
||||
lock.led_node
|
||||
.set_brightness(lock.config.brightness.into())
|
||||
.map_err(|e| {
|
||||
error!("CtrlKbdLedTask: {e}");
|
||||
e
|
||||
})?;
|
||||
if lock.led_node.has_brightness_control() {
|
||||
lock.led_node
|
||||
.set_brightness(lock.config.brightness.into())
|
||||
.map_err(|e| {
|
||||
error!("CtrlKbdLedTask: {e}");
|
||||
e
|
||||
})?;
|
||||
}
|
||||
lock.write_current_config_mode().map_err(|e| {
|
||||
error!("CtrlKbdLedTask: {e}");
|
||||
e
|
||||
@@ -264,20 +270,24 @@ impl CtrlTask for CtrlAuraZbus {
|
||||
|
||||
let ctrl2 = self.0.clone();
|
||||
let ctrl = self.0.lock().await;
|
||||
let watch = ctrl.led_node.monitor_brightness()?;
|
||||
tokio::spawn(async move {
|
||||
let mut buffer = [0; 32];
|
||||
watch
|
||||
.into_event_stream(&mut buffer)
|
||||
.unwrap()
|
||||
.for_each(|_| async {
|
||||
if let Some(lock) = ctrl2.try_lock() {
|
||||
load_save(true, lock).unwrap(); // unwrap as we want to
|
||||
// bomb out of the task
|
||||
}
|
||||
})
|
||||
.await;
|
||||
});
|
||||
if ctrl.led_node.has_brightness_control() {
|
||||
let watch = ctrl.led_node.monitor_brightness()?;
|
||||
tokio::spawn(async move {
|
||||
let mut buffer = [0; 32];
|
||||
watch
|
||||
.into_event_stream(&mut buffer)
|
||||
.unwrap()
|
||||
.for_each(|_| async {
|
||||
if let Some(lock) = ctrl2.try_lock() {
|
||||
load_save(true, lock).unwrap(); // unwrap as we want
|
||||
// to
|
||||
// bomb out of the
|
||||
// task
|
||||
}
|
||||
})
|
||||
.await;
|
||||
});
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
+65
-66
@@ -9,17 +9,12 @@ use rog_platform::platform::{GpuMode, Properties, RogPlatform, ThrottlePolicy};
|
||||
use rog_platform::power::AsusPower;
|
||||
use zbus::export::futures_util::lock::Mutex;
|
||||
use zbus::fdo::Error as FdoErr;
|
||||
use zbus::{interface, Connection, ObjectServer, SignalContext};
|
||||
use zbus::{interface, Connection, SignalContext};
|
||||
|
||||
use crate::config::Config;
|
||||
use crate::ctrl_anime::trait_impls::{CtrlAnimeZbus, ANIME_ZBUS_NAME, ANIME_ZBUS_PATH};
|
||||
use crate::ctrl_aura::trait_impls::{CtrlAuraZbus, AURA_ZBUS_NAME, AURA_ZBUS_PATH};
|
||||
use crate::ctrl_fancurves::{CtrlFanCurveZbus, FAN_CURVE_ZBUS_NAME, FAN_CURVE_ZBUS_PATH};
|
||||
use crate::ctrl_slash::trait_impls::{CtrlSlashZbus, SLASH_ZBUS_NAME, SLASH_ZBUS_PATH};
|
||||
use crate::error::RogError;
|
||||
use crate::{task_watch_item, task_watch_item_notify, CtrlTask, ReloadAndNotify};
|
||||
|
||||
const PLATFORM_ZBUS_NAME: &str = "Platform";
|
||||
const PLATFORM_ZBUS_PATH: &str = "/org/asuslinux";
|
||||
|
||||
macro_rules! platform_get_value {
|
||||
@@ -258,6 +253,21 @@ impl CtrlPlatform {
|
||||
}
|
||||
|
||||
async fn update_policy_ac_or_bat(&self, power_plugged: bool, change_epp: bool) {
|
||||
if power_plugged && !self.config.lock().await.change_throttle_policy_on_ac {
|
||||
debug!(
|
||||
"Power status changed but set_throttle_policy_on_ac set false. Not setting the \
|
||||
thing"
|
||||
);
|
||||
return;
|
||||
}
|
||||
if !power_plugged && !self.config.lock().await.change_throttle_policy_on_battery {
|
||||
debug!(
|
||||
"Power status changed but set_throttle_policy_on_battery set false. Not setting \
|
||||
the thing"
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
let throttle = if power_plugged {
|
||||
self.config.lock().await.throttle_policy_on_ac
|
||||
} else {
|
||||
@@ -328,49 +338,6 @@ impl CtrlPlatform {
|
||||
supported
|
||||
}
|
||||
|
||||
async fn supported_interfaces(
|
||||
&self,
|
||||
#[zbus(object_server)] server: &ObjectServer,
|
||||
) -> Vec<String> {
|
||||
let mut interfaces = Vec::default();
|
||||
if server
|
||||
.interface::<_, CtrlAnimeZbus>(ANIME_ZBUS_PATH)
|
||||
.await
|
||||
.is_ok()
|
||||
{
|
||||
interfaces.push(ANIME_ZBUS_NAME.to_owned());
|
||||
}
|
||||
if server
|
||||
.interface::<_, CtrlAuraZbus>(AURA_ZBUS_PATH)
|
||||
.await
|
||||
.is_ok()
|
||||
{
|
||||
interfaces.push(AURA_ZBUS_NAME.to_owned());
|
||||
}
|
||||
if server
|
||||
.interface::<_, CtrlFanCurveZbus>(FAN_CURVE_ZBUS_PATH)
|
||||
.await
|
||||
.is_ok()
|
||||
{
|
||||
interfaces.push(FAN_CURVE_ZBUS_NAME.to_owned());
|
||||
}
|
||||
if server
|
||||
.interface::<_, CtrlPlatform>(PLATFORM_ZBUS_PATH)
|
||||
.await
|
||||
.is_ok()
|
||||
{
|
||||
interfaces.push(PLATFORM_ZBUS_NAME.to_owned());
|
||||
}
|
||||
if server
|
||||
.interface::<_, CtrlSlashZbus>(SLASH_ZBUS_PATH)
|
||||
.await
|
||||
.is_ok()
|
||||
{
|
||||
interfaces.push(SLASH_ZBUS_NAME.to_owned());
|
||||
}
|
||||
interfaces
|
||||
}
|
||||
|
||||
#[zbus(property)]
|
||||
fn charge_control_end_threshold(&self) -> Result<u8, FdoErr> {
|
||||
let limit = self.power.get_charge_control_end_threshold()?;
|
||||
@@ -496,6 +463,18 @@ impl CtrlPlatform {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[zbus(property)]
|
||||
async fn change_throttle_policy_on_battery(&self) -> Result<bool, FdoErr> {
|
||||
Ok(self.config.lock().await.change_throttle_policy_on_battery)
|
||||
}
|
||||
|
||||
#[zbus(property)]
|
||||
async fn set_change_throttle_policy_on_battery(&mut self, change: bool) -> Result<(), FdoErr> {
|
||||
self.config.lock().await.change_throttle_policy_on_battery = change;
|
||||
self.config.lock().await.write();
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[zbus(property)]
|
||||
async fn throttle_policy_on_ac(&self) -> Result<ThrottlePolicy, FdoErr> {
|
||||
Ok(self.config.lock().await.throttle_policy_on_ac)
|
||||
@@ -509,6 +488,18 @@ impl CtrlPlatform {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[zbus(property)]
|
||||
async fn change_throttle_policy_on_ac(&self) -> Result<bool, FdoErr> {
|
||||
Ok(self.config.lock().await.change_throttle_policy_on_ac)
|
||||
}
|
||||
|
||||
#[zbus(property)]
|
||||
async fn set_change_throttle_policy_on_ac(&mut self, change: bool) -> Result<(), FdoErr> {
|
||||
self.config.lock().await.change_throttle_policy_on_ac = change;
|
||||
self.config.lock().await.write();
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// The energy_performance_preference for the quiet throttle/platform
|
||||
/// profile
|
||||
#[zbus(property)]
|
||||
@@ -731,8 +722,9 @@ impl ReloadAndNotify for CtrlPlatform {
|
||||
info!("asusd.ron updated externally, reloading and updating internal copy");
|
||||
|
||||
if self.power.has_charge_control_end_threshold() {
|
||||
self.power
|
||||
.set_charge_control_end_threshold(data.charge_control_end_threshold)?;
|
||||
let limit = data.charge_control_end_threshold;
|
||||
warn!("setting charge_control_end_threshold to {limit}");
|
||||
self.power.set_charge_control_end_threshold(limit)?;
|
||||
self.charge_control_end_threshold_changed(signal_context)
|
||||
.await?;
|
||||
}
|
||||
@@ -791,6 +783,15 @@ impl ReloadAndNotify for CtrlPlatform {
|
||||
|
||||
impl crate::Reloadable for CtrlPlatform {
|
||||
async fn reload(&mut self) -> Result<(), RogError> {
|
||||
info!("Begin Platform settings restore");
|
||||
if self.power.has_charge_control_end_threshold() {
|
||||
let limit = self.config.lock().await.charge_control_end_threshold;
|
||||
info!("reloading charge_control_end_threshold to {limit}");
|
||||
self.power.set_charge_control_end_threshold(limit)?;
|
||||
} else {
|
||||
warn!("No charge_control_end_threshold found")
|
||||
}
|
||||
|
||||
macro_rules! reload {
|
||||
($property:tt, $prop_name:literal) => {
|
||||
concat_idents::concat_idents!(has = has_, $property {
|
||||
@@ -826,12 +827,6 @@ impl crate::Reloadable for CtrlPlatform {
|
||||
ppt_reload!(nv_dynamic_boost, "nv_dynamic_boost");
|
||||
ppt_reload!(nv_temp_target, "nv_temp_target");
|
||||
|
||||
if self.power.has_charge_control_end_threshold() {
|
||||
self.power.set_charge_control_end_threshold(
|
||||
self.config.lock().await.charge_control_end_threshold,
|
||||
)?;
|
||||
}
|
||||
|
||||
if let Ok(power_plugged) = self.power.get_online() {
|
||||
self.config.lock().await.last_power_plugged = power_plugged;
|
||||
if self.platform.has_throttle_thermal_policy() {
|
||||
@@ -847,11 +842,11 @@ impl crate::Reloadable for CtrlPlatform {
|
||||
}
|
||||
|
||||
impl CtrlPlatform {
|
||||
task_watch_item!(panel_od platform);
|
||||
task_watch_item!(panel_od "panel_od" platform);
|
||||
|
||||
task_watch_item!(mini_led_mode platform);
|
||||
task_watch_item!(mini_led_mode "mini_led_mode" platform);
|
||||
|
||||
task_watch_item!(charge_control_end_threshold power);
|
||||
task_watch_item!(charge_control_end_threshold "charge_control_end_threshold" power);
|
||||
|
||||
task_watch_item_notify!(boot_sound platform);
|
||||
|
||||
@@ -901,12 +896,16 @@ impl CtrlTask for CtrlPlatform {
|
||||
})
|
||||
.ok();
|
||||
}
|
||||
if sleeping && platform1.power.has_charge_control_end_threshold() {
|
||||
platform1.config.lock().await.charge_control_end_threshold = platform1
|
||||
.power
|
||||
.get_charge_control_end_threshold()
|
||||
.unwrap_or(100);
|
||||
} else if !sleeping && platform1.power.has_charge_control_end_threshold() {
|
||||
// This block is commented out due to some kind of issue reported. Maybe the
|
||||
// desktops used were storing a value whcih was then read here.
|
||||
// Don't store it on suspend, assume that the current config setting is desired
|
||||
// if sleeping && platform1.power.has_charge_control_end_threshold() {
|
||||
// platform1.config.lock().await.charge_control_end_threshold = platform1
|
||||
// .power
|
||||
// .get_charge_control_end_threshold()
|
||||
// .unwrap_or(100);
|
||||
// } else
|
||||
if !sleeping && platform1.power.has_charge_control_end_threshold() {
|
||||
platform1
|
||||
.power
|
||||
.set_charge_control_end_threshold(
|
||||
|
||||
@@ -33,6 +33,7 @@ impl CtrlSlashZbus {
|
||||
}
|
||||
|
||||
/// Set enabled true or false
|
||||
#[zbus(property)]
|
||||
async fn set_enabled(&self, enabled: bool) {
|
||||
let mut lock = self.0.lock().await;
|
||||
let brightness = if enabled && lock.config.slash_brightness == 0 {
|
||||
@@ -64,6 +65,7 @@ impl CtrlSlashZbus {
|
||||
}
|
||||
|
||||
/// Set brightness level
|
||||
#[zbus(property)]
|
||||
async fn set_brightness(&self, brightness: u8) {
|
||||
let mut lock = self.0.lock().await;
|
||||
let enabled = brightness > 0;
|
||||
@@ -90,6 +92,7 @@ impl CtrlSlashZbus {
|
||||
}
|
||||
|
||||
/// Set interval between slash animations (0-255)
|
||||
#[zbus(property)]
|
||||
async fn set_interval(&self, interval: u8) {
|
||||
let mut lock = self.0.lock().await;
|
||||
lock.node
|
||||
@@ -114,6 +117,7 @@ impl CtrlSlashZbus {
|
||||
}
|
||||
|
||||
/// Set interval between slash animations (0-255)
|
||||
#[zbus(property)]
|
||||
async fn set_slash_mode(&self, slash_mode: SlashMode) {
|
||||
let mut lock = self.0.lock().await;
|
||||
|
||||
|
||||
+2
-2
@@ -13,7 +13,7 @@ use asusd::ctrl_platform::CtrlPlatform;
|
||||
use asusd::ctrl_slash::trait_impls::CtrlSlashZbus;
|
||||
use asusd::ctrl_slash::CtrlSlash;
|
||||
use asusd::{print_board_info, start_tasks, CtrlTask, DBUS_NAME};
|
||||
use config_traits::{StdConfig, StdConfigLoad3};
|
||||
use config_traits::{StdConfig, StdConfigLoad1};
|
||||
use log::{error, info};
|
||||
use zbus::fdo::ObjectManager;
|
||||
|
||||
@@ -62,7 +62,7 @@ async fn start_daemon() -> Result<(), Box<dyn Error>> {
|
||||
let mut connection = Connection::system().await?;
|
||||
connection
|
||||
.object_server()
|
||||
.at("/org/asuslinux", ObjectManager)
|
||||
.at("/", ObjectManager)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
|
||||
+10
-7
@@ -56,7 +56,7 @@ pub static DBUS_IFACE: &str = "org.asuslinux.Daemon";
|
||||
/// // TODO: this is kind of useless if it can't trigger some action
|
||||
#[macro_export]
|
||||
macro_rules! task_watch_item {
|
||||
($name:ident $self_inner:ident) => {
|
||||
($name:ident $name_str:literal $self_inner:ident) => {
|
||||
concat_idents::concat_idents!(fn_name = watch_, $name {
|
||||
async fn fn_name(
|
||||
&self,
|
||||
@@ -72,12 +72,15 @@ macro_rules! task_watch_item {
|
||||
let mut buffer = [0; 32];
|
||||
watch.into_event_stream(&mut buffer).unwrap().for_each(|_| async {
|
||||
if let Ok(value) = ctrl.$name() { // get new value from zbus method
|
||||
concat_idents::concat_idents!(notif_fn = $name, _changed {
|
||||
ctrl.notif_fn(&signal_ctxt).await.ok();
|
||||
});
|
||||
let mut lock = ctrl.config.lock().await;
|
||||
lock.$name = value;
|
||||
lock.write();
|
||||
if ctrl.config.lock().await.$name != value {
|
||||
log::debug!("{} was changed to {} externally", $name_str, value);
|
||||
concat_idents::concat_idents!(notif_fn = $name, _changed {
|
||||
ctrl.notif_fn(&signal_ctxt).await.ok();
|
||||
});
|
||||
let mut lock = ctrl.config.lock().await;
|
||||
lock.$name = value;
|
||||
lock.write();
|
||||
}
|
||||
}
|
||||
}).await;
|
||||
});
|
||||
|
||||
@@ -20,13 +20,14 @@
|
||||
%global debug_package %{nil}
|
||||
%endif
|
||||
|
||||
%global rpm_dkms_opt 1
|
||||
%define specrelease %{?dist}
|
||||
%define pkg_release 3%{specrelease}
|
||||
|
||||
# Use hardening ldflags.
|
||||
%global rustflags -Clink-arg=-Wl,-z,relro,-z,now
|
||||
Name: asusctl
|
||||
Version: 4.7.0
|
||||
Release: 2
|
||||
Version: 6.0.7
|
||||
Release: %{pkg_release}
|
||||
Summary: Control fan speeds, LEDs, graphics modes, and charge levels for ASUS notebooks
|
||||
License: MPLv2
|
||||
|
||||
@@ -34,8 +35,8 @@ Group: System Environment/Kernel
|
||||
|
||||
URL: https://gitlab.com/asus-linux/asusctl
|
||||
Source: %{name}-%{version}.tar.gz
|
||||
Source1: vendor-%{name}-%{version}.tar.gz
|
||||
Source2: cargo_config
|
||||
Source1: vendor_%{name}_%{version}.tar.xz
|
||||
Source2: cargo-config
|
||||
|
||||
BuildRequires: cargo
|
||||
BuildRequires: rust-packaging
|
||||
@@ -44,12 +45,20 @@ BuildRequires: clang-devel
|
||||
BuildRequires: cmake
|
||||
BuildRequires: rust
|
||||
BuildRequires: rust-std-static
|
||||
BuildRequires: pkgconfig(expat)
|
||||
BuildRequires: pkgconfig(gbm)
|
||||
BuildRequires: pkgconfig(dbus-1)
|
||||
BuildRequires: pkgconfig(libdrm)
|
||||
BuildRequires: pkgconfig(libinput)
|
||||
BuildRequires: pkgconfig(libseat)
|
||||
BuildRequires: pkgconfig(libudev)
|
||||
BuildRequires: pkgconfig(xkbcommon)
|
||||
BuildRequires: pkgconfig(libzstd)
|
||||
BuildRequires: pkgconfig(gtk+-3.0)
|
||||
BuildRequires: pkgconfig(gdk-3.0)
|
||||
BuildRequires: desktop-file-utils
|
||||
Requires: libappindicator-gtk3
|
||||
|
||||
# expat-devel pcre2-devel
|
||||
|
||||
%description
|
||||
asus-nb-ctrl is a utility for Linux to control many aspects of various
|
||||
@@ -67,9 +76,10 @@ A one-stop-shop GUI tool for asusd/asusctl. It aims to provide most controls,
|
||||
a notification service, and ability to run in the background.
|
||||
|
||||
%prep
|
||||
# %setup -D -T -a 1 -c -n %{name}-%{version}/vendor
|
||||
# %setup -D -T -a 0 -c
|
||||
%autosetup
|
||||
%setup -D -T -a 1 -c -n %{name}-%{version}/vendor
|
||||
cd ..
|
||||
%setup -D -T -a 1
|
||||
|
||||
mv Cargo.lock{,.bak}
|
||||
%cargo_prep
|
||||
@@ -86,7 +96,7 @@ export RUSTFLAGS="%{rustflags}"
|
||||
export RUSTFLAGS="%{rustflags}"
|
||||
mkdir -p "%{buildroot}/%{_bindir}" "%{buildroot}%{_docdir}"
|
||||
%make_install
|
||||
|
||||
|
||||
install -D -m 0644 README.md %{buildroot}/%{_docdir}/%{name}/README.md
|
||||
install -D -m 0644 rog-anime/README.md %{buildroot}/%{_docdir}/%{name}/README-anime.md
|
||||
install -D -m 0644 rog-anime/data/diagonal-template.png %{buildroot}/%{_docdir}/%{name}/diagonal-template.png
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
device_name: "FX505D",
|
||||
device_name: "FX505",
|
||||
product_id: "",
|
||||
layout_name: "fx505d",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Pulse],
|
||||
@@ -36,25 +36,7 @@
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
device_name: "FX505G",
|
||||
product_id: "",
|
||||
layout_name: "fx505d",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
device_name: "FX506H",
|
||||
product_id: "",
|
||||
layout_name: "fa506i",
|
||||
basic_modes: [Static, Breathe, Strobe, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
device_name: "FX506L",
|
||||
device_name: "FX506",
|
||||
product_id: "",
|
||||
layout_name: "fa506i",
|
||||
basic_modes: [Static, Breathe, Strobe, Pulse],
|
||||
@@ -98,15 +80,6 @@
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
device_name: "G512LV",
|
||||
product_id: "",
|
||||
layout_name: "ga401q",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Pulse],
|
||||
basic_zones: [Key1, Key2, Key3, Key4],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
device_name: "G513I",
|
||||
product_id: "",
|
||||
@@ -116,6 +89,15 @@
|
||||
advanced_type: Zoned([ZonedKbLeft, ZonedKbLeftMid, ZonedKbRightMid, ZonedKbRight, LightbarRight, LightbarRightCorner, LightbarRightBottom, LightbarLeftBottom, LightbarLeftCorner, LightbarLeft]),
|
||||
power_zones: [Keyboard, Lightbar],
|
||||
),
|
||||
(
|
||||
device_name: "G513Q",
|
||||
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: "G513QE",
|
||||
product_id: "",
|
||||
@@ -125,24 +107,6 @@
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
device_name: "G513QM",
|
||||
product_id: "",
|
||||
layout_name: "g513i",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_zones: [],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
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_zones: [],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
device_name: "G513QY",
|
||||
product_id: "",
|
||||
@@ -153,16 +117,7 @@
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
device_name: "G513RC",
|
||||
product_id: "",
|
||||
layout_name: "g513i",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: Zoned([ZonedKbLeft, ZonedKbLeftMid, ZonedKbRightMid, ZonedKbRight, LightbarRight, LightbarRightCorner, LightbarRightBottom, LightbarLeftBottom, LightbarLeftCorner, LightbarLeft]),
|
||||
power_zones: [Keyboard, Lightbar],
|
||||
),
|
||||
(
|
||||
device_name: "G513RM",
|
||||
device_name: "G513R",
|
||||
product_id: "",
|
||||
layout_name: "g513i",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Pulse],
|
||||
@@ -188,15 +143,6 @@
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
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: [Key1, Key2, Key3, Key4],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
device_name: "G531GD",
|
||||
product_id: "",
|
||||
@@ -253,7 +199,7 @@
|
||||
),
|
||||
(
|
||||
device_name: "G533Q",
|
||||
product_id: "",
|
||||
product_id: "1866",
|
||||
layout_name: "g533q-per-key",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_zones: [],
|
||||
@@ -382,9 +328,9 @@
|
||||
product_id: "",
|
||||
layout_name: "ga401q",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Pulse],
|
||||
basic_zones: [Key1, Key2, Key3, Key4],
|
||||
basic_zones: [Key1, Key2, Key3, Key4, BarLeft, BarRight],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
power_zones: [Keyboard, Lightbar],
|
||||
),
|
||||
(
|
||||
device_name: "G731",
|
||||
@@ -436,9 +382,9 @@
|
||||
product_id: "",
|
||||
layout_name: "g513i-per-key",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
basic_zones: [Logo, BarLeft, BarRight],
|
||||
basic_zones: [],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard],
|
||||
power_zones: [Keyboard, Lightbar, Logo, Lid],
|
||||
),
|
||||
(
|
||||
device_name: "G733PZ",
|
||||
@@ -468,7 +414,7 @@
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
device_name: "G814JI",
|
||||
device_name: "G814J",
|
||||
product_id: "",
|
||||
layout_name: "g814ji-per-key",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
@@ -477,16 +423,7 @@
|
||||
power_zones: [Keyboard, Lightbar],
|
||||
),
|
||||
(
|
||||
device_name: "G814JZ",
|
||||
product_id: "",
|
||||
layout_name: "g814ji-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: "G834JZ",
|
||||
device_name: "G834J",
|
||||
product_id: "",
|
||||
layout_name: "g814ji-per-key",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||
@@ -534,13 +471,13 @@
|
||||
device_name: "GA402XV",
|
||||
product_id: "",
|
||||
layout_name: "ga401q",
|
||||
basic_modes: [Static, Breathe, Pulse],
|
||||
basic_modes: [Static, Breathe, Strobe, Comet],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
device_name: "GA403UI",
|
||||
device_name: "GA403U",
|
||||
product_id: "",
|
||||
layout_name: "ga401q",
|
||||
basic_modes: [Static, Breathe, Pulse],
|
||||
@@ -647,15 +584,6 @@
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
device_name: "GU502G",
|
||||
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: "",
|
||||
@@ -684,7 +612,7 @@
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
device_name: "GU603VV",
|
||||
device_name: "GU603V",
|
||||
product_id: "",
|
||||
layout_name: "ga401q",
|
||||
basic_modes: [Static, Breathe, Strobe, Rainbow, Pulse],
|
||||
@@ -818,6 +746,15 @@
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
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_zones: [],
|
||||
advanced_type: PerKey,
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
device_name: "GX701",
|
||||
product_id: "",
|
||||
|
||||
@@ -70,7 +70,9 @@ impl LedSupportData {
|
||||
}
|
||||
}
|
||||
info!("Using generic LED control for keyboard brightness only");
|
||||
LedSupportData::default()
|
||||
let mut data = LedSupportData::default();
|
||||
data.power_zones.push(PowerZones::Keyboard);
|
||||
data
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,8 @@ impl AuraPowerState {
|
||||
}
|
||||
|
||||
fn tuf_to_bytes(&self) -> Vec<u8> {
|
||||
todo!("0s and 1s for bool array")
|
||||
// &cmd, &boot, &awake, &sleep, &keyboard
|
||||
vec![1, self.boot as u8, self.awake as u8, self.sleep as u8, 1]
|
||||
}
|
||||
|
||||
/// # Bits for older 0x1866 keyboard model
|
||||
@@ -133,7 +134,7 @@ impl AuraPowerState {
|
||||
| (self.sleep as u32) << (23 + 3)
|
||||
| (self.shutdown as u32) << (23 + 4)
|
||||
}
|
||||
PowerZones::KeyboardAndLightbar | PowerZones::None => 0,
|
||||
PowerZones::None | PowerZones::KeyboardAndLightbar => 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -194,6 +195,10 @@ impl LaptopAuraPower {
|
||||
Self { states }
|
||||
}
|
||||
AuraDeviceType::LaptopPre2021 => {
|
||||
// The older devices are tri-state if have lightbar:
|
||||
// 1. Keyboard
|
||||
// 2. Lightbar
|
||||
// 3. KeyboardAndLightbar
|
||||
if support_data.power_zones.contains(&PowerZones::Lightbar) {
|
||||
Self {
|
||||
states: vec![AuraPowerState::default_for(PowerZones::KeyboardAndLightbar)],
|
||||
@@ -214,12 +219,25 @@ impl LaptopAuraPower {
|
||||
pub fn to_bytes(&self, aura_type: AuraDeviceType) -> Vec<u8> {
|
||||
match aura_type {
|
||||
AuraDeviceType::LaptopPost2021 => self.new_to_bytes(),
|
||||
AuraDeviceType::LaptopPre2021 => self
|
||||
.states
|
||||
.first()
|
||||
.cloned()
|
||||
.unwrap_or_default()
|
||||
.old_to_bytes(),
|
||||
AuraDeviceType::LaptopPre2021 => {
|
||||
if self.states.len() == 1 {
|
||||
self.states
|
||||
.first()
|
||||
.cloned()
|
||||
.unwrap_or_default()
|
||||
.old_to_bytes()
|
||||
} else {
|
||||
let mut bytes: Vec<Vec<u8>> =
|
||||
self.states.iter().map(|s| s.old_to_bytes()).collect();
|
||||
let mut b = bytes.pop().unwrap();
|
||||
for i in bytes {
|
||||
for (i, n) in i.iter().enumerate() {
|
||||
b[i] |= n;
|
||||
}
|
||||
}
|
||||
b
|
||||
}
|
||||
}
|
||||
AuraDeviceType::LaptopTuf => self
|
||||
.states
|
||||
.first()
|
||||
@@ -230,7 +248,7 @@ impl LaptopAuraPower {
|
||||
warn!("Trying to create bytes for an unknown device");
|
||||
self.new_to_bytes()
|
||||
}
|
||||
AuraDeviceType::ScsiExtDisk => todo!(),
|
||||
AuraDeviceType::ScsiExtDisk => todo!("scsi disk not implemented yet"),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -279,76 +297,75 @@ mod test {
|
||||
use crate::keyboard::{AuraPowerState, LaptopAuraPower};
|
||||
use crate::{AuraDeviceType, PowerZones};
|
||||
|
||||
fn to_binary_string_post2021(power: &LaptopAuraPower) -> String {
|
||||
let bytes = power.to_bytes(AuraDeviceType::LaptopPost2021);
|
||||
format!(
|
||||
"{:08b}, {:08b}, {:08b}, {:08b}",
|
||||
bytes[0], bytes[1], bytes[2], bytes[3]
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn check_0x1866_control_bytes() {
|
||||
let state = AuraPowerState {
|
||||
zone: PowerZones::Keyboard,
|
||||
awake: true,
|
||||
boot: false,
|
||||
sleep: false,
|
||||
shutdown: false,
|
||||
let power = LaptopAuraPower {
|
||||
states: vec![AuraPowerState {
|
||||
zone: PowerZones::Keyboard,
|
||||
boot: false,
|
||||
awake: true,
|
||||
sleep: false,
|
||||
shutdown: false,
|
||||
}],
|
||||
};
|
||||
let bytes = state.old_to_bytes();
|
||||
let bytes = power.to_bytes(AuraDeviceType::LaptopPre2021);
|
||||
println!("{:08b}, {:08b}, {:08b}", bytes[0], bytes[1], bytes[2]);
|
||||
assert_eq!(bytes, [0x08, 0x00, 0x02, 0x00]);
|
||||
|
||||
let state = AuraPowerState {
|
||||
zone: PowerZones::Lightbar,
|
||||
awake: true,
|
||||
boot: false,
|
||||
sleep: false,
|
||||
shutdown: false,
|
||||
let power = LaptopAuraPower {
|
||||
states: vec![AuraPowerState {
|
||||
zone: PowerZones::Lightbar,
|
||||
boot: false,
|
||||
awake: true,
|
||||
sleep: false,
|
||||
shutdown: false,
|
||||
}],
|
||||
};
|
||||
let bytes = state.old_to_bytes();
|
||||
let bytes = power.to_bytes(AuraDeviceType::LaptopPre2021);
|
||||
println!("{:08b}, {:08b}, {:08b}", bytes[0], bytes[1], bytes[2]);
|
||||
assert_eq!(bytes, [0x04, 0x05, 0x02, 0x00]);
|
||||
|
||||
let bytes = AuraPowerState {
|
||||
zone: PowerZones::None,
|
||||
awake: false,
|
||||
boot: false,
|
||||
sleep: true,
|
||||
shutdown: false,
|
||||
// let bytes = [
|
||||
// OldAuraPower::Keyboard,
|
||||
// OldAuraPower::Lightbar,
|
||||
// OldAuraPower::Awake,
|
||||
// OldAuraPower::Sleep,
|
||||
// OldAuraPower::Boot,
|
||||
// ];
|
||||
let power = LaptopAuraPower {
|
||||
states: vec![
|
||||
AuraPowerState {
|
||||
zone: PowerZones::Keyboard,
|
||||
boot: true,
|
||||
awake: true,
|
||||
sleep: true,
|
||||
shutdown: false,
|
||||
},
|
||||
AuraPowerState {
|
||||
zone: PowerZones::Lightbar,
|
||||
boot: true,
|
||||
awake: true,
|
||||
sleep: true,
|
||||
shutdown: false,
|
||||
},
|
||||
],
|
||||
};
|
||||
let bytes = bytes.old_to_bytes();
|
||||
println!("{:08b}, {:08b}, {:08b}", bytes[0], bytes[1], bytes[2]);
|
||||
assert_eq!(bytes, [0x30, 0x08, 0x04, 0x00]);
|
||||
|
||||
let bytes = AuraPowerState {
|
||||
zone: PowerZones::None,
|
||||
awake: false,
|
||||
boot: true,
|
||||
sleep: false,
|
||||
shutdown: false,
|
||||
};
|
||||
let bytes = bytes.old_to_bytes();
|
||||
println!("{:08b}, {:08b}, {:08b}", bytes[0], bytes[1], bytes[2]);
|
||||
assert_eq!(bytes, [0xc3, 0x12, 0x09, 0x00]);
|
||||
|
||||
let power = AuraPowerState {
|
||||
zone: PowerZones::KeyboardAndLightbar,
|
||||
awake: true,
|
||||
boot: true,
|
||||
sleep: true,
|
||||
shutdown: false,
|
||||
};
|
||||
|
||||
let bytes = power.old_to_bytes();
|
||||
let bytes = power.to_bytes(AuraDeviceType::LaptopPre2021);
|
||||
println!("{:08b}, {:08b}, {:08b}", bytes[0], bytes[1], bytes[2]);
|
||||
assert_eq!(bytes, [0xff, 0x1f, 0x000f, 0x00]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn check_0x19b6_control_bytes_binary_rep() {
|
||||
fn to_binary_string(power: &LaptopAuraPower) -> String {
|
||||
let bytes = power.to_bytes(AuraDeviceType::LaptopPost2021);
|
||||
format!(
|
||||
"{:08b}, {:08b}, {:08b}, {:08b}",
|
||||
bytes[0], bytes[1], bytes[2], bytes[3]
|
||||
)
|
||||
}
|
||||
|
||||
let boot_logo_ = to_binary_string(&LaptopAuraPower {
|
||||
let boot_logo_ = to_binary_string_post2021(&LaptopAuraPower {
|
||||
states: vec![AuraPowerState {
|
||||
zone: PowerZones::Logo,
|
||||
boot: true,
|
||||
@@ -357,7 +374,7 @@ mod test {
|
||||
shutdown: false,
|
||||
}],
|
||||
});
|
||||
let boot_keyb_ = to_binary_string(&LaptopAuraPower {
|
||||
let boot_keyb_ = to_binary_string_post2021(&LaptopAuraPower {
|
||||
states: vec![AuraPowerState {
|
||||
zone: PowerZones::Keyboard,
|
||||
boot: true,
|
||||
@@ -366,7 +383,7 @@ mod test {
|
||||
shutdown: false,
|
||||
}],
|
||||
});
|
||||
let sleep_logo = to_binary_string(&LaptopAuraPower {
|
||||
let sleep_logo = to_binary_string_post2021(&LaptopAuraPower {
|
||||
states: vec![AuraPowerState {
|
||||
zone: PowerZones::Logo,
|
||||
boot: false,
|
||||
@@ -375,7 +392,7 @@ mod test {
|
||||
shutdown: false,
|
||||
}],
|
||||
});
|
||||
let sleep_keyb = to_binary_string(&LaptopAuraPower {
|
||||
let sleep_keyb = to_binary_string_post2021(&LaptopAuraPower {
|
||||
states: vec![AuraPowerState {
|
||||
zone: PowerZones::Keyboard,
|
||||
boot: false,
|
||||
@@ -384,7 +401,7 @@ mod test {
|
||||
shutdown: false,
|
||||
}],
|
||||
});
|
||||
let awake_logo = to_binary_string(&LaptopAuraPower {
|
||||
let awake_logo = to_binary_string_post2021(&LaptopAuraPower {
|
||||
states: vec![AuraPowerState {
|
||||
zone: PowerZones::Logo,
|
||||
boot: false,
|
||||
@@ -393,7 +410,7 @@ mod test {
|
||||
shutdown: false,
|
||||
}],
|
||||
});
|
||||
let awake_keyb = to_binary_string(&LaptopAuraPower {
|
||||
let awake_keyb = to_binary_string_post2021(&LaptopAuraPower {
|
||||
states: vec![AuraPowerState {
|
||||
zone: PowerZones::Keyboard,
|
||||
boot: false,
|
||||
@@ -402,7 +419,7 @@ mod test {
|
||||
shutdown: false,
|
||||
}],
|
||||
});
|
||||
let shut_logo_ = to_binary_string(&LaptopAuraPower {
|
||||
let shut_logo_ = to_binary_string_post2021(&LaptopAuraPower {
|
||||
states: vec![AuraPowerState {
|
||||
zone: PowerZones::Logo,
|
||||
boot: false,
|
||||
@@ -411,7 +428,7 @@ mod test {
|
||||
shutdown: true,
|
||||
}],
|
||||
});
|
||||
let shut_keyb_ = to_binary_string(&LaptopAuraPower {
|
||||
let shut_keyb_ = to_binary_string_post2021(&LaptopAuraPower {
|
||||
states: vec![AuraPowerState {
|
||||
zone: PowerZones::Keyboard,
|
||||
boot: false,
|
||||
@@ -420,7 +437,7 @@ mod test {
|
||||
shutdown: true,
|
||||
}],
|
||||
});
|
||||
let boot_bar__ = to_binary_string(&LaptopAuraPower {
|
||||
let boot_bar__ = to_binary_string_post2021(&LaptopAuraPower {
|
||||
states: vec![AuraPowerState {
|
||||
zone: PowerZones::Lightbar,
|
||||
boot: true,
|
||||
@@ -429,7 +446,7 @@ mod test {
|
||||
shutdown: false,
|
||||
}],
|
||||
});
|
||||
let awake_bar_ = to_binary_string(&LaptopAuraPower {
|
||||
let awake_bar_ = to_binary_string_post2021(&LaptopAuraPower {
|
||||
states: vec![AuraPowerState {
|
||||
zone: PowerZones::Lightbar,
|
||||
boot: false,
|
||||
@@ -438,7 +455,7 @@ mod test {
|
||||
shutdown: false,
|
||||
}],
|
||||
});
|
||||
let sleep_bar_ = to_binary_string(&LaptopAuraPower {
|
||||
let sleep_bar_ = to_binary_string_post2021(&LaptopAuraPower {
|
||||
states: vec![AuraPowerState {
|
||||
zone: PowerZones::Lightbar,
|
||||
boot: false,
|
||||
@@ -447,7 +464,7 @@ mod test {
|
||||
shutdown: false,
|
||||
}],
|
||||
});
|
||||
let shut_bar__ = to_binary_string(&LaptopAuraPower {
|
||||
let shut_bar__ = to_binary_string_post2021(&LaptopAuraPower {
|
||||
states: vec![AuraPowerState {
|
||||
zone: PowerZones::Lightbar,
|
||||
boot: false,
|
||||
@@ -456,7 +473,7 @@ mod test {
|
||||
shutdown: true,
|
||||
}],
|
||||
});
|
||||
let boot_lid__ = to_binary_string(&LaptopAuraPower {
|
||||
let boot_lid__ = to_binary_string_post2021(&LaptopAuraPower {
|
||||
states: vec![AuraPowerState {
|
||||
zone: PowerZones::Lid,
|
||||
boot: true,
|
||||
@@ -465,7 +482,7 @@ mod test {
|
||||
shutdown: false,
|
||||
}],
|
||||
});
|
||||
let awake_lid_ = to_binary_string(&LaptopAuraPower {
|
||||
let awake_lid_ = to_binary_string_post2021(&LaptopAuraPower {
|
||||
states: vec![AuraPowerState {
|
||||
zone: PowerZones::Lid,
|
||||
boot: false,
|
||||
@@ -474,7 +491,7 @@ mod test {
|
||||
shutdown: false,
|
||||
}],
|
||||
});
|
||||
let sleep_lid_ = to_binary_string(&LaptopAuraPower {
|
||||
let sleep_lid_ = to_binary_string_post2021(&LaptopAuraPower {
|
||||
states: vec![AuraPowerState {
|
||||
zone: PowerZones::Lid,
|
||||
boot: false,
|
||||
@@ -483,7 +500,7 @@ mod test {
|
||||
shutdown: false,
|
||||
}],
|
||||
});
|
||||
let shut_lid__ = to_binary_string(&LaptopAuraPower {
|
||||
let shut_lid__ = to_binary_string_post2021(&LaptopAuraPower {
|
||||
states: vec![AuraPowerState {
|
||||
zone: PowerZones::Lid,
|
||||
boot: false,
|
||||
@@ -492,7 +509,7 @@ mod test {
|
||||
shutdown: true,
|
||||
}],
|
||||
});
|
||||
let boot_rear_ = to_binary_string(&LaptopAuraPower {
|
||||
let boot_rear_ = to_binary_string_post2021(&LaptopAuraPower {
|
||||
states: vec![AuraPowerState {
|
||||
zone: PowerZones::RearGlow,
|
||||
boot: true,
|
||||
@@ -501,7 +518,7 @@ mod test {
|
||||
shutdown: false,
|
||||
}],
|
||||
});
|
||||
let awake_rear = to_binary_string(&LaptopAuraPower {
|
||||
let awake_rear = to_binary_string_post2021(&LaptopAuraPower {
|
||||
states: vec![AuraPowerState {
|
||||
zone: PowerZones::RearGlow,
|
||||
boot: false,
|
||||
@@ -510,7 +527,7 @@ mod test {
|
||||
shutdown: false,
|
||||
}],
|
||||
});
|
||||
let sleep_rear = to_binary_string(&LaptopAuraPower {
|
||||
let sleep_rear = to_binary_string_post2021(&LaptopAuraPower {
|
||||
states: vec![AuraPowerState {
|
||||
zone: PowerZones::RearGlow,
|
||||
boot: false,
|
||||
@@ -519,7 +536,7 @@ mod test {
|
||||
shutdown: false,
|
||||
}],
|
||||
});
|
||||
let shut_rear_ = to_binary_string(&LaptopAuraPower {
|
||||
let shut_rear_ = to_binary_string_post2021(&LaptopAuraPower {
|
||||
states: vec![AuraPowerState {
|
||||
zone: PowerZones::RearGlow,
|
||||
boot: false,
|
||||
@@ -554,7 +571,7 @@ mod test {
|
||||
assert_eq!(shut_rear_, "00000000, 00000000, 00000000, 00001000");
|
||||
|
||||
// All on
|
||||
let byte1 = to_binary_string(&LaptopAuraPower {
|
||||
let byte1 = to_binary_string_post2021(&LaptopAuraPower {
|
||||
states: vec![
|
||||
AuraPowerState {
|
||||
zone: PowerZones::Keyboard,
|
||||
|
||||
+1
-1
@@ -126,7 +126,7 @@ pub enum PowerZones {
|
||||
Lid = 3,
|
||||
/// The led strip on the rear of some laptops
|
||||
RearGlow = 4,
|
||||
/// On pre-2021 laptops there is either 1 or 2 zones used
|
||||
/// Exists for the older 0x1866 models
|
||||
KeyboardAndLightbar = 5,
|
||||
None = 255,
|
||||
}
|
||||
|
||||
@@ -9,8 +9,9 @@ homepage.workspace = true
|
||||
edition.workspace = true
|
||||
|
||||
[features]
|
||||
#default = ["mocking"]
|
||||
#mocking = []
|
||||
default = []
|
||||
mocking = []
|
||||
x11 = ["slint/backend-winit-x11"]
|
||||
|
||||
[dependencies]
|
||||
nix = { version = "^0.28.0", features = ["fs"] }
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# ROGALOG
|
||||
|
||||
## X11 support
|
||||
|
||||
X11 is not supported at all, as in I will not help you with X11 issues if there are any due to limited time and it being unmaintained itself. You can however build `rog-control-center` with it enabled `cargo build --features x11`.
|
||||
|
||||
### Translations
|
||||
|
||||
You can help with translations by following https://slint.dev/releases/1.1.0/docs/slint/src/concepts/translations#translate-the-strings
|
||||
@@ -8,4 +12,4 @@ Begin by copying `rog-control-center/translations/en/rog-control-center.po` to `
|
||||
|
||||
Run `msgfmt rog-control-center/translations/<YOUR LOCALE>/rog-control-center.po -o rog-control-center/translations/<YOUR LOCALE>/LC_MESSAGES/rog-control-center.mo` to make the binary formatted translation where `<YOUR LOCALE>` is changed to your translation locale.
|
||||
|
||||
To test you local translations run `RUST_TRANSLATIONS=1 rog-control-center`.
|
||||
To test you local translations run `RUST_TRANSLATIONS=1 rog-control-center`.
|
||||
|
||||
@@ -22,8 +22,6 @@ use rog_control_center::{
|
||||
get_ipc_file, on_tmp_dir_exists, print_versions, MainWindow, QUIT_APP, SHOWING_GUI, SHOW_GUI,
|
||||
};
|
||||
use tokio::runtime::Runtime;
|
||||
// use winit::monitor::VideoMode;
|
||||
// use winit::window::{Fullscreen, WindowLevel};
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<()> {
|
||||
@@ -73,11 +71,6 @@ async fn main() -> Result<()> {
|
||||
.format_timestamp(None)
|
||||
.init();
|
||||
|
||||
// start tokio
|
||||
let rt = Runtime::new().expect("Unable to create Runtime");
|
||||
// Enter the runtime so that `tokio::spawn` is available immediately.
|
||||
let _enter = rt.enter();
|
||||
|
||||
let supported_properties = match proxy.supported_properties() {
|
||||
Ok(s) => s,
|
||||
Err(_e) => {
|
||||
@@ -117,7 +110,13 @@ async fn main() -> Result<()> {
|
||||
let enable_tray_icon = config.enable_tray_icon;
|
||||
let startup_in_background = config.startup_in_background;
|
||||
let config = Arc::new(Mutex::new(config));
|
||||
start_notifications(config.clone())?;
|
||||
|
||||
// start tokio
|
||||
let rt = Runtime::new().expect("Unable to create Runtime");
|
||||
// Enter the runtime so that `tokio::spawn` is available immediately.
|
||||
let _enter = rt.enter();
|
||||
start_notifications(config.clone(), &rt)?;
|
||||
|
||||
if enable_tray_icon {
|
||||
init_tray(supported_properties, config.clone());
|
||||
}
|
||||
@@ -208,6 +207,7 @@ async fn main() -> Result<()> {
|
||||
});
|
||||
|
||||
slint::run_event_loop_until_quit().unwrap();
|
||||
rt.shutdown_background();
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,8 @@ use serde::{Deserialize, Serialize};
|
||||
use supergfxctl::actions::UserActionRequired as GfxUserAction;
|
||||
use supergfxctl::pci_device::{GfxMode, GfxPower};
|
||||
use supergfxctl::zbus_proxy::DaemonProxy as SuperProxy;
|
||||
use tokio::runtime::Runtime;
|
||||
use tokio::task::JoinHandle;
|
||||
use tokio::time::sleep;
|
||||
use zbus::export::futures_util::StreamExt;
|
||||
|
||||
@@ -44,10 +46,13 @@ impl Default for EnabledNotifications {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn start_notifications(config: Arc<Mutex<Config>>) -> Result<()> {
|
||||
pub fn start_notifications(
|
||||
config: Arc<Mutex<Config>>,
|
||||
rt: &Runtime,
|
||||
) -> Result<Vec<JoinHandle<()>>> {
|
||||
// Setup the AC/BAT commands that will run on power status change
|
||||
let config_copy = config.clone();
|
||||
tokio::task::spawn_blocking(move || {
|
||||
let blocking = rt.spawn_blocking(move || {
|
||||
let power = AsusPower::new()
|
||||
.map_err(|e| {
|
||||
error!("AsusPower: {e}");
|
||||
@@ -217,7 +222,7 @@ pub fn start_notifications(config: Arc<Mutex<Config>>) -> Result<()> {
|
||||
};
|
||||
});
|
||||
|
||||
Ok(())
|
||||
Ok(vec![blocking])
|
||||
}
|
||||
|
||||
fn convert_gfx_mode(gfx: GfxMode) -> GpuMode {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
use crate::slint_generatedMainWindow::{
|
||||
AuraPowerState as SlintAuraPowerState, LaptopAuraPower as SlintLaptopAuraPower,
|
||||
AuraDevType as SlintDeviceType, AuraPowerState as SlintAuraPowerState,
|
||||
LaptopAuraPower as SlintLaptopAuraPower,
|
||||
};
|
||||
|
||||
impl From<rog_aura::AuraEffect> for crate::slint_generatedMainWindow::AuraEffect {
|
||||
@@ -51,7 +52,7 @@ impl From<crate::slint_generatedMainWindow::AuraEffect> for rog_aura::AuraEffect
|
||||
}
|
||||
|
||||
use rog_aura::keyboard::{AuraPowerState, LaptopAuraPower};
|
||||
use rog_aura::PowerZones;
|
||||
use rog_aura::{AuraDeviceType, PowerZones};
|
||||
use slint::{Model, ModelRc, RgbaColor};
|
||||
|
||||
use crate::slint_generatedMainWindow::PowerZones as SlintPowerZones;
|
||||
@@ -63,8 +64,8 @@ impl From<PowerZones> for SlintPowerZones {
|
||||
PowerZones::Lightbar => SlintPowerZones::Lightbar,
|
||||
PowerZones::Lid => SlintPowerZones::Lid,
|
||||
PowerZones::RearGlow => SlintPowerZones::RearGlow,
|
||||
PowerZones::KeyboardAndLightbar => todo!(),
|
||||
PowerZones::None => todo!(),
|
||||
PowerZones::KeyboardAndLightbar => SlintPowerZones::KeyboardAndLightbar,
|
||||
PowerZones::None => SlintPowerZones::Keyboard,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -141,3 +142,27 @@ impl From<LaptopAuraPower> for SlintLaptopAuraPower {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<SlintDeviceType> for AuraDeviceType {
|
||||
fn from(value: SlintDeviceType) -> Self {
|
||||
match value {
|
||||
SlintDeviceType::New => Self::LaptopPost2021,
|
||||
SlintDeviceType::Old => Self::LaptopPre2021,
|
||||
SlintDeviceType::Tuf => Self::LaptopTuf,
|
||||
SlintDeviceType::ScsiExtDisk => Self::ScsiExtDisk,
|
||||
SlintDeviceType::Unknown => Self::Unknown,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<AuraDeviceType> for SlintDeviceType {
|
||||
fn from(value: AuraDeviceType) -> Self {
|
||||
match value {
|
||||
AuraDeviceType::LaptopPost2021 => SlintDeviceType::New,
|
||||
AuraDeviceType::LaptopPre2021 => SlintDeviceType::Old,
|
||||
AuraDeviceType::LaptopTuf => SlintDeviceType::Tuf,
|
||||
AuraDeviceType::ScsiExtDisk => SlintDeviceType::ScsiExtDisk,
|
||||
AuraDeviceType::Unknown => SlintDeviceType::Unknown,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,12 +6,12 @@ pub mod setup_system;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
use config_traits::StdConfig;
|
||||
use rog_dbus::zbus_platform::PlatformProxyBlocking;
|
||||
use rog_dbus::list_iface_blocking;
|
||||
use slint::{ComponentHandle, PhysicalSize, SharedString, Weak};
|
||||
|
||||
use crate::config::Config;
|
||||
use crate::ui::setup_anime::setup_anime_page;
|
||||
use crate::ui::setup_aura::{has_aura_iface_blocking, setup_aura_page};
|
||||
use crate::ui::setup_aura::setup_aura_page;
|
||||
use crate::ui::setup_fans::setup_fan_curve_page;
|
||||
use crate::ui::setup_system::{setup_system_page, setup_system_page_callbacks};
|
||||
use crate::{AppSettingsPageData, MainWindow};
|
||||
@@ -108,19 +108,14 @@ pub fn setup_window(config: Arc<Mutex<Config>>) -> MainWindow {
|
||||
}
|
||||
};
|
||||
|
||||
let conn = zbus::blocking::Connection::system().unwrap();
|
||||
let platform = PlatformProxyBlocking::new(&conn).unwrap();
|
||||
|
||||
let interfaces = platform.supported_interfaces().unwrap();
|
||||
log::debug!("Available interfaces: {interfaces:?}");
|
||||
// "Anime", "Aura", "FanCurves", "Platform"
|
||||
let available = list_iface_blocking().unwrap_or_default();
|
||||
ui.set_sidebar_items_avilable(
|
||||
[
|
||||
// Needs to match the order of slint sidebar items
|
||||
interfaces.contains(&"Platform".into()),
|
||||
has_aura_iface_blocking().unwrap_or(false),
|
||||
interfaces.contains(&"Anime".into()),
|
||||
interfaces.contains(&"FanCurves".into()),
|
||||
available.contains(&"org.asuslinux.Platform".to_string()),
|
||||
available.contains(&"org.asuslinux.Aura".to_string()),
|
||||
available.contains(&"org.asuslinux.Anime".to_string()),
|
||||
available.contains(&"org.asuslinux.FanCurves".to_string()),
|
||||
true,
|
||||
true,
|
||||
]
|
||||
@@ -132,11 +127,19 @@ pub fn setup_window(config: Arc<Mutex<Config>>) -> MainWindow {
|
||||
});
|
||||
|
||||
setup_app_settings_page(&ui, config.clone());
|
||||
setup_system_page(&ui, config.clone());
|
||||
setup_system_page_callbacks(&ui, config.clone());
|
||||
setup_aura_page(&ui, config.clone());
|
||||
setup_anime_page(&ui, config.clone());
|
||||
setup_fan_curve_page(&ui, config);
|
||||
if available.contains(&"org.asuslinux.Platform".to_string()) {
|
||||
setup_system_page(&ui, config.clone());
|
||||
setup_system_page_callbacks(&ui, config.clone());
|
||||
}
|
||||
if available.contains(&"org.asuslinux.Aura".to_string()) {
|
||||
setup_aura_page(&ui, config.clone());
|
||||
}
|
||||
if available.contains(&"org.asuslinux.Anime".to_string()) {
|
||||
setup_anime_page(&ui, config.clone());
|
||||
}
|
||||
if available.contains(&"org.asuslinux.FanCurves".to_string()) {
|
||||
setup_fan_curve_page(&ui, config);
|
||||
}
|
||||
ui
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
use log::{error, info, warn};
|
||||
use rog_anime::Animations;
|
||||
use rog_dbus::zbus_anime::AnimeProxy;
|
||||
use slint::ComponentHandle;
|
||||
@@ -11,8 +12,13 @@ use crate::{set_ui_callbacks, set_ui_props_async, AnimePageData, MainWindow};
|
||||
pub fn setup_anime_page(ui: &MainWindow, _states: Arc<Mutex<Config>>) {
|
||||
let handle = ui.as_weak();
|
||||
tokio::spawn(async move {
|
||||
let conn = zbus::Connection::system().await.unwrap();
|
||||
let anime = AnimeProxy::new(&conn).await.unwrap();
|
||||
let Ok(conn) = zbus::Connection::system().await.map_err(|e| warn!("{e:}")) else {
|
||||
return;
|
||||
};
|
||||
let Ok(anime) = AnimeProxy::new(&conn).await.map_err(|e| warn!("{e:}")) else {
|
||||
info!("This device may not have an AniMe. If not then the error can be ignored");
|
||||
return;
|
||||
};
|
||||
|
||||
set_ui_props_async!(handle, anime, AnimePageData, brightness);
|
||||
set_ui_props_async!(handle, anime, AnimePageData, builtins_enabled);
|
||||
@@ -123,6 +129,7 @@ pub fn setup_anime_page(ui: &MainWindow, _states: Arc<Mutex<Config>>) {
|
||||
"Setting Anime off_when_unplugged failed"
|
||||
);
|
||||
})
|
||||
.unwrap();
|
||||
.map_err(|e| error!("setup_anime_page: upgrade_in_event_loop: {e:?}"))
|
||||
.ok();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
use log::info;
|
||||
use log::{error, info};
|
||||
use rog_aura::keyboard::LaptopAuraPower;
|
||||
use rog_dbus::zbus_aura::AuraProxy;
|
||||
use slint::{ComponentHandle, Model, RgbaColor, SharedString};
|
||||
@@ -33,31 +33,11 @@ fn decode_hex(s: &str) -> RgbaColor<u8> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn has_aura_iface_blocking() -> Result<bool, Box<dyn std::error::Error>> {
|
||||
let conn = zbus::blocking::Connection::system()?;
|
||||
let f = zbus::blocking::fdo::ObjectManagerProxy::new(
|
||||
&conn,
|
||||
"org.asuslinux.Daemon",
|
||||
"/org/asuslinux",
|
||||
)?;
|
||||
let interfaces = f.get_managed_objects()?;
|
||||
let mut aura_paths = Vec::new();
|
||||
for v in interfaces.iter() {
|
||||
for k in v.1.keys() {
|
||||
if k.as_str() == "org.asuslinux.Aura" {
|
||||
aura_paths.push(v.0.clone());
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(!aura_paths.is_empty())
|
||||
}
|
||||
|
||||
/// Returns the first available Aura interface
|
||||
// TODO: return all
|
||||
async fn find_aura_iface() -> Result<AuraProxy<'static>, Box<dyn std::error::Error>> {
|
||||
let conn = zbus::Connection::system().await?;
|
||||
let f =
|
||||
zbus::fdo::ObjectManagerProxy::new(&conn, "org.asuslinux.Daemon", "/org/asuslinux").await?;
|
||||
let f = zbus::fdo::ObjectManagerProxy::new(&conn, "org.asuslinux.Daemon", "/").await?;
|
||||
let interfaces = f.get_managed_objects().await?;
|
||||
let mut aura_paths = Vec::new();
|
||||
for v in interfaces.iter() {
|
||||
@@ -93,9 +73,7 @@ pub fn setup_aura_page(ui: &MainWindow, _states: Arc<Mutex<Config>>) {
|
||||
|
||||
let handle = ui.as_weak();
|
||||
tokio::spawn(async move {
|
||||
let aura = if let Ok(aura) = find_aura_iface().await {
|
||||
aura
|
||||
} else {
|
||||
let Ok(aura) = find_aura_iface().await else {
|
||||
info!("This device appears to have no aura interfaces");
|
||||
return;
|
||||
};
|
||||
@@ -104,15 +82,26 @@ pub fn setup_aura_page(ui: &MainWindow, _states: Arc<Mutex<Config>>) {
|
||||
set_ui_props_async!(handle, aura, AuraPageData, led_mode);
|
||||
set_ui_props_async!(handle, aura, AuraPageData, led_mode_data);
|
||||
set_ui_props_async!(handle, aura, AuraPageData, led_power);
|
||||
set_ui_props_async!(handle, aura, AuraPageData, device_type);
|
||||
|
||||
if let Ok(power) = aura.supported_power_zones().await {
|
||||
log::debug!("Available LED power modes {power:?}");
|
||||
let power: Vec<SlintPowerZones> = power.iter().map(|p| (*p).into()).collect();
|
||||
if let Ok(pow3r) = aura.supported_power_zones().await {
|
||||
log::debug!("Available LED power modes {pow3r:?}");
|
||||
handle
|
||||
.upgrade_in_event_loop(move |handle| {
|
||||
let power: Vec<SlintPowerZones> = pow3r.iter().map(|p| (*p).into()).collect();
|
||||
let names: Vec<SharedString> = handle
|
||||
.global::<AuraPageData>()
|
||||
.get_power_zone_names()
|
||||
.iter()
|
||||
.collect();
|
||||
let names: Vec<SharedString> =
|
||||
pow3r.iter().map(|n| names[(*n) as usize].clone()).collect();
|
||||
handle
|
||||
.global::<AuraPageData>()
|
||||
.set_supported_power_zones(power.as_slice().into());
|
||||
handle
|
||||
.global::<AuraPageData>()
|
||||
.set_power_zone_names_old(names.as_slice().into());
|
||||
})
|
||||
.ok();
|
||||
}
|
||||
@@ -138,6 +127,7 @@ pub fn setup_aura_page(ui: &MainWindow, _states: Arc<Mutex<Config>>) {
|
||||
.global::<AuraPageData>()
|
||||
.set_available_mode_names(res.as_slice().into());
|
||||
})
|
||||
.map_err(|e| error!("{e:}"))
|
||||
.ok();
|
||||
}
|
||||
|
||||
@@ -196,7 +186,8 @@ pub fn setup_aura_page(ui: &MainWindow, _states: Arc<Mutex<Config>>) {
|
||||
});
|
||||
});
|
||||
})
|
||||
.unwrap();
|
||||
.map_err(|e| error!("{e:}"))
|
||||
.ok();
|
||||
|
||||
// Need to update the UI if the mode changes
|
||||
let handle_copy = handle.clone();
|
||||
@@ -213,6 +204,7 @@ pub fn setup_aura_page(ui: &MainWindow, _states: Arc<Mutex<Config>>) {
|
||||
.invoke_update_led_mode_data(out.into());
|
||||
handle.invoke_external_colour_change();
|
||||
})
|
||||
.map_err(|e| error!("{e:}"))
|
||||
.ok();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
use log::{error, info};
|
||||
use rog_dbus::zbus_fan_curves::FanCurvesProxy;
|
||||
use rog_platform::platform::ThrottlePolicy;
|
||||
use rog_profiles::fan_curve_set::CurveData;
|
||||
@@ -81,7 +82,8 @@ pub fn update_fan_data(
|
||||
}
|
||||
}
|
||||
})
|
||||
.unwrap();
|
||||
.map_err(|e| error!("update_fan_data: upgrade_in_event_loop: {e:?}"))
|
||||
.ok();
|
||||
}
|
||||
|
||||
pub fn setup_fan_curve_page(ui: &MainWindow, _config: Arc<Mutex<Config>>) {
|
||||
@@ -89,17 +91,44 @@ pub fn setup_fan_curve_page(ui: &MainWindow, _config: Arc<Mutex<Config>>) {
|
||||
|
||||
tokio::spawn(async move {
|
||||
// Create the connections/proxies here to prevent future delays in process
|
||||
let conn = zbus::Connection::system().await.unwrap();
|
||||
let fans = FanCurvesProxy::new(&conn).await.unwrap();
|
||||
let conn = if let Ok(conn) = zbus::Connection::system().await.map_err(|e| error!("{e:}")) {
|
||||
conn
|
||||
} else {
|
||||
return;
|
||||
};
|
||||
let fans = if let Ok(fans) = FanCurvesProxy::new(&conn).await.map_err(|e| error!("{e:}")) {
|
||||
fans
|
||||
} else {
|
||||
info!(
|
||||
"This device may not have an Fan Curve control. If not then the error can be \
|
||||
ignored"
|
||||
);
|
||||
return;
|
||||
};
|
||||
|
||||
let handle_copy = handle.clone();
|
||||
// Do initial setup
|
||||
let balanced = fans.fan_curve_data(ThrottlePolicy::Balanced).await.unwrap();
|
||||
let perf = fans
|
||||
let Ok(balanced) = fans
|
||||
.fan_curve_data(ThrottlePolicy::Balanced)
|
||||
.await
|
||||
.map_err(|e| error!("{e:}"))
|
||||
else {
|
||||
return;
|
||||
};
|
||||
let Ok(perf) = fans
|
||||
.fan_curve_data(ThrottlePolicy::Performance)
|
||||
.await
|
||||
.unwrap();
|
||||
let quiet = fans.fan_curve_data(ThrottlePolicy::Quiet).await.unwrap();
|
||||
.map_err(|e| error!("{e:}"))
|
||||
else {
|
||||
return;
|
||||
};
|
||||
let Ok(quiet) = fans
|
||||
.fan_curve_data(ThrottlePolicy::Quiet)
|
||||
.await
|
||||
.map_err(|e| error!("{e:}"))
|
||||
else {
|
||||
return;
|
||||
};
|
||||
update_fan_data(handle, balanced, perf, quiet);
|
||||
|
||||
let handle_next1 = handle_copy.clone();
|
||||
@@ -111,14 +140,30 @@ pub fn setup_fan_curve_page(ui: &MainWindow, _config: Arc<Mutex<Config>>) {
|
||||
let fans = fans1.clone();
|
||||
let handle_next = handle_next1.clone();
|
||||
tokio::spawn(async move {
|
||||
fans.set_curves_to_defaults(profile.into()).await.unwrap();
|
||||
|
||||
let balanced = fans.fan_curve_data(ThrottlePolicy::Balanced).await.unwrap();
|
||||
let perf = fans
|
||||
if fans.set_curves_to_defaults(profile.into()).await.is_err() {
|
||||
return;
|
||||
}
|
||||
let Ok(balanced) = fans
|
||||
.fan_curve_data(ThrottlePolicy::Balanced)
|
||||
.await
|
||||
.map_err(|e| error!("{e:}"))
|
||||
else {
|
||||
return;
|
||||
};
|
||||
let Ok(perf) = fans
|
||||
.fan_curve_data(ThrottlePolicy::Performance)
|
||||
.await
|
||||
.unwrap();
|
||||
let quiet = fans.fan_curve_data(ThrottlePolicy::Quiet).await.unwrap();
|
||||
.map_err(|e| error!("{e:}"))
|
||||
else {
|
||||
return;
|
||||
};
|
||||
let Ok(quiet) = fans
|
||||
.fan_curve_data(ThrottlePolicy::Quiet)
|
||||
.await
|
||||
.map_err(|e| error!("{e:}"))
|
||||
else {
|
||||
return;
|
||||
};
|
||||
update_fan_data(handle_next, balanced, perf, quiet);
|
||||
});
|
||||
});
|
||||
@@ -127,11 +172,15 @@ pub fn setup_fan_curve_page(ui: &MainWindow, _config: Arc<Mutex<Config>>) {
|
||||
let data: Vec<Node> = data.iter().collect();
|
||||
let data = fan_data_for(fan, enabled, data);
|
||||
tokio::spawn(async move {
|
||||
fans.set_fan_curve(profile.into(), data).await.unwrap();
|
||||
fans.set_fan_curve(profile.into(), data)
|
||||
.await
|
||||
.map_err(|e| error!("{e:}"))
|
||||
.ok()
|
||||
});
|
||||
});
|
||||
})
|
||||
.unwrap();
|
||||
.map_err(|e| error!("setup_fan_curve_page: upgrade_in_event_loop: {e:?}"))
|
||||
.ok();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,19 @@ pub fn setup_system_page_callbacks(ui: &MainWindow, _states: Arc<Mutex<Config>>)
|
||||
set_ui_props_async!(handle, platform, SystemPageData, throttle_performance_epp);
|
||||
set_ui_props_async!(handle, platform, SystemPageData, throttle_quiet_epp);
|
||||
set_ui_props_async!(handle, platform, SystemPageData, throttle_policy_on_battery);
|
||||
set_ui_props_async!(
|
||||
handle,
|
||||
platform,
|
||||
SystemPageData,
|
||||
change_throttle_policy_on_battery
|
||||
);
|
||||
set_ui_props_async!(handle, platform, SystemPageData, throttle_policy_on_ac);
|
||||
set_ui_props_async!(
|
||||
handle,
|
||||
platform,
|
||||
SystemPageData,
|
||||
change_throttle_policy_on_ac
|
||||
);
|
||||
|
||||
set_ui_props_async!(handle, platform, SystemPageData, panel_od);
|
||||
set_ui_props_async!(handle, platform, SystemPageData, boot_sound);
|
||||
@@ -94,6 +106,7 @@ pub fn setup_system_page_callbacks(ui: &MainWindow, _states: Arc<Mutex<Config>>)
|
||||
throttle_thermal_policy: sys_props.contains(&Properties::ThrottlePolicy),
|
||||
};
|
||||
|
||||
// TODO: move the fail/sucess messages to slint
|
||||
handle
|
||||
.upgrade_in_event_loop(move |handle| {
|
||||
handle.global::<SystemPageData>().set_available(props);
|
||||
@@ -163,13 +176,24 @@ pub fn setup_system_page_callbacks(ui: &MainWindow, _states: Arc<Mutex<Config>>)
|
||||
"Throttle policy on AC set to {}",
|
||||
"Setting Throttle policy on AC failed"
|
||||
);
|
||||
set_ui_callbacks!(handle,
|
||||
SystemPageData(as bool),
|
||||
platform.change_throttle_policy_on_ac(.into()),
|
||||
"Throttle policy on AC enabled: {}",
|
||||
"Setting Throttle policy on AC failed"
|
||||
);
|
||||
set_ui_callbacks!(handle,
|
||||
SystemPageData(as i32),
|
||||
platform.throttle_policy_on_battery(.into()),
|
||||
"Throttle policy on abttery set to {}",
|
||||
"Setting Throttle policy on battery failed"
|
||||
);
|
||||
|
||||
set_ui_callbacks!(handle,
|
||||
SystemPageData(as bool),
|
||||
platform.change_throttle_policy_on_battery(.into()),
|
||||
"Throttle policy on battery enabled: {}",
|
||||
"Setting Throttle policy on AC failed"
|
||||
);
|
||||
set_ui_callbacks!(handle,
|
||||
SystemPageData(as f32),
|
||||
platform.ppt_pl1_spl(as u8),
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"POT-Creation-Date: 2024-05-08 04:26+0000\n"
|
||||
"POT-Creation-Date: 2024-05-14 05:08+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"
|
||||
@@ -137,81 +137,126 @@ msgctxt "PageAnime"
|
||||
msgid "Off when on battery"
|
||||
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 dGPU notifications"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/fans.slint:27
|
||||
#: 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:35
|
||||
#: rog-control-center/ui/pages/fans.slint:34
|
||||
msgctxt "FanTab"
|
||||
msgid "Enabled"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/fans.slint:44
|
||||
#: rog-control-center/ui/pages/fans.slint:43
|
||||
msgctxt "FanTab"
|
||||
msgid "Apply"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/fans.slint:52
|
||||
#: rog-control-center/ui/pages/fans.slint:51
|
||||
msgctxt "FanTab"
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/fans.slint:60
|
||||
#: rog-control-center/ui/pages/fans.slint:59
|
||||
msgctxt "FanTab"
|
||||
msgid "Factory Default (all fans)"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/fans.slint:73
|
||||
#: rog-control-center/ui/pages/fans.slint:72
|
||||
msgctxt "PageFans"
|
||||
msgid "Balanced"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/fans.slint:76 rog-control-center/ui/pages/fans.slint:135 rog-control-center/ui/pages/fans.slint:194
|
||||
#: 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 ""
|
||||
|
||||
#: rog-control-center/ui/pages/fans.slint:94 rog-control-center/ui/pages/fans.slint:153 rog-control-center/ui/pages/fans.slint:212
|
||||
#: 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:112 rog-control-center/ui/pages/fans.slint:171 rog-control-center/ui/pages/fans.slint:230
|
||||
#: 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 ""
|
||||
|
||||
#: rog-control-center/ui/pages/fans.slint:132
|
||||
#: rog-control-center/ui/pages/fans.slint:131
|
||||
msgctxt "PageFans"
|
||||
msgid "Performance"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/fans.slint:191
|
||||
#: rog-control-center/ui/pages/fans.slint:190
|
||||
msgctxt "PageFans"
|
||||
msgid "Quiet"
|
||||
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 ""
|
||||
|
||||
#: rog-control-center/ui/pages/aura.slint:59
|
||||
msgctxt "PageAura"
|
||||
msgid "Colour 1"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/aura.slint:85
|
||||
msgctxt "PageAura"
|
||||
msgid "Colour 2"
|
||||
msgstr ""
|
||||
|
||||
#: 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/system.slint:26
|
||||
msgctxt "SystemPageData"
|
||||
msgid "Balanced"
|
||||
@@ -247,371 +292,356 @@ msgctxt "SystemPageData"
|
||||
msgid "Power"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:106
|
||||
#: rog-control-center/ui/pages/system.slint:110
|
||||
msgctxt "PageSystem"
|
||||
msgid "Base system settings"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:111
|
||||
#: rog-control-center/ui/pages/system.slint:115
|
||||
msgctxt "PageSystem"
|
||||
msgid "Charge limit"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:123
|
||||
#: rog-control-center/ui/pages/system.slint:127
|
||||
msgctxt "PageSystem"
|
||||
msgid "Throttle Policy"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:133
|
||||
#: rog-control-center/ui/pages/system.slint:137
|
||||
msgctxt "PageSystem"
|
||||
msgid "Advanced"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:145
|
||||
#: rog-control-center/ui/pages/system.slint:149
|
||||
msgctxt "PageSystem"
|
||||
msgid "Panel Overdrive"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:153
|
||||
#: rog-control-center/ui/pages/system.slint:157
|
||||
msgctxt "PageSystem"
|
||||
msgid "MiniLED Mode"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:161
|
||||
#: rog-control-center/ui/pages/system.slint:165
|
||||
msgctxt "PageSystem"
|
||||
msgid "POST boot sound"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:179
|
||||
#: rog-control-center/ui/pages/system.slint:183
|
||||
msgctxt "PageSystem"
|
||||
msgid "System performance settings"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:184
|
||||
#: rog-control-center/ui/pages/system.slint:188
|
||||
msgctxt "ppt_pl1_spl"
|
||||
msgid "ppt_pl1_spl"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:194
|
||||
#: rog-control-center/ui/pages/system.slint:198
|
||||
msgctxt "ppt_pl2_sppt"
|
||||
msgid "ppt_pl2_sppt"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:204
|
||||
#: rog-control-center/ui/pages/system.slint:208
|
||||
msgctxt "ppt_fppt"
|
||||
msgid "ppt_fppt"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:214
|
||||
#: rog-control-center/ui/pages/system.slint:218
|
||||
msgctxt "ppt_apu_sppt"
|
||||
msgid "ppt_apu_sppt"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:224
|
||||
#: rog-control-center/ui/pages/system.slint:228
|
||||
msgctxt "ppt_platform_sppt"
|
||||
msgid "ppt_platform_sppt"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:234
|
||||
#: rog-control-center/ui/pages/system.slint:238
|
||||
msgctxt "nv_dynamic_boost"
|
||||
msgid "nv_dynamic_boost"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:244
|
||||
#: rog-control-center/ui/pages/system.slint:248
|
||||
msgctxt "nv_temp_target"
|
||||
msgid "nv_temp_target"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:290
|
||||
#: rog-control-center/ui/pages/system.slint:294
|
||||
msgctxt "PageSystem"
|
||||
msgid "Energy Performance Preference linked to Throttle Policy"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:294
|
||||
#: rog-control-center/ui/pages/system.slint:298
|
||||
msgctxt "PageSystem"
|
||||
msgid "Change EPP based on Throttle Policy"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:302
|
||||
#: rog-control-center/ui/pages/system.slint:306
|
||||
msgctxt "PageSystem"
|
||||
msgid "EPP for Balanced Policy"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:312
|
||||
#: rog-control-center/ui/pages/system.slint:316
|
||||
msgctxt "PageSystem"
|
||||
msgid "EPP for Performance Policy"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:322
|
||||
#: rog-control-center/ui/pages/system.slint:326
|
||||
msgctxt "PageSystem"
|
||||
msgid "EPP for Quiet Policy"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:340
|
||||
#: rog-control-center/ui/pages/system.slint:344
|
||||
msgctxt "PageSystem"
|
||||
msgid "Throttle Policy for power state"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:344
|
||||
#: rog-control-center/ui/pages/system.slint:350
|
||||
msgctxt "PageSystem"
|
||||
msgid "Throttle Policy on Battery"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:354
|
||||
#: 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/pages/aura.slint:27
|
||||
msgctxt "PageAura"
|
||||
msgid "Brightness"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/aura.slint:38
|
||||
msgctxt "PageAura"
|
||||
msgid "Aura mode"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/aura.slint:56
|
||||
msgctxt "PageAura"
|
||||
msgid "Colour 1"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/aura.slint:82
|
||||
msgctxt "PageAura"
|
||||
msgid "Colour 2"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/aura.slint:114
|
||||
msgctxt "PageAura"
|
||||
msgid "Zone"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/aura.slint:137
|
||||
msgctxt "PageAura"
|
||||
msgid "Direction"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/aura.slint:159
|
||||
msgctxt "PageAura"
|
||||
msgid "Speed"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/aura.slint:180
|
||||
msgctxt "PageAura"
|
||||
msgid "Power Settings"
|
||||
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 ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:46
|
||||
#: rog-control-center/ui/types/aura_types.slint:49
|
||||
msgctxt "Aura power zone"
|
||||
msgid "Logo"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:47
|
||||
#: 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:48
|
||||
#: 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:49
|
||||
#: rog-control-center/ui/types/aura_types.slint:52
|
||||
msgctxt "Aura power zone"
|
||||
msgid "Lid"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:50
|
||||
#: 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:51
|
||||
#: 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:54
|
||||
#: rog-control-center/ui/types/aura_types.slint:64
|
||||
msgctxt "Aura brightness"
|
||||
msgid "Off"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:55
|
||||
#: rog-control-center/ui/types/aura_types.slint:65
|
||||
msgctxt "Aura brightness"
|
||||
msgid "Low"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:56
|
||||
#: rog-control-center/ui/types/aura_types.slint:66
|
||||
msgctxt "Aura brightness"
|
||||
msgid "Med"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:57
|
||||
#: rog-control-center/ui/types/aura_types.slint:67
|
||||
msgctxt "Aura brightness"
|
||||
msgid "High"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:62 rog-control-center/ui/types/aura_types.slint:77
|
||||
#: rog-control-center/ui/types/aura_types.slint:72 rog-control-center/ui/types/aura_types.slint:87
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Static"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:63 rog-control-center/ui/types/aura_types.slint:78
|
||||
#: rog-control-center/ui/types/aura_types.slint:73 rog-control-center/ui/types/aura_types.slint:88
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Breathe"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:64 rog-control-center/ui/types/aura_types.slint:79
|
||||
#: rog-control-center/ui/types/aura_types.slint:74 rog-control-center/ui/types/aura_types.slint:89
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Strobe"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:65
|
||||
#: rog-control-center/ui/types/aura_types.slint:75
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Rainbow"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:66
|
||||
#: rog-control-center/ui/types/aura_types.slint:76
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Star"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:67
|
||||
#: rog-control-center/ui/types/aura_types.slint:77
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Rain"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:68
|
||||
#: rog-control-center/ui/types/aura_types.slint:78
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Highlight"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:69
|
||||
#: rog-control-center/ui/types/aura_types.slint:79
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Laser"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:70
|
||||
#: rog-control-center/ui/types/aura_types.slint:80
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Ripple"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:71
|
||||
#: rog-control-center/ui/types/aura_types.slint:81
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Nothing"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:72
|
||||
#: rog-control-center/ui/types/aura_types.slint:82
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Pulse"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:73
|
||||
#: rog-control-center/ui/types/aura_types.slint:83
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Comet"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:74
|
||||
#: rog-control-center/ui/types/aura_types.slint:84
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Flash"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:86
|
||||
#: rog-control-center/ui/types/aura_types.slint:96
|
||||
msgctxt "Aura zone"
|
||||
msgid "None"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:87
|
||||
#: rog-control-center/ui/types/aura_types.slint:97
|
||||
msgctxt "Aura zone"
|
||||
msgid "Key1"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:88
|
||||
#: rog-control-center/ui/types/aura_types.slint:98
|
||||
msgctxt "Aura zone"
|
||||
msgid "Key2"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:89
|
||||
#: rog-control-center/ui/types/aura_types.slint:99
|
||||
msgctxt "Aura zone"
|
||||
msgid "Key3"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:90
|
||||
#: rog-control-center/ui/types/aura_types.slint:100
|
||||
msgctxt "Aura zone"
|
||||
msgid "Key4"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:91
|
||||
#: rog-control-center/ui/types/aura_types.slint:101
|
||||
msgctxt "Aura zone"
|
||||
msgid "Logo"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:92
|
||||
#: rog-control-center/ui/types/aura_types.slint:102
|
||||
msgctxt "Aura zone"
|
||||
msgid "Lightbar Left"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:93
|
||||
#: rog-control-center/ui/types/aura_types.slint:103
|
||||
msgctxt "Aura zone"
|
||||
msgid "Lightbar Right"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:97
|
||||
#: rog-control-center/ui/types/aura_types.slint:107
|
||||
msgctxt "Aura direction"
|
||||
msgid "Right"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:98
|
||||
#: rog-control-center/ui/types/aura_types.slint:108
|
||||
msgctxt "Aura direction"
|
||||
msgid "Left"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:99
|
||||
#: rog-control-center/ui/types/aura_types.slint:109
|
||||
msgctxt "Aura direction"
|
||||
msgid "Up"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:100
|
||||
#: rog-control-center/ui/types/aura_types.slint:110
|
||||
msgctxt "Aura direction"
|
||||
msgid "Down"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:104
|
||||
#: rog-control-center/ui/types/aura_types.slint:114
|
||||
msgctxt "Aura speed"
|
||||
msgid "Low"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:105
|
||||
#: rog-control-center/ui/types/aura_types.slint:115
|
||||
msgctxt "Aura speed"
|
||||
msgid "Medium"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:106
|
||||
#: 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:50
|
||||
msgctxt "MainWindow"
|
||||
msgid "ROG"
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,654 @@
|
||||
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"POT-Creation-Date: 2024-05-11 09:10+0300\n"
|
||||
"PO-Revision-Date: 2024-05-11 10:20+0300\n"
|
||||
"Last-Translator: Winfried <winfriedhofmann@duck.com>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: tr\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:6
|
||||
msgctxt "Anime Brightness"
|
||||
msgid "Off"
|
||||
msgstr "Kapalı"
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:7
|
||||
msgctxt "Anime Brightness"
|
||||
msgid "Low"
|
||||
msgstr "Düşük"
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:8
|
||||
msgctxt "Anime Brightness"
|
||||
msgid "Med"
|
||||
msgstr "Orta"
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:9
|
||||
msgctxt "Anime Brightness"
|
||||
msgid "High"
|
||||
msgstr "Yüksek"
|
||||
|
||||
#: 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 "Parlaklık"
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:66
|
||||
msgctxt "PageAnime"
|
||||
msgid "Enable display"
|
||||
msgstr "Görüntüyü etkinleştir"
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:74 rog-control-center/ui/pages/anime.slint:97
|
||||
msgctxt "PageAnime"
|
||||
msgid "Advanced"
|
||||
msgstr "Gelişmiş"
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:89
|
||||
msgctxt "PageAnime"
|
||||
msgid "Use built-in animations"
|
||||
msgstr "Yerleşik animasyonları kullanın"
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:146
|
||||
msgctxt "PageAnime"
|
||||
msgid "Set which builtin animations are played"
|
||||
msgstr "Hangi yerleşik animasyonların oynatılacağını ayarlayın"
|
||||
|
||||
#: 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 "Uyku Animasyonu"
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:180
|
||||
msgctxt "Anime built-in selection"
|
||||
msgid "Shutdown Animation"
|
||||
msgstr "Kapatma Animasyonu"
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:220
|
||||
msgctxt "PageAnime"
|
||||
msgid "Advanced Display Settings"
|
||||
msgstr "Gelişmiş Görüntü Ayarları"
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:225
|
||||
msgctxt "PageAnime"
|
||||
msgid "Off when lid closed"
|
||||
msgstr "Kapak Kapatıldığında Kapat"
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:234
|
||||
msgctxt "PageAnime"
|
||||
msgid "Off when suspended"
|
||||
msgstr "Askıya alındığında kapat"
|
||||
|
||||
#: rog-control-center/ui/pages/anime.slint:243
|
||||
msgctxt "PageAnime"
|
||||
msgid "Off when on battery"
|
||||
msgstr "Pille çalışırken kapat"
|
||||
|
||||
#: rog-control-center/ui/pages/app_settings.slint:29
|
||||
msgctxt "PageAppSettings"
|
||||
msgid "Run in background after closing"
|
||||
msgstr "Kapatıldıktan sonra arka planda çalıştır"
|
||||
|
||||
#: rog-control-center/ui/pages/app_settings.slint:38
|
||||
msgctxt "PageAppSettings"
|
||||
msgid "Start app in background (UI closed)"
|
||||
msgstr "Uygulamayı arka planda başlat (UI kapalı)"
|
||||
|
||||
#: rog-control-center/ui/pages/app_settings.slint:50
|
||||
msgctxt "PageAppSettings"
|
||||
msgid "Enable system tray icon"
|
||||
msgstr "Sistem tepsisi simgesini etkinleştir"
|
||||
|
||||
#: rog-control-center/ui/pages/app_settings.slint:59
|
||||
msgctxt "PageAppSettings"
|
||||
msgid "Enable dGPU notifications"
|
||||
msgstr "dGPU bildirimlerini etkinleştir"
|
||||
|
||||
#: rog-control-center/ui/pages/fans.slint:27
|
||||
msgctxt "FanTab"
|
||||
msgid "This fan is not avilable on this machine"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/fans.slint:35
|
||||
msgctxt "FanTab"
|
||||
msgid "Enabled"
|
||||
msgstr "Etkinleştirildi"
|
||||
|
||||
#: rog-control-center/ui/pages/fans.slint:44
|
||||
msgctxt "FanTab"
|
||||
msgid "Apply"
|
||||
msgstr "Uygula"
|
||||
|
||||
#: rog-control-center/ui/pages/fans.slint:52
|
||||
msgctxt "FanTab"
|
||||
msgid "Cancel"
|
||||
msgstr "Vazgeç"
|
||||
|
||||
#: rog-control-center/ui/pages/fans.slint:60
|
||||
msgctxt "FanTab"
|
||||
msgid "Factory Default (all fans)"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/fans.slint:73
|
||||
msgctxt "PageFans"
|
||||
msgid "Balanced"
|
||||
msgstr "Dengeli"
|
||||
|
||||
#: rog-control-center/ui/pages/fans.slint:76 rog-control-center/ui/pages/fans.slint:135 rog-control-center/ui/pages/fans.slint:194
|
||||
msgctxt "PageFans"
|
||||
msgid "CPU"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/fans.slint:94 rog-control-center/ui/pages/fans.slint:153 rog-control-center/ui/pages/fans.slint:212
|
||||
msgctxt "PageFans"
|
||||
msgid "Mid"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/fans.slint:112 rog-control-center/ui/pages/fans.slint:171 rog-control-center/ui/pages/fans.slint:230
|
||||
msgctxt "PageFans"
|
||||
msgid "GPU"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/fans.slint:132
|
||||
msgctxt "PageFans"
|
||||
msgid "Performance"
|
||||
msgstr "Perfomans"
|
||||
|
||||
#: rog-control-center/ui/pages/fans.slint:191
|
||||
msgctxt "PageFans"
|
||||
msgid "Quiet"
|
||||
msgstr "Sessiz"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:26
|
||||
msgctxt "SystemPageData"
|
||||
msgid "Balanced"
|
||||
msgstr "Dengeli"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:26 rog-control-center/ui/pages/system.slint:30
|
||||
msgctxt "SystemPageData"
|
||||
msgid "Performance"
|
||||
msgstr "Perfomans"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:26
|
||||
msgctxt "SystemPageData"
|
||||
msgid "Quiet"
|
||||
msgstr "Sessiz"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:29
|
||||
msgctxt "SystemPageData"
|
||||
msgid "Default"
|
||||
msgstr "Varsayınal"
|
||||
|
||||
#: 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:106
|
||||
msgctxt "PageSystem"
|
||||
msgid "Base system settings"
|
||||
msgstr "Temel Sistem Ayarları"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:111
|
||||
msgctxt "PageSystem"
|
||||
msgid "Charge limit"
|
||||
msgstr "Şarj Sınırı"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:123
|
||||
msgctxt "PageSystem"
|
||||
msgid "Throttle Policy"
|
||||
msgstr "Güç Politikası"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:133
|
||||
msgctxt "PageSystem"
|
||||
msgid "Advanced"
|
||||
msgstr "Gelişmiş"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:145
|
||||
msgctxt "PageSystem"
|
||||
msgid "Panel Overdrive"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:153
|
||||
msgctxt "PageSystem"
|
||||
msgid "MiniLED Mode"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:161
|
||||
msgctxt "PageSystem"
|
||||
msgid "POST boot sound"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:179
|
||||
msgctxt "PageSystem"
|
||||
msgid "System performance settings"
|
||||
msgstr "Sistem Perfomans Ayarları"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:184
|
||||
msgctxt "ppt_pl1_spl"
|
||||
msgid "ppt_pl1_spl"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:194
|
||||
msgctxt "ppt_pl2_sppt"
|
||||
msgid "ppt_pl2_sppt"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:204
|
||||
msgctxt "ppt_fppt"
|
||||
msgid "ppt_fppt"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:214
|
||||
msgctxt "ppt_apu_sppt"
|
||||
msgid "ppt_apu_sppt"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:224
|
||||
msgctxt "ppt_platform_sppt"
|
||||
msgid "ppt_platform_sppt"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:234
|
||||
msgctxt "nv_dynamic_boost"
|
||||
msgid "nv_dynamic_boost"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:244
|
||||
msgctxt "nv_temp_target"
|
||||
msgid "nv_temp_target"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:290
|
||||
msgctxt "PageSystem"
|
||||
msgid "Energy Performance Preference linked to Throttle Policy"
|
||||
msgstr "Güç Politikasına Bağlı Enerji Performansı Tercihi"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:294
|
||||
msgctxt "PageSystem"
|
||||
msgid "Change EPP based on Throttle Policy"
|
||||
msgstr "EPP'yi Güç Politikasına göre değiştirin"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:302
|
||||
msgctxt "PageSystem"
|
||||
msgid "EPP for Balanced Policy"
|
||||
msgstr "Dengeli Politika için EPP"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:312
|
||||
msgctxt "PageSystem"
|
||||
msgid "EPP for Performance Policy"
|
||||
msgstr "Performans Politikası için EPP"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:322
|
||||
msgctxt "PageSystem"
|
||||
msgid "EPP for Quiet Policy"
|
||||
msgstr "Sessiz Politikası için EPP"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:340
|
||||
msgctxt "PageSystem"
|
||||
msgid "Throttle Policy for power state"
|
||||
msgstr "Güç durumu için Güç Politikası"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:344
|
||||
msgctxt "PageSystem"
|
||||
msgid "Throttle Policy on Battery"
|
||||
msgstr "Pil Güç Politikası"
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:354
|
||||
msgctxt "PageSystem"
|
||||
msgid "Throttle Policy on AC"
|
||||
msgstr "AC'de Güç Politikası"
|
||||
|
||||
#: rog-control-center/ui/pages/aura.slint:27
|
||||
msgctxt "PageAura"
|
||||
msgid "Brightness"
|
||||
msgstr "Parlaklık"
|
||||
|
||||
#: rog-control-center/ui/pages/aura.slint:38
|
||||
msgctxt "PageAura"
|
||||
msgid "Aura mode"
|
||||
msgstr "Renk Modu"
|
||||
|
||||
#: rog-control-center/ui/pages/aura.slint:56
|
||||
msgctxt "PageAura"
|
||||
msgid "Colour 1"
|
||||
msgstr "Renk 1"
|
||||
|
||||
#: rog-control-center/ui/pages/aura.slint:82
|
||||
msgctxt "PageAura"
|
||||
msgid "Colour 2"
|
||||
msgstr "Renk 2"
|
||||
|
||||
#: rog-control-center/ui/pages/aura.slint:114
|
||||
msgctxt "PageAura"
|
||||
msgid "Zone"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/aura.slint:137
|
||||
msgctxt "PageAura"
|
||||
msgid "Direction"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/aura.slint:159
|
||||
msgctxt "PageAura"
|
||||
msgid "Speed"
|
||||
msgstr "Hız"
|
||||
|
||||
#: rog-control-center/ui/pages/aura.slint:180
|
||||
msgctxt "PageAura"
|
||||
msgid "Power Settings"
|
||||
msgstr "Güç Ayarları"
|
||||
|
||||
#: 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 ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:45
|
||||
msgctxt "Aura power zone"
|
||||
msgid "Logo"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:46
|
||||
msgctxt "Aura power zone"
|
||||
msgid "Keyboard"
|
||||
msgstr "Klavye"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:47
|
||||
msgctxt "Aura power zone"
|
||||
msgid "Lightbar"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:48
|
||||
msgctxt "Aura power zone"
|
||||
msgid "Lid"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:49
|
||||
msgctxt "Aura power zone"
|
||||
msgid "Rear Glow"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:50
|
||||
msgctxt "Aura power zone"
|
||||
msgid "Keyboard and Lightbar"
|
||||
msgstr "Klavye ve Aydınlatma"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:53
|
||||
msgctxt "Aura brightness"
|
||||
msgid "Off"
|
||||
msgstr "Kapalı"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:54
|
||||
msgctxt "Aura brightness"
|
||||
msgid "Low"
|
||||
msgstr "Düşük"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:55
|
||||
msgctxt "Aura brightness"
|
||||
msgid "Med"
|
||||
msgstr "Orta"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:56
|
||||
msgctxt "Aura brightness"
|
||||
msgid "High"
|
||||
msgstr "Yüksek"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:61 rog-control-center/ui/types/aura_types.slint:76
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Static"
|
||||
msgstr "Sabit"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:62 rog-control-center/ui/types/aura_types.slint:77
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Breathe"
|
||||
msgstr "Nefes Alma"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:63 rog-control-center/ui/types/aura_types.slint:78
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Strobe"
|
||||
msgstr "Flaş"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:64
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Rainbow"
|
||||
msgstr "Gökkuşağı"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:65
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Star"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:66
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Rain"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:67
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Highlight"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:68
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Laser"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:69
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Ripple"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:70
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Nothing"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:71
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Pulse"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:72
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Comet"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:73
|
||||
msgctxt "Basic aura mode"
|
||||
msgid "Flash"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:85
|
||||
msgctxt "Aura zone"
|
||||
msgid "None"
|
||||
msgstr "Hiçbiri"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:86
|
||||
msgctxt "Aura zone"
|
||||
msgid "Key1"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:87
|
||||
msgctxt "Aura zone"
|
||||
msgid "Key2"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:88
|
||||
msgctxt "Aura zone"
|
||||
msgid "Key3"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:89
|
||||
msgctxt "Aura zone"
|
||||
msgid "Key4"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:90
|
||||
msgctxt "Aura zone"
|
||||
msgid "Logo"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:91
|
||||
msgctxt "Aura zone"
|
||||
msgid "Lightbar Left"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:92
|
||||
msgctxt "Aura zone"
|
||||
msgid "Lightbar Right"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:96
|
||||
msgctxt "Aura direction"
|
||||
msgid "Right"
|
||||
msgstr "Sağ"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:97
|
||||
msgctxt "Aura direction"
|
||||
msgid "Left"
|
||||
msgstr "Sol"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:98
|
||||
msgctxt "Aura direction"
|
||||
msgid "Up"
|
||||
msgstr "Yukarı"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:99
|
||||
msgctxt "Aura direction"
|
||||
msgid "Down"
|
||||
msgstr "Aşağı"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:103
|
||||
msgctxt "Aura speed"
|
||||
msgid "Low"
|
||||
msgstr "Düşük"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:104
|
||||
msgctxt "Aura speed"
|
||||
msgid "Medium"
|
||||
msgstr "Orta"
|
||||
|
||||
#: rog-control-center/ui/types/aura_types.slint:105
|
||||
msgctxt "Aura speed"
|
||||
msgid "High"
|
||||
msgstr "Yüksek"
|
||||
|
||||
#: rog-control-center/ui/main_window.slint:50
|
||||
msgctxt "MainWindow"
|
||||
msgid "ROG"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/main_window.slint:52
|
||||
msgctxt "Menu1"
|
||||
msgid "System Control"
|
||||
msgstr "Sistem Kontrol"
|
||||
|
||||
#: rog-control-center/ui/main_window.slint:53
|
||||
msgctxt "Menu2"
|
||||
msgid "Keyboard Aura"
|
||||
msgstr "Klavye Rengi"
|
||||
|
||||
#: rog-control-center/ui/main_window.slint:54
|
||||
msgctxt "Menu3"
|
||||
msgid "AniMe Matrix"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/main_window.slint:55
|
||||
msgctxt "Menu4"
|
||||
msgid "Fan Curves"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/main_window.slint:56
|
||||
msgctxt "Menu5"
|
||||
msgid "App Settings"
|
||||
msgstr "Uygulama Ayarları"
|
||||
|
||||
#: rog-control-center/ui/main_window.slint:57
|
||||
msgctxt "Menu6"
|
||||
msgid "About"
|
||||
msgstr "Hakkında"
|
||||
|
||||
#: rog-control-center/ui/main_window.slint:69
|
||||
msgctxt "MainWindow"
|
||||
msgid "Quit"
|
||||
msgstr "Çık"
|
||||
|
||||
@@ -22,45 +22,35 @@ export component PageAppSettings inherits VerticalLayout {
|
||||
mainview := VerticalLayout {
|
||||
padding: 10px;
|
||||
spacing: 10px;
|
||||
HorizontalLayout {
|
||||
spacing: 10px;
|
||||
max-height: 32px;
|
||||
SystemToggle {
|
||||
text: @tr("Run in background after closing");
|
||||
checked <=> AppSettingsPageData.run_in_background;
|
||||
toggled => {
|
||||
AppSettingsPageData.set_run_in_background(AppSettingsPageData.run_in_background)
|
||||
}
|
||||
}
|
||||
|
||||
SystemToggle {
|
||||
width: parent.width * 1px / 2px;
|
||||
text: @tr("Start app in background (UI closed)");
|
||||
checked <=> AppSettingsPageData.startup_in_background;
|
||||
toggled => {
|
||||
AppSettingsPageData.set_startup_in_background(AppSettingsPageData.startup_in_background)
|
||||
}
|
||||
SystemToggle {
|
||||
text: @tr("Run in background after closing");
|
||||
checked <=> AppSettingsPageData.run_in_background;
|
||||
toggled => {
|
||||
AppSettingsPageData.set_run_in_background(AppSettingsPageData.run_in_background)
|
||||
}
|
||||
}
|
||||
|
||||
HorizontalLayout {
|
||||
max-height: 32px;
|
||||
spacing: 10px;
|
||||
SystemToggle {
|
||||
text: @tr("Enable system tray icon");
|
||||
checked <=> AppSettingsPageData.enable_tray_icon;
|
||||
toggled => {
|
||||
AppSettingsPageData.set_enable_tray_icon(AppSettingsPageData.enable_tray_icon)
|
||||
}
|
||||
SystemToggle {
|
||||
text: @tr("Start app in background (UI closed)");
|
||||
checked <=> AppSettingsPageData.startup_in_background;
|
||||
toggled => {
|
||||
AppSettingsPageData.set_startup_in_background(AppSettingsPageData.startup_in_background)
|
||||
}
|
||||
}
|
||||
|
||||
SystemToggle {
|
||||
width: parent.width * 1px / 2px;
|
||||
text: @tr("Enable dGPU notifications");
|
||||
checked <=> AppSettingsPageData.enable_dgpu_notifications;
|
||||
toggled => {
|
||||
AppSettingsPageData.set_enable_dgpu_notifications(AppSettingsPageData.enable_dgpu_notifications)
|
||||
}
|
||||
SystemToggle {
|
||||
text: @tr("Enable system tray icon");
|
||||
checked <=> AppSettingsPageData.enable_tray_icon;
|
||||
toggled => {
|
||||
AppSettingsPageData.set_enable_tray_icon(AppSettingsPageData.enable_tray_icon)
|
||||
}
|
||||
}
|
||||
|
||||
SystemToggle {
|
||||
text: @tr("Enable dGPU notifications");
|
||||
checked <=> AppSettingsPageData.enable_dgpu_notifications;
|
||||
toggled => {
|
||||
AppSettingsPageData.set_enable_dgpu_notifications(AppSettingsPageData.enable_dgpu_notifications)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Palette, Button, ComboBox, VerticalBox, GroupBox } from "std-widgets.sl
|
||||
import { StyleMetrics, Slider, HorizontalBox, TextEdit, SpinBox, LineEdit, ScrollView } from "std-widgets.slint";
|
||||
import { ColourSlider } from "../widgets/colour_picker.slint";
|
||||
import { AuraPageData, AuraDevType, PowerZones, LaptopAuraPower, AuraEffect } from "../types/aura_types.slint";
|
||||
import { AuraPowerGroup } from "../widgets/aura_power.slint";
|
||||
import { AuraPowerGroup, AuraPowerGroupOld } from "../widgets/aura_power.slint";
|
||||
|
||||
export component PageAura inherits Rectangle {
|
||||
property <bool> show_fade_cover: false;
|
||||
@@ -17,187 +17,191 @@ export component PageAura inherits Rectangle {
|
||||
c2.final_colour = AuraPageData.led_mode_data.colour2;
|
||||
c2.external_colour_change();
|
||||
}
|
||||
VerticalLayout {
|
||||
padding: 10px;
|
||||
spacing: 10px;
|
||||
alignment: LayoutAlignment.start;
|
||||
HorizontalLayout {
|
||||
ScrollView {
|
||||
VerticalLayout {
|
||||
padding: 10px;
|
||||
spacing: 10px;
|
||||
SystemDropdown {
|
||||
text: @tr("Brightness");
|
||||
current_index <=> AuraPageData.brightness;
|
||||
current_value: AuraPageData.brightness_names[self.current-index];
|
||||
model <=> AuraPageData.brightness_names;
|
||||
selected => {
|
||||
AuraPageData.set_brightness(AuraPageData.brightness)
|
||||
}
|
||||
}
|
||||
|
||||
SystemDropdown {
|
||||
width: parent.width * 1px / 2px;
|
||||
text: @tr("Aura mode");
|
||||
current_index <=> AuraPageData.current_available_mode;
|
||||
current_value: AuraPageData.available_mode_names[self.current-index];
|
||||
model <=> AuraPageData.available_mode_names;
|
||||
selected => {
|
||||
AuraPageData.led_mode_data.mode = AuraPageData.led_mode;
|
||||
AuraPageData.led_mode_data.mode = AuraPageData.current_available_mode;
|
||||
self.current_value = AuraPageData.available_mode_names[self.current-index];
|
||||
AuraPageData.set_led_mode(AuraPageData.current_available_mode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RogItem {
|
||||
alignment: LayoutAlignment.start;
|
||||
HorizontalLayout {
|
||||
spacing: 10px;
|
||||
VerticalBox {
|
||||
Text {
|
||||
text: @tr("Colour 1");
|
||||
vertical-alignment: TextVerticalAlignment.center;
|
||||
horizontal-alignment: TextHorizontalAlignment.center;
|
||||
}
|
||||
|
||||
HorizontalBox {
|
||||
c1 := ColourSlider {
|
||||
enabled: AuraPageData.led_mode == 0 || AuraPageData.led_mode == 1 || AuraPageData.led_mode == 4 || AuraPageData.led_mode == 6 || AuraPageData.led_mode == 7 || AuraPageData.led_mode == 8 || AuraPageData.led_mode == 10 || AuraPageData.led_mode == 11 || AuraPageData.led_mode == 12;
|
||||
final_colour <=> AuraPageData.color1;
|
||||
colourbox <=> AuraPageData.colorbox1;
|
||||
set_hex_from_colour(c1) => {
|
||||
return AuraPageData.set_hex_from_colour(c1);
|
||||
}
|
||||
hex_to_colour(s) => {
|
||||
return AuraPageData.set_hex_to_colour(s);
|
||||
}
|
||||
released => {
|
||||
AuraPageData.led_mode_data.colour1 = AuraPageData.color1;
|
||||
AuraPageData.set_led_mode_data(AuraPageData.led_mode_data);
|
||||
}
|
||||
}
|
||||
SystemDropdown {
|
||||
text: @tr("Brightness");
|
||||
current_index <=> AuraPageData.brightness;
|
||||
current_value: AuraPageData.brightness_names[self.current-index];
|
||||
model <=> AuraPageData.brightness_names;
|
||||
selected => {
|
||||
AuraPageData.set_brightness(AuraPageData.brightness)
|
||||
}
|
||||
}
|
||||
|
||||
VerticalBox {
|
||||
Text {
|
||||
text: @tr("Colour 2");
|
||||
vertical-alignment: TextVerticalAlignment.center;
|
||||
horizontal-alignment: TextHorizontalAlignment.center;
|
||||
SystemDropdown {
|
||||
width: root.width * 1px / 2px;
|
||||
text: @tr("Aura mode");
|
||||
current_index <=> AuraPageData.current_available_mode;
|
||||
current_value: AuraPageData.available_mode_names[self.current-index];
|
||||
model <=> AuraPageData.available_mode_names;
|
||||
selected => {
|
||||
AuraPageData.led_mode_data.mode = AuraPageData.led_mode;
|
||||
AuraPageData.led_mode_data.mode = AuraPageData.current_available_mode;
|
||||
self.current_value = AuraPageData.available_mode_names[self.current-index];
|
||||
AuraPageData.set_led_mode(AuraPageData.current_available_mode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RogItem {
|
||||
min-height: 220px;
|
||||
max-height: 400px;
|
||||
HorizontalLayout {
|
||||
spacing: 10px;
|
||||
VerticalBox {
|
||||
Text {
|
||||
text: @tr("Colour 1");
|
||||
vertical-alignment: TextVerticalAlignment.center;
|
||||
horizontal-alignment: TextHorizontalAlignment.center;
|
||||
}
|
||||
|
||||
HorizontalBox {
|
||||
c1 := ColourSlider {
|
||||
enabled: AuraPageData.led_mode == 0 || AuraPageData.led_mode == 1 || AuraPageData.led_mode == 4 || AuraPageData.led_mode == 6 || AuraPageData.led_mode == 7 || AuraPageData.led_mode == 8 || AuraPageData.led_mode == 10 || AuraPageData.led_mode == 11 || AuraPageData.led_mode == 12;
|
||||
final_colour <=> AuraPageData.color1;
|
||||
colourbox <=> AuraPageData.colorbox1;
|
||||
set_hex_from_colour(c1) => {
|
||||
return AuraPageData.set_hex_from_colour(c1);
|
||||
}
|
||||
hex_to_colour(s) => {
|
||||
return AuraPageData.set_hex_to_colour(s);
|
||||
}
|
||||
released => {
|
||||
AuraPageData.led_mode_data.colour1 = AuraPageData.color1;
|
||||
AuraPageData.set_led_mode_data(AuraPageData.led_mode_data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HorizontalBox {
|
||||
c2 := ColourSlider {
|
||||
enabled: AuraPageData.led_mode == 1 || AuraPageData.led_mode == 4;
|
||||
final_colour <=> AuraPageData.color2;
|
||||
colourbox <=> AuraPageData.colorbox2;
|
||||
set_hex_from_colour(c1) => {
|
||||
return AuraPageData.set_hex_from_colour(c1);
|
||||
}
|
||||
hex_to_colour(s) => {
|
||||
return AuraPageData.set_hex_to_colour(s);
|
||||
}
|
||||
released => {
|
||||
AuraPageData.led_mode_data.colour2 = AuraPageData.color2;
|
||||
AuraPageData.set_led_mode_data(AuraPageData.led_mode_data);
|
||||
VerticalBox {
|
||||
Text {
|
||||
text: @tr("Colour 2");
|
||||
vertical-alignment: TextVerticalAlignment.center;
|
||||
horizontal-alignment: TextHorizontalAlignment.center;
|
||||
}
|
||||
|
||||
HorizontalBox {
|
||||
c2 := ColourSlider {
|
||||
enabled: AuraPageData.led_mode == 1 || AuraPageData.led_mode == 4;
|
||||
final_colour <=> AuraPageData.color2;
|
||||
colourbox <=> AuraPageData.colorbox2;
|
||||
set_hex_from_colour(c1) => {
|
||||
return AuraPageData.set_hex_from_colour(c1);
|
||||
}
|
||||
hex_to_colour(s) => {
|
||||
return AuraPageData.set_hex_to_colour(s);
|
||||
}
|
||||
released => {
|
||||
AuraPageData.led_mode_data.colour2 = AuraPageData.color2;
|
||||
AuraPageData.set_led_mode_data(AuraPageData.led_mode_data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HorizontalLayout {
|
||||
spacing: 10px;
|
||||
RogItem {
|
||||
padding: 0px;
|
||||
VerticalBox {
|
||||
Text {
|
||||
text: @tr("Zone");
|
||||
vertical-alignment: TextVerticalAlignment.center;
|
||||
horizontal-alignment: TextHorizontalAlignment.center;
|
||||
}
|
||||
HorizontalLayout {
|
||||
spacing: 10px;
|
||||
min-height: 80px;
|
||||
max-height: 90px;
|
||||
RogItem {
|
||||
padding: 0px;
|
||||
VerticalBox {
|
||||
Text {
|
||||
text: @tr("Zone");
|
||||
vertical-alignment: TextVerticalAlignment.center;
|
||||
horizontal-alignment: TextHorizontalAlignment.center;
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
// enabled: AuraPageData.led_mode == ;
|
||||
ComboBox {
|
||||
// enabled: AuraPageData.led_mode == ;
|
||||
enabled: false;
|
||||
current_index <=> AuraPageData.zone;
|
||||
current_value: AuraPageData.zone_names[self.current-index];
|
||||
model <=> AuraPageData.zone_names;
|
||||
selected => {
|
||||
AuraPageData.led_mode_data.zone = self.current-index;
|
||||
AuraPageData.set_led_mode_data(AuraPageData.led_mode_data);
|
||||
current_index <=> AuraPageData.zone;
|
||||
current_value: AuraPageData.zone_names[self.current-index];
|
||||
model <=> AuraPageData.zone_names;
|
||||
selected => {
|
||||
AuraPageData.led_mode_data.zone = self.current-index;
|
||||
AuraPageData.set_led_mode_data(AuraPageData.led_mode_data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RogItem {
|
||||
padding: 0px;
|
||||
VerticalBox {
|
||||
Text {
|
||||
text: @tr("Direction");
|
||||
vertical-alignment: TextVerticalAlignment.center;
|
||||
horizontal-alignment: TextHorizontalAlignment.center;
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
enabled: AuraPageData.led_mode == 3;
|
||||
current_index <=> AuraPageData.direction;
|
||||
current_value: AuraPageData.direction_names[self.current-index];
|
||||
model <=> AuraPageData.direction_names;
|
||||
selected => {
|
||||
AuraPageData.led_mode_data.direction = self.current-index;
|
||||
AuraPageData.set_led_mode_data(AuraPageData.led_mode_data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RogItem {
|
||||
padding: 0px;
|
||||
VerticalBox {
|
||||
Text {
|
||||
text: @tr("Speed");
|
||||
vertical-alignment: TextVerticalAlignment.center;
|
||||
horizontal-alignment: TextHorizontalAlignment.center;
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
enabled: AuraPageData.led_mode == 1 || AuraPageData.led_mode == 2 || AuraPageData.led_mode == 3 || AuraPageData.led_mode == 4 || AuraPageData.led_mode == 5 || AuraPageData.led_mode == 6 || AuraPageData.led_mode == 7 || AuraPageData.led_mode == 8;
|
||||
current_index <=> AuraPageData.speed;
|
||||
current_value: AuraPageData.speed_names[self.current-index];
|
||||
model <=> AuraPageData.speed_names;
|
||||
selected => {
|
||||
AuraPageData.led_mode_data.speed = self.current-index;
|
||||
AuraPageData.set_led_mode_data(AuraPageData.led_mode_data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RogItem {
|
||||
padding: 0px;
|
||||
VerticalBox {
|
||||
Text {
|
||||
text: @tr("Direction");
|
||||
vertical-alignment: TextVerticalAlignment.center;
|
||||
horizontal-alignment: TextHorizontalAlignment.center;
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
enabled: AuraPageData.led_mode == 3;
|
||||
current_index <=> AuraPageData.direction;
|
||||
current_value: AuraPageData.direction_names[self.current-index];
|
||||
model <=> AuraPageData.direction_names;
|
||||
selected => {
|
||||
AuraPageData.led_mode_data.direction = self.current-index;
|
||||
AuraPageData.set_led_mode_data(AuraPageData.led_mode_data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RogItem {
|
||||
padding: 0px;
|
||||
VerticalBox {
|
||||
Text {
|
||||
text: @tr("Speed");
|
||||
vertical-alignment: TextVerticalAlignment.center;
|
||||
horizontal-alignment: TextHorizontalAlignment.center;
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
enabled: AuraPageData.led_mode == 1 || AuraPageData.led_mode == 2 || AuraPageData.led_mode == 3 || AuraPageData.led_mode == 4 || AuraPageData.led_mode == 5 || AuraPageData.led_mode == 6 || AuraPageData.led_mode == 7 || AuraPageData.led_mode == 8;
|
||||
current_index <=> AuraPageData.speed;
|
||||
current_value: AuraPageData.speed_names[self.current-index];
|
||||
model <=> AuraPageData.speed_names;
|
||||
selected => {
|
||||
AuraPageData.led_mode_data.speed = self.current-index;
|
||||
AuraPageData.set_led_mode_data(AuraPageData.led_mode_data);
|
||||
}
|
||||
HorizontalLayout {
|
||||
Button {
|
||||
text: @tr("Power Settings");
|
||||
clicked => {
|
||||
root.show_fade_cover = true;
|
||||
root.show_aura_power = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HorizontalBox {
|
||||
Button {
|
||||
text: @tr("Power Settings");
|
||||
clicked => {
|
||||
root.show_fade_cover = true;
|
||||
root.show_aura_power = true;
|
||||
}
|
||||
if root.show_fade_cover: Rectangle {
|
||||
background: Palette.background;
|
||||
opacity: 0.8;
|
||||
TouchArea {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if root.show_fade_cover: Rectangle {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: Palette.background;
|
||||
opacity: 0.8;
|
||||
TouchArea {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
if root.show_aura_power && AuraPageData.aura_type == AuraDevType.New: Rectangle {
|
||||
if root.show_aura_power && AuraPageData.device_type == AuraDevType.New: Rectangle {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
opacity: 1;
|
||||
@@ -206,11 +210,12 @@ export component PageAura inherits Rectangle {
|
||||
padding: 30px;
|
||||
padding-top: 10px;
|
||||
spacing: 10px;
|
||||
alignment: LayoutAlignment.start;
|
||||
|
||||
for state[idx] in AuraPageData.led_power.states: zone := AuraPowerGroup {
|
||||
group-title: AuraPageData.power_zone_names[state.zone_name_idx];
|
||||
// TODO: use the zone name
|
||||
boot_checked: state.boot;
|
||||
boot_checked: state.boot;
|
||||
boot_toggled => {
|
||||
AuraPageData.led_power.states[idx].boot = zone.boot_checked;
|
||||
AuraPageData.set_led_power(AuraPageData.led_power);
|
||||
@@ -245,4 +250,57 @@ export component PageAura inherits Rectangle {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if root.show_aura_power && AuraPageData.device_type == AuraDevType.Old: Rectangle {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
opacity: 1;
|
||||
ScrollView {
|
||||
VerticalLayout {
|
||||
padding: 30px;
|
||||
padding-top: 10px;
|
||||
spacing: 10px;
|
||||
alignment: LayoutAlignment.start;
|
||||
|
||||
Text {
|
||||
text: "TODO: In progress";
|
||||
}
|
||||
|
||||
for state[idx] in AuraPageData.led_power.states: old_zone := AuraPowerGroupOld {
|
||||
group-title: @tr("Power Zones");
|
||||
zone_strings <=> AuraPageData.power_zone_names_old;
|
||||
selected_zone => {
|
||||
AuraPageData.led_power.states[idx].zone = AuraPageData.supported_power_zones[old_zone.current_zone];
|
||||
AuraPageData.set_led_power(AuraPageData.led_power);
|
||||
}
|
||||
boot_checked: state.boot;
|
||||
boot_toggled => {
|
||||
AuraPageData.led_power.states[idx].boot = old_zone.boot_checked;
|
||||
AuraPageData.set_led_power(AuraPageData.led_power);
|
||||
}
|
||||
awake_checked: state.awake;
|
||||
awake_toggled => {
|
||||
AuraPageData.led_power.states[idx].awake = old_zone.awake_checked;
|
||||
AuraPageData.set_led_power(AuraPageData.led_power);
|
||||
}
|
||||
sleep_checked: state.sleep;
|
||||
sleep_toggled => {
|
||||
AuraPageData.led_power.states[idx].sleep = old_zone.sleep_checked;
|
||||
AuraPageData.set_led_power(AuraPageData.led_power);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
x: root.width - self.width - 6px;
|
||||
y: 6px;
|
||||
text: "X";
|
||||
height: 40px;
|
||||
clicked => {
|
||||
root.show_aura_power = false;
|
||||
root.show_fade_cover = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ component FanTab inherits Rectangle {
|
||||
HorizontalLayout {
|
||||
if root.tab_enabled: Graph {
|
||||
nodes <=> root.nodes;
|
||||
|
||||
}
|
||||
if !root.tab_enabled: Rectangle {
|
||||
Text {
|
||||
|
||||
@@ -43,8 +43,12 @@ export global SystemPageData {
|
||||
callback set_throttle_policy_linked_epp(bool);
|
||||
in-out property <int> throttle_policy_on_ac: 0;
|
||||
callback set_throttle_policy_on_ac(int);
|
||||
in-out property <bool> change_throttle_policy_on_ac: true;
|
||||
callback set_change_throttle_policy_on_ac(bool);
|
||||
in-out property <int> throttle_policy_on_battery: 0;
|
||||
callback set_throttle_policy_on_battery(int);
|
||||
in-out property <bool> change_throttle_policy_on_battery: true;
|
||||
callback set_change_throttle_policy_on_battery(bool);
|
||||
in-out property <bool> panel_od;
|
||||
callback set_panel_od(bool);
|
||||
in-out property <bool> boot_sound;
|
||||
@@ -340,23 +344,45 @@ export component PageSystem inherits Rectangle {
|
||||
text: @tr("Throttle Policy for power state");
|
||||
}
|
||||
|
||||
SystemDropdown {
|
||||
text: @tr("Throttle Policy on Battery");
|
||||
current_index <=> SystemPageData.throttle_policy_on_battery;
|
||||
current_value: SystemPageData.throttle_policy_choices[SystemPageData.throttle_policy_on_battery];
|
||||
model <=> SystemPageData.throttle_policy_choices;
|
||||
selected => {
|
||||
SystemPageData.set_throttle_policy_on_battery(SystemPageData.throttle_policy_on_battery)
|
||||
HorizontalLayout {
|
||||
spacing: 10px;
|
||||
SystemDropdown {
|
||||
text: @tr("Throttle Policy on Battery");
|
||||
current_index <=> SystemPageData.throttle_policy_on_battery;
|
||||
current_value: SystemPageData.throttle_policy_choices[SystemPageData.throttle_policy_on_battery];
|
||||
model <=> SystemPageData.throttle_policy_choices;
|
||||
selected => {
|
||||
SystemPageData.set_throttle_policy_on_battery(SystemPageData.throttle_policy_on_battery)
|
||||
}
|
||||
}
|
||||
|
||||
SystemToggle {
|
||||
text: @tr("Enabled");
|
||||
checked <=> SystemPageData.change_throttle_policy_on_battery;
|
||||
toggled => {
|
||||
SystemPageData.set_change_throttle_policy_on_battery(SystemPageData.change_throttle_policy_on_battery);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SystemDropdown {
|
||||
text: @tr("Throttle Policy on AC");
|
||||
current_index <=> SystemPageData.throttle_policy_on_ac;
|
||||
current_value: SystemPageData.throttle_policy_choices[SystemPageData.throttle_policy_on_ac];
|
||||
model <=> SystemPageData.throttle_policy_choices;
|
||||
selected => {
|
||||
SystemPageData.set_throttle_policy_on_ac(SystemPageData.throttle_policy_on_ac)
|
||||
HorizontalLayout {
|
||||
spacing: 10px;
|
||||
SystemDropdown {
|
||||
text: @tr("Throttle Policy on AC");
|
||||
current_index <=> SystemPageData.throttle_policy_on_ac;
|
||||
current_value: SystemPageData.throttle_policy_choices[SystemPageData.throttle_policy_on_ac];
|
||||
model <=> SystemPageData.throttle_policy_choices;
|
||||
selected => {
|
||||
SystemPageData.set_throttle_policy_on_ac(SystemPageData.throttle_policy_on_ac)
|
||||
}
|
||||
}
|
||||
|
||||
SystemToggle {
|
||||
text: @tr("Enabled");
|
||||
checked <=> SystemPageData.change_throttle_policy_on_ac;
|
||||
toggled => {
|
||||
SystemPageData.set_change_throttle_policy_on_ac(SystemPageData.change_throttle_policy_on_ac);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ export enum AuraDevType {
|
||||
New,
|
||||
Old,
|
||||
Tuf,
|
||||
ScsiExtDisk,
|
||||
Unknown,
|
||||
}
|
||||
|
||||
export struct AuraEffect {
|
||||
@@ -25,7 +27,7 @@ export enum PowerZones {
|
||||
Lightbar,
|
||||
Lid,
|
||||
RearGlow,
|
||||
KeyboardAndLightbar
|
||||
KeyboardAndLightbar,
|
||||
}
|
||||
|
||||
export struct AuraPowerState {
|
||||
@@ -42,6 +44,7 @@ export struct LaptopAuraPower {
|
||||
}
|
||||
|
||||
export global AuraPageData {
|
||||
// The ordering must match the rog-aura crate
|
||||
in-out property <[string]> power_zone_names: [
|
||||
@tr("Aura power zone" => "Logo"),
|
||||
@tr("Aura power zone" => "Keyboard"),
|
||||
@@ -50,6 +53,13 @@ export global AuraPageData {
|
||||
@tr("Aura power zone" => "Rear Glow"),
|
||||
@tr("Aura power zone" => "Keyboard and Lightbar"),
|
||||
];
|
||||
// Exists only for the older 0x1866 keybaords. On page setup it must
|
||||
// be set to match the supported_power_zones
|
||||
in-out property <[string]> power_zone_names_old: [
|
||||
@tr("Aura power zone" => "Keyboard"),
|
||||
@tr("Aura power zone" => "Lightbar"),
|
||||
@tr("Aura power zone" => "Keyboard and Lightbar"),
|
||||
];
|
||||
in-out property <[string]> brightness_names: [
|
||||
@tr("Aura brightness" => "Off"),
|
||||
@tr("Aura brightness" => "Low"),
|
||||
@@ -135,13 +145,12 @@ export global AuraPageData {
|
||||
}
|
||||
callback set_hex_from_colour(color) -> string;
|
||||
callback set_hex_to_colour(string) -> color;
|
||||
in-out property <AuraDevType> aura_type: AuraDevType.New;
|
||||
in-out property <AuraDevType> device_type: AuraDevType.Old;
|
||||
// List of indexes to power_zone_names. Must correspond to rog-aura crate
|
||||
in-out property <[PowerZones]> supported_power_zones: [
|
||||
PowerZones.Keyboard,
|
||||
PowerZones.RearGlow,
|
||||
PowerZones.Lid,
|
||||
PowerZones.Lightbar,
|
||||
PowerZones.Logo
|
||||
PowerZones.KeyboardAndLightbar,
|
||||
];
|
||||
in-out property <LaptopAuraPower> led_power: {
|
||||
states: [{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Palette, VerticalBox, HorizontalBox, GroupBox } from "std-widgets.slint";
|
||||
import { SystemToggleVert } from "common.slint";
|
||||
import { SystemToggleVert, SystemDropdown } from "common.slint";
|
||||
import { PowerZones } from "../types/aura_types.slint";
|
||||
|
||||
export component AuraPowerGroup inherits Rectangle {
|
||||
min-width: row.min-width;
|
||||
@@ -68,3 +69,74 @@ export component AuraPowerGroup inherits Rectangle {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export component AuraPowerGroupOld inherits Rectangle {
|
||||
min-width: row.min-width;
|
||||
border-radius: 20px;
|
||||
background: Palette.alternate-background;
|
||||
opacity: 0.9;
|
||||
in-out property <int> current_zone;
|
||||
in-out property <[int]> zones;
|
||||
in-out property <[string]> zone_strings;
|
||||
in-out property <string> group-title;
|
||||
in-out property <bool> boot_checked;
|
||||
in-out property <bool> awake_checked;
|
||||
in-out property <bool> sleep_checked;
|
||||
callback boot_toggled(bool);
|
||||
callback awake_toggled(bool);
|
||||
callback sleep_toggled(bool);
|
||||
callback selected_zone(int);
|
||||
VerticalBox {
|
||||
spacing: 10px;
|
||||
Text {
|
||||
font-size: 18px;
|
||||
color: Palette.alternate-foreground;
|
||||
horizontal-alignment: TextHorizontalAlignment.center;
|
||||
text <=> root.group-title;
|
||||
}
|
||||
|
||||
row := HorizontalBox {
|
||||
alignment: LayoutAlignment.center;
|
||||
|
||||
SystemDropdown {
|
||||
text: @tr("Zone Selection");
|
||||
current_index <=> root.current_zone;
|
||||
current_value: root.zone_strings[root.current_zone];
|
||||
model <=> root.zone_strings;
|
||||
selected => {
|
||||
root.selected_zone(root.current_zone);
|
||||
}
|
||||
}
|
||||
|
||||
SystemToggleVert {
|
||||
min-width: 96px;
|
||||
max-height: 42px;
|
||||
text: @tr("Boot");
|
||||
checked <=> root.boot_checked;
|
||||
toggled => {
|
||||
root.boot_toggled(self.checked);
|
||||
}
|
||||
}
|
||||
|
||||
SystemToggleVert {
|
||||
min-width: 96px;
|
||||
max-height: 42px;
|
||||
text: @tr("Awake");
|
||||
checked <=> root.awake_checked;
|
||||
toggled => {
|
||||
root.awake_toggled(self.checked);
|
||||
}
|
||||
}
|
||||
|
||||
SystemToggleVert {
|
||||
min-width: 96px;
|
||||
max-height: 42px;
|
||||
text: @tr("Sleep");
|
||||
checked <=> root.sleep_checked;
|
||||
toggled => {
|
||||
root.sleep_toggled(self.checked);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ export component ColourSlider inherits VerticalLayout {
|
||||
property <string> hex: "#FF0000";
|
||||
in-out property <float> c1value <=> c1.value;
|
||||
in-out property <float> c2value <=> c2.value;
|
||||
in-out property <float> c3value <=> c3.value;
|
||||
property <color> base_colour: Colors.red;
|
||||
in-out property <color> final_colour: Colors.red;
|
||||
in-out property <brush> colourbox: final_colour;
|
||||
@@ -53,39 +54,52 @@ export component ColourSlider inherits VerticalLayout {
|
||||
hsv(350, 1, 1),
|
||||
hsv(360, 1, 1),
|
||||
];
|
||||
property <[color]> base_shade: [
|
||||
blend_lightness(base_colour, 1.0),
|
||||
blend_lightness(base_colour, 0.9),
|
||||
blend_lightness(base_colour, 0.8),
|
||||
blend_lightness(base_colour, 0.7),
|
||||
blend_lightness(base_colour, 0.6),
|
||||
blend_lightness(base_colour, 0.5),
|
||||
blend_lightness(base_colour, 0.4),
|
||||
blend_lightness(base_colour, 0.3),
|
||||
blend_lightness(base_colour, 0.2),
|
||||
blend_lightness(base_colour, 0.1),
|
||||
blend_lightness(base_colour, 0.0)
|
||||
property <[color]> base_saturation: [
|
||||
hsv(base_colour.to-hsv().hue, 1, 1),
|
||||
hsv(base_colour.to-hsv().hue, 0.9, 1),
|
||||
hsv(base_colour.to-hsv().hue, 0.8, 1),
|
||||
hsv(base_colour.to-hsv().hue, 0.7, 1),
|
||||
hsv(base_colour.to-hsv().hue, 0.6, 1),
|
||||
hsv(base_colour.to-hsv().hue, 0.5, 1),
|
||||
hsv(base_colour.to-hsv().hue, 0.4, 1),
|
||||
hsv(base_colour.to-hsv().hue, 0.3, 1),
|
||||
hsv(base_colour.to-hsv().hue, 0.2, 1),
|
||||
hsv(base_colour.to-hsv().hue, 0.1, 1),
|
||||
hsv(base_colour.to-hsv().hue, 0, 1),
|
||||
];
|
||||
function blend_lightness(c1: color,f: float) -> color {
|
||||
rgb(c1.red * f, c1.green * f, c1.blue * f)
|
||||
}
|
||||
//
|
||||
function set_base_colour(){
|
||||
root.base_colour = base_colours[c1.value].mix(base_colours[c1.value + 1], c1.value - Math.floor(c1.value));
|
||||
root.final_colour = blend_lightness(base_colour, ((base_shade.length - c2.value) / base_shade.length));
|
||||
property <[color]> base_value: [
|
||||
hsv(base_colour.to-hsv().hue, 1, 1),
|
||||
hsv(base_colour.to-hsv().hue, 1, 0.9),
|
||||
hsv(base_colour.to-hsv().hue, 1, 0.8),
|
||||
hsv(base_colour.to-hsv().hue, 1, 0.7),
|
||||
hsv(base_colour.to-hsv().hue, 1, 0.6),
|
||||
hsv(base_colour.to-hsv().hue, 1, 0.5),
|
||||
hsv(base_colour.to-hsv().hue, 1, 0.4),
|
||||
hsv(base_colour.to-hsv().hue, 1, 0.3),
|
||||
hsv(base_colour.to-hsv().hue, 1, 0.2),
|
||||
hsv(base_colour.to-hsv().hue, 1, 0.1),
|
||||
hsv(base_colour.to-hsv().hue, 1, 0),
|
||||
];
|
||||
|
||||
function set_base_colour() {
|
||||
root.base_colour = hsv(c1.value / base_colours.length * 360, 1, 1);
|
||||
root.final_colour = hsv(base_colour.to-hsv().hue, ((base_saturation.length - c2.value) / base_saturation.length), ((base_value.length - c3.value) / base_value.length));
|
||||
root.colourbox = root.final_colour;
|
||||
}
|
||||
//
|
||||
|
||||
callback external_colour_change();
|
||||
|
||||
external_colour_change => {
|
||||
if (root.final_colour.to-hsv().hue < 0) {
|
||||
c1.value = (root.base_colours.length - 1) * ((root.final_colour.to-hsv().hue + 360) / 360);
|
||||
c1.value = root.base_colours.length * (root.final_colour.to-hsv().hue + 360) / 360;
|
||||
} else {
|
||||
c1.value = (root.base_colours.length - 1) * (root.final_colour.to-hsv().hue / 360);
|
||||
c1.value = root.base_colours.length * root.final_colour.to-hsv().hue / 360;
|
||||
}
|
||||
c2.value = root.base_shade.length - (root.base_shade.length * root.final_colour.to-hsv().value);
|
||||
// c1.value = root.base_colours.length * 360 / root.final_colour.to-hsv().hue;
|
||||
c2.value = root.base_saturation.length - root.base_saturation.length * root.final_colour.to-hsv().saturation;
|
||||
c3.value = root.base_value.length - root.base_value.length * root.final_colour.to-hsv().value;
|
||||
root.set_base_colour();
|
||||
hex = set_hex_from_colour(final_colour);
|
||||
}
|
||||
Rectangle {
|
||||
height: 32px;
|
||||
@@ -100,7 +114,7 @@ export component ColourSlider inherits VerticalLayout {
|
||||
width: parent.width;
|
||||
height: parent.height;
|
||||
minimum: 0;
|
||||
maximum: root.base_colours.length - 1;
|
||||
maximum: root.base_colours.length;
|
||||
// One less than the array length
|
||||
changed => {
|
||||
set_base_colour();
|
||||
@@ -118,14 +132,38 @@ export component ColourSlider inherits VerticalLayout {
|
||||
border-radius: 7px;
|
||||
border-color: Palette.border;
|
||||
// 11 colours
|
||||
background: !root.enabled ? Palette.alternate-background : @linear-gradient(90deg, base_shade[0], base_shade[1], base_shade[2], base_shade[3], base_shade[4], base_shade[5], base_shade[6], base_shade[7], base_shade[8], base_shade[9], base_shade[10]);
|
||||
background: !root.enabled ? Palette.alternate-background : @linear-gradient(90deg, base_saturation[0], base_saturation[1], base_saturation[2], base_saturation[3], base_saturation[4], base_saturation[5], base_saturation[6], base_saturation[7], base_saturation[8], base_saturation[9], base_saturation[10]);
|
||||
clip: true;
|
||||
c2 := Slider {
|
||||
enabled <=> root.enabled;
|
||||
width: parent.width;
|
||||
height: parent.height;
|
||||
minimum: 0;
|
||||
maximum: 11;
|
||||
maximum: root.base_saturation.length;
|
||||
changed => {
|
||||
set_base_colour();
|
||||
hex = set_hex_from_colour(final_colour);
|
||||
}
|
||||
released => {
|
||||
root.released();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
height: 32px;
|
||||
border-width: 2px;
|
||||
border-radius: 7px;
|
||||
border-color: Palette.border;
|
||||
// 11 colours
|
||||
background: !root.enabled ? Palette.alternate-background : @linear-gradient(90deg, base_value[0], base_value[1], base_value[2], base_value[3], base_value[4], base_value[5], base_value[6], base_value[7], base_value[8], base_value[9], base_value[10]);
|
||||
clip: true;
|
||||
c3 := Slider {
|
||||
enabled <=> root.enabled;
|
||||
width: parent.width;
|
||||
height: parent.height;
|
||||
minimum: 0;
|
||||
maximum: root.base_value.length;
|
||||
changed => {
|
||||
set_base_colour();
|
||||
hex = set_hex_from_colour(final_colour);
|
||||
|
||||
@@ -5,7 +5,8 @@ export component RogItem inherits Rectangle {
|
||||
border-color: Palette.border;
|
||||
border-width: 3px;
|
||||
border-radius: 10px;
|
||||
min-height: 46px;
|
||||
min-height: 48px;
|
||||
max-height: 56px;
|
||||
}
|
||||
|
||||
export component SystemSlider inherits RogItem {
|
||||
@@ -54,6 +55,7 @@ export component SystemToggle inherits RogItem {
|
||||
in-out property <bool> checked;
|
||||
callback toggled(bool);
|
||||
HorizontalLayout {
|
||||
spacing: 6px;
|
||||
HorizontalLayout {
|
||||
alignment: LayoutAlignment.start;
|
||||
padding-left: 10px;
|
||||
|
||||
@@ -26,16 +26,20 @@ export component Graph inherits Rectangle {
|
||||
y: root.graph_padding;
|
||||
function scale_x_to_graph(x: length) -> length {
|
||||
((x - node_min.x) / (node_max.x - node_min.x)) * graph.width
|
||||
}//
|
||||
}
|
||||
//
|
||||
function scale_y_to_graph(y: length) -> length {
|
||||
((y - node_min.y) / (node_max.y - node_min.y)) * graph.height
|
||||
}//
|
||||
}
|
||||
//
|
||||
function scale_x_to_node(x: length) -> length {
|
||||
(x / graph.width) * (node_max.x - node_min.x)
|
||||
}//
|
||||
}
|
||||
//
|
||||
function scale_y_to_node(y: length) -> length {
|
||||
(y / graph.height) * (node_max.y - node_min.y)
|
||||
}//
|
||||
}
|
||||
//
|
||||
|
||||
for n in 11: Path {
|
||||
viewbox-width: self.width / 1px;
|
||||
@@ -43,21 +47,23 @@ export component Graph inherits Rectangle {
|
||||
stroke: Palette.alternate-foreground.darker(200%);
|
||||
stroke-width: 1px;
|
||||
MoveTo {
|
||||
x: scale_x_to_graph(n*10px) / 1px;
|
||||
y: 0; // scale_y_to_graph(n*1px) / 1px;
|
||||
x: scale_x_to_graph(n * 10px) / 1px;
|
||||
y: 0;
|
||||
// scale_y_to_graph(n*1px) / 1px;
|
||||
}
|
||||
|
||||
LineTo {
|
||||
x: scale_x_to_graph(n*10px) / 1px;
|
||||
y: graph.height / 1px; //scale_y_to_graph(n*1px) / 1px;
|
||||
x: scale_x_to_graph(n * 10px) / 1px;
|
||||
y: graph.height / 1px;
|
||||
//scale_y_to_graph(n*1px) / 1px;
|
||||
}
|
||||
}
|
||||
|
||||
for n in 11: Text {
|
||||
color: Palette.accent-background;
|
||||
font-size <=> root.axis_font_size;
|
||||
text: "\{n*10}c";
|
||||
x: scale_x_to_graph(n*10px) - self.width / 3;
|
||||
text: "\{n * 10}c";
|
||||
x: scale_x_to_graph(n * 10px) - self.width / 3;
|
||||
y: graph.height + 2px;
|
||||
}
|
||||
|
||||
@@ -67,22 +73,24 @@ export component Graph inherits Rectangle {
|
||||
stroke: Palette.alternate-foreground.darker(200%);
|
||||
stroke-width: 1px;
|
||||
MoveTo {
|
||||
x: 0; //scale_x_to_graph(n*10px) / 1px;
|
||||
y: scale_y_to_graph(n*25.5px) / 1px;
|
||||
x: 0;
|
||||
//scale_x_to_graph(n*10px) / 1px;
|
||||
y: scale_y_to_graph(n * 25.5px) / 1px;
|
||||
}
|
||||
|
||||
LineTo {
|
||||
x: graph.width / 1px; //scale_x_to_graph(n*10px) / 1px;
|
||||
y: scale_y_to_graph(n*25.5px) / 1px;
|
||||
x: graph.width / 1px;
|
||||
//scale_x_to_graph(n*10px) / 1px;
|
||||
y: scale_y_to_graph(n * 25.5px) / 1px;
|
||||
}
|
||||
}
|
||||
|
||||
for n in 11: Text {
|
||||
color: Palette.accent-background;
|
||||
font-size <=> root.axis_font_size;
|
||||
text: "\{n*10}%";
|
||||
text: "\{n * 10}%";
|
||||
x: - self.width;
|
||||
y: graph.height - scale_y_to_graph(n*25.5px) - self.height / 2;
|
||||
y: graph.height - scale_y_to_graph(n * 25.5px) - self.height / 2;
|
||||
}
|
||||
|
||||
for l[idx] in nodes: path := Rectangle {
|
||||
@@ -115,7 +123,8 @@ export component Graph inherits Rectangle {
|
||||
tip.background: Palette.accent-background;
|
||||
tip.opacity: 1.0;
|
||||
}
|
||||
]//
|
||||
]
|
||||
//
|
||||
point := Rectangle {
|
||||
background: Palette.control-foreground;
|
||||
x: scale_x_to_graph(n.x) - self.width / 2;
|
||||
@@ -133,7 +142,6 @@ export component Graph inherits Rectangle {
|
||||
} else if n.x + scale_x_to_node(self.mouse-x - self.pressed-x) < nodes[idx - 1].x {
|
||||
n.x = nodes[idx - 1].x + pad;
|
||||
}
|
||||
|
||||
if n.y + scale_y_to_node(self.height - self.mouse-y - self.pressed-y) > nodes[idx + 1].y {
|
||||
n.y = nodes[idx + 1].y - pad;
|
||||
} else if n.y + scale_y_to_node(self.height - self.mouse-y - self.pressed-y) < nodes[idx - 1].y {
|
||||
@@ -145,7 +153,6 @@ export component Graph inherits Rectangle {
|
||||
} else if n.x + scale_x_to_node(self.mouse-x - self.pressed-x) > nodes[idx + 1].x {
|
||||
n.x = nodes[idx + 1].x - pad;
|
||||
}
|
||||
|
||||
if n.y - scale_y_to_node(self.mouse-y - self.pressed-y) < 0.0 {
|
||||
n.y = 1px;
|
||||
} else if n.y + scale_y_to_node(self.height - self.mouse-y - self.pressed-y) > nodes[idx + 1].y {
|
||||
@@ -157,14 +164,14 @@ export component Graph inherits Rectangle {
|
||||
} else if n.x + scale_x_to_node(self.mouse-x - self.pressed-x) < nodes[idx - 1].x {
|
||||
n.x = nodes[idx - 1].x + pad;
|
||||
}
|
||||
|
||||
if n.y - scale_y_to_node(self.mouse-y - self.pressed-y) > scale_y_to_node(graph.height) {
|
||||
n.y = scale_y_to_node(graph.height - 1px);
|
||||
} else if n.y + scale_y_to_node(self.height - self.mouse-y - self.pressed-y) < nodes[idx - 1].y {
|
||||
n.y = nodes[idx - 1].y + pad;
|
||||
}
|
||||
}
|
||||
}//
|
||||
}
|
||||
//
|
||||
moved => {
|
||||
if (self.pressed) {
|
||||
n.x += scale_x_to_node(self.mouse-x - self.pressed-x);
|
||||
@@ -190,27 +197,32 @@ export component Graph inherits Rectangle {
|
||||
height: label.preferred-height;
|
||||
function x_pos() -> length {
|
||||
scale_x_to_graph(n.x) - label.preferred-width - 8px
|
||||
}//
|
||||
}
|
||||
//
|
||||
function final_x_pos() -> length {
|
||||
if x_pos() > 0 {
|
||||
x_pos()
|
||||
} else {
|
||||
x_pos() + label.preferred-width
|
||||
}
|
||||
}//
|
||||
}
|
||||
//
|
||||
function y_pos() -> length {
|
||||
graph.height - scale_y_to_graph(n.y) - self.height - 4px
|
||||
}//
|
||||
}
|
||||
//
|
||||
function final_y_pos() -> length {
|
||||
if y_pos() > 0 {
|
||||
y_pos()
|
||||
} else {
|
||||
y_pos() + label.preferred-height
|
||||
}
|
||||
}//
|
||||
}
|
||||
//
|
||||
function fan_pct() -> int {
|
||||
Math.floor(n.y / 1px) / 255 * 100
|
||||
}//
|
||||
}
|
||||
//
|
||||
label := Text {
|
||||
color: Palette.accent-foreground;
|
||||
font-size: 16px;
|
||||
|
||||
@@ -7,3 +7,44 @@ pub mod zbus_platform;
|
||||
pub mod zbus_slash;
|
||||
|
||||
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
|
||||
pub fn list_iface_blocking() -> Result<Vec<String>, Box<dyn std::error::Error>> {
|
||||
let conn = zbus::blocking::Connection::system()?;
|
||||
let f = zbus::blocking::fdo::ObjectManagerProxy::new(&conn, "org.asuslinux.Daemon", "/")?;
|
||||
let interfaces = f.get_managed_objects()?;
|
||||
let mut ifaces = Vec::new();
|
||||
for v in interfaces.iter() {
|
||||
for k in v.1.keys() {
|
||||
ifaces.push(k.to_string());
|
||||
}
|
||||
}
|
||||
Ok(ifaces)
|
||||
}
|
||||
|
||||
pub fn has_iface_blocking(iface: &str) -> Result<bool, Box<dyn std::error::Error>> {
|
||||
let conn = zbus::blocking::Connection::system()?;
|
||||
let f = zbus::blocking::fdo::ObjectManagerProxy::new(&conn, "org.asuslinux.Daemon", "/")?;
|
||||
let interfaces = f.get_managed_objects()?;
|
||||
for v in interfaces.iter() {
|
||||
for k in v.1.keys() {
|
||||
if k.as_str() == iface {
|
||||
return Ok(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(false)
|
||||
}
|
||||
|
||||
pub async fn has_iface(iface: &str) -> Result<bool, Box<dyn std::error::Error>> {
|
||||
let conn = zbus::Connection::system().await?;
|
||||
let f = zbus::fdo::ObjectManagerProxy::new(&conn, "org.asuslinux.Daemon", "/").await?;
|
||||
let interfaces = f.get_managed_objects().await?;
|
||||
for v in interfaces.iter() {
|
||||
for k in v.1.keys() {
|
||||
if k.as_str() == iface {
|
||||
return Ok(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(false)
|
||||
}
|
||||
|
||||
@@ -36,9 +36,6 @@ trait Platform {
|
||||
/// NextThrottleThermalPolicy method
|
||||
fn next_throttle_thermal_policy(&self) -> zbus::Result<()>;
|
||||
|
||||
/// SupportedInterfaces method
|
||||
fn supported_interfaces(&self) -> zbus::Result<Vec<String>>;
|
||||
|
||||
/// SupportedProperties method
|
||||
fn supported_properties(&self) -> zbus::Result<Vec<Properties>>;
|
||||
|
||||
@@ -146,12 +143,24 @@ trait Platform {
|
||||
#[zbus(property)]
|
||||
fn set_throttle_policy_on_ac(&self, throttle_policy: ThrottlePolicy) -> zbus::Result<()>;
|
||||
|
||||
/// ChangeThrottlePolicyOnAc property
|
||||
#[zbus(property)]
|
||||
fn change_throttle_policy_on_ac(&self) -> zbus::Result<bool>;
|
||||
#[zbus(property)]
|
||||
fn set_change_throttle_policy_on_ac(&self, change: bool) -> zbus::Result<()>;
|
||||
|
||||
/// ThrottlePolicyOnBattery property
|
||||
#[zbus(property)]
|
||||
fn throttle_policy_on_battery(&self) -> zbus::Result<ThrottlePolicy>;
|
||||
#[zbus(property)]
|
||||
fn set_throttle_policy_on_battery(&self, throttle_policy: ThrottlePolicy) -> zbus::Result<()>;
|
||||
|
||||
/// ChangeThrottlePolicyOnAc property
|
||||
#[zbus(property)]
|
||||
fn change_throttle_policy_on_battery(&self) -> zbus::Result<bool>;
|
||||
#[zbus(property)]
|
||||
fn set_change_throttle_policy_on_battery(&self, change: bool) -> zbus::Result<()>;
|
||||
|
||||
/// ThrottleQuietEpp property
|
||||
#[zbus(property)]
|
||||
fn throttle_quiet_epp(&self) -> zbus::Result<CPUEPP>;
|
||||
|
||||
@@ -5,12 +5,15 @@ use log::{info, warn};
|
||||
use crate::error::{PlatformError, Result};
|
||||
use crate::{attr_u8, has_attr, set_attr_u8_array, to_device};
|
||||
|
||||
/// The sysfs control for backlight levels. This is only for the 3-step
|
||||
/// backlight setting, and for TUF laptops. It is not a hard requirement
|
||||
/// for Aura keyboards
|
||||
#[derive(Debug, Default, PartialEq, Eq, PartialOrd, Clone)]
|
||||
pub struct KeyboardLed {
|
||||
pub struct KeyboardBacklight {
|
||||
path: PathBuf,
|
||||
}
|
||||
|
||||
impl KeyboardLed {
|
||||
impl KeyboardBacklight {
|
||||
attr_u8!("brightness", path);
|
||||
|
||||
has_attr!("kbd_rgb_mode" path);
|
||||
@@ -59,7 +62,7 @@ impl KeyboardLed {
|
||||
});
|
||||
}
|
||||
Err(PlatformError::MissingFunction(
|
||||
"asus::kbd_backlight not found".into(),
|
||||
"KeyboardLed:new(), asus::kbd_backlight not found".into(),
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,13 +60,12 @@ impl AsusPower {
|
||||
info!("Found a battery");
|
||||
if battery.is_none() {
|
||||
info!("Checking battery attributes");
|
||||
if device
|
||||
.attribute_value("charge_control_end_threshold")
|
||||
.is_some()
|
||||
if let Some(current) =
|
||||
device.attribute_value("charge_control_end_threshold")
|
||||
{
|
||||
info!(
|
||||
"Found battery power at {:?}, matched \
|
||||
charge_control_end_threshold",
|
||||
charge_control_end_threshold. Current level: {current:?}",
|
||||
device.sysname()
|
||||
);
|
||||
battery = Some(device.syspath().to_path_buf());
|
||||
|
||||
Reference in New Issue
Block a user