mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Compare commits
41 Commits
6.1.22
...
d787f85605
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d787f85605 | ||
|
|
aa063c20fd | ||
|
|
8551908452 | ||
|
|
5ecb174b8f | ||
|
|
fa266bff5b | ||
|
|
f53f1f360f | ||
|
|
da19216b78 | ||
|
|
46efd4190f | ||
|
|
ed3022e25e | ||
|
|
7c10d6c6d9 | ||
|
|
af5f3a5c71 | ||
|
|
7d5ec5f2c7 | ||
|
|
1c8acf6de3 | ||
|
|
7b644e7ad6 | ||
|
|
0f02fe868c | ||
|
|
abd3100e30 | ||
|
|
6f651c2b85 | ||
|
|
93ec5d1bce | ||
|
|
5aea7f51c0 | ||
|
|
d03d8ce67f | ||
|
|
ae3693e0d9 | ||
|
|
c8b9248eda | ||
|
|
22098794fe | ||
|
|
10d49f4fc8 | ||
|
|
5aba2854b0 | ||
|
|
ea32ad6e0a | ||
|
|
ee0e612c04 | ||
|
|
e565ce748a | ||
|
|
7024941663 | ||
|
|
817a0165b5 | ||
|
|
efcd038f40 | ||
|
|
375d99b8fc | ||
|
|
3a206eb76f | ||
|
|
4449838282 | ||
|
|
58d740f77a | ||
|
|
f0488d9750 | ||
|
|
f1b9ae6f71 | ||
|
|
db5de3b854 | ||
|
|
7a3d39b8f1 | ||
|
|
7a5d6325c0 | ||
|
|
574b954866 |
14
CHANGELOG.md
14
CHANGELOG.md
@@ -2,7 +2,21 @@
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Added support for TUF keyboard powerstate control
|
||||||
|
|
||||||
|
## [6.2.0]
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Added aura support for FX607V: thanks @jomp16
|
||||||
|
- Added testing support for G835LW
|
||||||
|
- Added support for GU605C models slash lighting: thanks @Otters
|
||||||
|
- Restore fedora: thanks @ali205412
|
||||||
|
- Add support to G614F models slash lighting
|
||||||
|
|
||||||
## [6.1.22]
|
## [6.1.22]
|
||||||
|
|
||||||
|
### Changed
|
||||||
- Allow configuration of nv_tgp
|
- Allow configuration of nv_tgp
|
||||||
- Treat dGPU attributes as power profiles
|
- Treat dGPU attributes as power profiles
|
||||||
- Add EXPERTBOOK DMI match to ensure the service is loaded
|
- Add EXPERTBOOK DMI match to ensure the service is loaded
|
||||||
|
|||||||
193
Cargo.lock
generated
193
Cargo.lock
generated
@@ -114,9 +114,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "annotate-snippets"
|
name = "annotate-snippets"
|
||||||
version = "0.12.9"
|
version = "0.12.10"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a44baf24dd94e781f74dfe67ffee75a09a57971ddf0f615a178b4f6d404b48ff"
|
checksum = "15580ece6ea97cbf832d60ba19c021113469480852c6a2a6beb0db28f097bf1f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anstyle",
|
"anstyle",
|
||||||
"unicode-width",
|
"unicode-width",
|
||||||
@@ -180,7 +180,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "asusctl"
|
name = "asusctl"
|
||||||
version = "6.1.22"
|
version = "6.2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"dmi_id",
|
"dmi_id",
|
||||||
"env_logger",
|
"env_logger",
|
||||||
@@ -199,7 +199,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "asusd"
|
name = "asusd"
|
||||||
version = "6.1.22"
|
version = "6.2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cargo-husky",
|
"cargo-husky",
|
||||||
"concat-idents",
|
"concat-idents",
|
||||||
@@ -226,7 +226,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "asusd-user"
|
name = "asusd-user"
|
||||||
version = "6.1.22"
|
version = "6.2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"config-traits",
|
"config-traits",
|
||||||
"dirs",
|
"dirs",
|
||||||
@@ -783,9 +783,9 @@ checksum = "7b02b629252fe8ef6460461409564e2c21d0c8e77e0944f3d189ff06c4e932ad"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cc"
|
name = "cc"
|
||||||
version = "1.2.48"
|
version = "1.2.49"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c481bdbf0ed3b892f6f806287d72acd515b352a4ec27a208489b8c1bc839633a"
|
checksum = "90583009037521a116abf44494efecd645ba48b6622457080f080b85544e2215"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"find-msvc-tools",
|
"find-msvc-tools",
|
||||||
"jobserver",
|
"jobserver",
|
||||||
@@ -905,7 +905,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "config-traits"
|
name = "config-traits"
|
||||||
version = "6.1.22"
|
version = "6.2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"ron",
|
"ron",
|
||||||
@@ -954,7 +954,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "const-field-offset"
|
name = "const-field-offset"
|
||||||
version = "0.1.5"
|
version = "0.1.5"
|
||||||
source = "git+https://github.com/slint-ui/slint.git#af0b3822c64a5597e628c7ad487f1273f57356cf"
|
source = "git+https://github.com/slint-ui/slint.git#b85d29758ef9dbee47f62a1a6923066bb0436f20"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"const-field-offset-macro",
|
"const-field-offset-macro",
|
||||||
"field-offset",
|
"field-offset",
|
||||||
@@ -963,13 +963,22 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "const-field-offset-macro"
|
name = "const-field-offset-macro"
|
||||||
version = "0.1.5"
|
version = "0.1.5"
|
||||||
source = "git+https://github.com/slint-ui/slint.git#af0b3822c64a5597e628c7ad487f1273f57356cf"
|
source = "git+https://github.com/slint-ui/slint.git#b85d29758ef9dbee47f62a1a6923066bb0436f20"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.111",
|
"syn 2.0.111",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "convert_case"
|
||||||
|
version = "0.10.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9"
|
||||||
|
dependencies = [
|
||||||
|
"unicode-segmentation",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "copypasta"
|
name = "copypasta"
|
||||||
version = "0.10.2"
|
version = "0.10.2"
|
||||||
@@ -1166,21 +1175,23 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "derive_more"
|
name = "derive_more"
|
||||||
version = "2.0.1"
|
version = "2.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678"
|
checksum = "10b768e943bed7bf2cab53df09f4bc34bfd217cdb57d971e769874c9a6710618"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"derive_more-impl",
|
"derive_more-impl",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "derive_more-impl"
|
name = "derive_more-impl"
|
||||||
version = "2.0.1"
|
version = "2.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3"
|
checksum = "6d286bfdaf75e988b4a78e013ecd79c581e06399ab53fbacd2d916c2f904f30b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"convert_case",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
"rustc_version",
|
||||||
"syn 2.0.111",
|
"syn 2.0.111",
|
||||||
"unicode-xid",
|
"unicode-xid",
|
||||||
]
|
]
|
||||||
@@ -1254,7 +1265,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "dmi_id"
|
name = "dmi_id"
|
||||||
version = "6.1.22"
|
version = "6.2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"udev 0.8.0",
|
"udev 0.8.0",
|
||||||
@@ -1862,9 +1873,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gif"
|
name = "gif"
|
||||||
version = "0.14.0"
|
version = "0.14.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f954a9e9159ec994f73a30a12b96a702dde78f5547bcb561174597924f7d4162"
|
checksum = "f5df2ba84018d80c213569363bdcd0c64e6933c67fe4c1d60ecf822971a3c35e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"color_quant",
|
"color_quant",
|
||||||
"weezl",
|
"weezl",
|
||||||
@@ -2204,9 +2215,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hyper-util"
|
name = "hyper-util"
|
||||||
version = "0.1.18"
|
version = "0.1.19"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "52e9a2a24dc5c6821e71a7030e1e14b7b632acac55c40e9d2e082c621261bb56"
|
checksum = "727805d60e7938b76b826a6ef209eb70eaa1812794f9424d4a4e2d740662df5f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"futures-channel",
|
"futures-channel",
|
||||||
@@ -2226,7 +2237,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "i-slint-backend-linuxkms"
|
name = "i-slint-backend-linuxkms"
|
||||||
version = "1.15.0"
|
version = "1.15.0"
|
||||||
source = "git+https://github.com/slint-ui/slint.git#af0b3822c64a5597e628c7ad487f1273f57356cf"
|
source = "git+https://github.com/slint-ui/slint.git#b85d29758ef9dbee47f62a1a6923066bb0436f20"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"calloop 0.14.3",
|
"calloop 0.14.3",
|
||||||
"drm",
|
"drm",
|
||||||
@@ -2244,7 +2255,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "i-slint-backend-selector"
|
name = "i-slint-backend-selector"
|
||||||
version = "1.15.0"
|
version = "1.15.0"
|
||||||
source = "git+https://github.com/slint-ui/slint.git#af0b3822c64a5597e628c7ad487f1273f57356cf"
|
source = "git+https://github.com/slint-ui/slint.git#b85d29758ef9dbee47f62a1a6923066bb0436f20"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"i-slint-backend-linuxkms",
|
"i-slint-backend-linuxkms",
|
||||||
@@ -2257,7 +2268,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "i-slint-backend-winit"
|
name = "i-slint-backend-winit"
|
||||||
version = "1.15.0"
|
version = "1.15.0"
|
||||||
source = "git+https://github.com/slint-ui/slint.git#af0b3822c64a5597e628c7ad487f1273f57356cf"
|
source = "git+https://github.com/slint-ui/slint.git#b85d29758ef9dbee47f62a1a6923066bb0436f20"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"block2 0.6.2",
|
"block2 0.6.2",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
@@ -2296,7 +2307,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "i-slint-common"
|
name = "i-slint-common"
|
||||||
version = "1.15.0"
|
version = "1.15.0"
|
||||||
source = "git+https://github.com/slint-ui/slint.git#af0b3822c64a5597e628c7ad487f1273f57356cf"
|
source = "git+https://github.com/slint-ui/slint.git#b85d29758ef9dbee47f62a1a6923066bb0436f20"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"fontique",
|
"fontique",
|
||||||
"ttf-parser 0.25.1",
|
"ttf-parser 0.25.1",
|
||||||
@@ -2305,7 +2316,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "i-slint-compiler"
|
name = "i-slint-compiler"
|
||||||
version = "1.15.0"
|
version = "1.15.0"
|
||||||
source = "git+https://github.com/slint-ui/slint.git#af0b3822c64a5597e628c7ad487f1273f57356cf"
|
source = "git+https://github.com/slint-ui/slint.git#b85d29758ef9dbee47f62a1a6923066bb0436f20"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"annotate-snippets",
|
"annotate-snippets",
|
||||||
"by_address",
|
"by_address",
|
||||||
@@ -2333,7 +2344,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "i-slint-core"
|
name = "i-slint-core"
|
||||||
version = "1.15.0"
|
version = "1.15.0"
|
||||||
source = "git+https://github.com/slint-ui/slint.git#af0b3822c64a5597e628c7ad487f1273f57356cf"
|
source = "git+https://github.com/slint-ui/slint.git#b85d29758ef9dbee47f62a1a6923066bb0436f20"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"auto_enums",
|
"auto_enums",
|
||||||
"bitflags 2.10.0",
|
"bitflags 2.10.0",
|
||||||
@@ -2348,7 +2359,6 @@ dependencies = [
|
|||||||
"i-slint-common",
|
"i-slint-common",
|
||||||
"i-slint-core-macros",
|
"i-slint-core-macros",
|
||||||
"image",
|
"image",
|
||||||
"integer-sqrt",
|
|
||||||
"lyon_algorithms",
|
"lyon_algorithms",
|
||||||
"lyon_extra",
|
"lyon_extra",
|
||||||
"lyon_geom",
|
"lyon_geom",
|
||||||
@@ -2378,13 +2388,12 @@ dependencies = [
|
|||||||
"web-sys",
|
"web-sys",
|
||||||
"web-time",
|
"web-time",
|
||||||
"webbrowser",
|
"webbrowser",
|
||||||
"zeno",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "i-slint-core-macros"
|
name = "i-slint-core-macros"
|
||||||
version = "1.15.0"
|
version = "1.15.0"
|
||||||
source = "git+https://github.com/slint-ui/slint.git#af0b3822c64a5597e628c7ad487f1273f57356cf"
|
source = "git+https://github.com/slint-ui/slint.git#b85d29758ef9dbee47f62a1a6923066bb0436f20"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"quote",
|
"quote",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
@@ -2394,7 +2403,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "i-slint-renderer-femtovg"
|
name = "i-slint-renderer-femtovg"
|
||||||
version = "1.15.0"
|
version = "1.15.0"
|
||||||
source = "git+https://github.com/slint-ui/slint.git#af0b3822c64a5597e628c7ad487f1273f57356cf"
|
source = "git+https://github.com/slint-ui/slint.git#b85d29758ef9dbee47f62a1a6923066bb0436f20"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"const-field-offset",
|
"const-field-offset",
|
||||||
@@ -2416,7 +2425,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "i-slint-renderer-skia"
|
name = "i-slint-renderer-skia"
|
||||||
version = "1.15.0"
|
version = "1.15.0"
|
||||||
source = "git+https://github.com/slint-ui/slint.git#af0b3822c64a5597e628c7ad487f1273f57356cf"
|
source = "git+https://github.com/slint-ui/slint.git#b85d29758ef9dbee47f62a1a6923066bb0436f20"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
@@ -2448,6 +2457,25 @@ dependencies = [
|
|||||||
"write-fonts",
|
"write-fonts",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "i-slint-renderer-software"
|
||||||
|
version = "1.15.0"
|
||||||
|
source = "git+https://github.com/slint-ui/slint.git#b85d29758ef9dbee47f62a1a6923066bb0436f20"
|
||||||
|
dependencies = [
|
||||||
|
"bytemuck",
|
||||||
|
"clru",
|
||||||
|
"derive_more",
|
||||||
|
"euclid",
|
||||||
|
"fontdue",
|
||||||
|
"i-slint-common",
|
||||||
|
"i-slint-core",
|
||||||
|
"integer-sqrt",
|
||||||
|
"lyon_path",
|
||||||
|
"num-traits",
|
||||||
|
"skrifa",
|
||||||
|
"zeno",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iana-time-zone"
|
name = "iana-time-zone"
|
||||||
version = "0.1.64"
|
version = "0.1.64"
|
||||||
@@ -2521,9 +2549,9 @@ checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "icu_properties"
|
name = "icu_properties"
|
||||||
version = "2.1.1"
|
version = "2.1.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e93fcd3157766c0c8da2f8cff6ce651a31f0810eaa1c51ec363ef790bbb5fb99"
|
checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"icu_collections",
|
"icu_collections",
|
||||||
"icu_locale_core",
|
"icu_locale_core",
|
||||||
@@ -2535,9 +2563,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "icu_properties_data"
|
name = "icu_properties_data"
|
||||||
version = "2.1.1"
|
version = "2.1.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "02845b3647bb045f1100ecd6480ff52f34c35f82d9880e029d329c21d1054899"
|
checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "icu_provider"
|
name = "icu_provider"
|
||||||
@@ -2585,7 +2613,7 @@ dependencies = [
|
|||||||
"byteorder-lite",
|
"byteorder-lite",
|
||||||
"color_quant",
|
"color_quant",
|
||||||
"exr",
|
"exr",
|
||||||
"gif 0.14.0",
|
"gif 0.14.1",
|
||||||
"image-webp",
|
"image-webp",
|
||||||
"moxcms",
|
"moxcms",
|
||||||
"num-traits",
|
"num-traits",
|
||||||
@@ -2596,7 +2624,7 @@ dependencies = [
|
|||||||
"rgb",
|
"rgb",
|
||||||
"tiff",
|
"tiff",
|
||||||
"zune-core 0.5.0",
|
"zune-core 0.5.0",
|
||||||
"zune-jpeg 0.5.5",
|
"zune-jpeg 0.5.6",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -2809,9 +2837,9 @@ checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ksni"
|
name = "ksni"
|
||||||
version = "0.3.1"
|
version = "0.3.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3cc9a5e60d55371fd681051b05e9b58e1d818f5085f6364afe872c9347311f91"
|
checksum = "2341dc22e09c9591f946ddc660a99cbc123c9484edd0a995feb5574d1c4ac931"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-executor",
|
"async-executor",
|
||||||
"async-io",
|
"async-io",
|
||||||
@@ -2861,9 +2889,9 @@ checksum = "7a79a3332a6609480d7d0c9eab957bca6b455b91bb84e66d19f5ff66294b85b8"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libc"
|
name = "libc"
|
||||||
version = "0.2.177"
|
version = "0.2.178"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976"
|
checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libfuzzer-sys"
|
name = "libfuzzer-sys"
|
||||||
@@ -2993,9 +3021,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "log"
|
name = "log"
|
||||||
version = "0.4.28"
|
version = "0.4.29"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432"
|
checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "logind-zbus"
|
name = "logind-zbus"
|
||||||
@@ -3059,9 +3087,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mac-notification-sys"
|
name = "mac-notification-sys"
|
||||||
version = "0.6.8"
|
version = "0.6.9"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4ee70bb2bba058d58e252d2944582d634fc884fc9c489a966d428dedcf653e97"
|
checksum = "65fd3f75411f4725061682ed91f131946e912859d0044d39c4ec0aac818d7621"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc",
|
"cc",
|
||||||
"objc2 0.6.3",
|
"objc2 0.6.3",
|
||||||
@@ -3173,9 +3201,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mio"
|
name = "mio"
|
||||||
version = "1.1.0"
|
version = "1.1.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "69d83b0086dc8ecf3ce9ae2874b2d1290252e2a30720bea58a5c6639b0092873"
|
checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
"wasi",
|
"wasi",
|
||||||
@@ -4131,9 +4159,9 @@ checksum = "007d8adb5ddab6f8e3f491ac63566a7d5002cc7ed73901f72057943fa71ae1ae"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pxfm"
|
name = "pxfm"
|
||||||
version = "0.1.26"
|
version = "0.1.27"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b3502d6155304a4173a5f2c34b52b7ed0dd085890326cb50fd625fdf39e86b3b"
|
checksum = "7186d3822593aa4393561d186d1393b3923e9d6163d3fbfd6e825e3e6cf3e6a8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"num-traits",
|
"num-traits",
|
||||||
]
|
]
|
||||||
@@ -4421,7 +4449,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rog-control-center"
|
name = "rog-control-center"
|
||||||
version = "6.1.22"
|
version = "6.2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"asusd",
|
"asusd",
|
||||||
"concat-idents",
|
"concat-idents",
|
||||||
@@ -4452,7 +4480,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rog_anime"
|
name = "rog_anime"
|
||||||
version = "6.1.22"
|
version = "6.2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"dmi_id",
|
"dmi_id",
|
||||||
"gif 0.12.0",
|
"gif 0.12.0",
|
||||||
@@ -4466,7 +4494,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rog_aura"
|
name = "rog_aura"
|
||||||
version = "6.1.22"
|
version = "6.2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"dmi_id",
|
"dmi_id",
|
||||||
"log",
|
"log",
|
||||||
@@ -4477,7 +4505,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rog_dbus"
|
name = "rog_dbus"
|
||||||
version = "6.1.22"
|
version = "6.2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"asusd",
|
"asusd",
|
||||||
"rog_anime",
|
"rog_anime",
|
||||||
@@ -4491,7 +4519,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rog_platform"
|
name = "rog_platform"
|
||||||
version = "6.1.22"
|
version = "6.2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"concat-idents",
|
"concat-idents",
|
||||||
"inotify",
|
"inotify",
|
||||||
@@ -4504,7 +4532,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rog_profiles"
|
name = "rog_profiles"
|
||||||
version = "6.1.22"
|
version = "6.2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"rog_platform",
|
"rog_platform",
|
||||||
@@ -4515,7 +4543,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rog_scsi"
|
name = "rog_scsi"
|
||||||
version = "6.1.22"
|
version = "6.2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ron",
|
"ron",
|
||||||
"serde",
|
"serde",
|
||||||
@@ -4525,7 +4553,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rog_simulators"
|
name = "rog_simulators"
|
||||||
version = "6.1.22"
|
version = "6.2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"rog_anime",
|
"rog_anime",
|
||||||
@@ -4535,7 +4563,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rog_slash"
|
name = "rog_slash"
|
||||||
version = "6.1.22"
|
version = "6.2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"dmi_id",
|
"dmi_id",
|
||||||
"serde",
|
"serde",
|
||||||
@@ -4838,9 +4866,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "simd-adler32"
|
name = "simd-adler32"
|
||||||
version = "0.3.7"
|
version = "0.3.8"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
|
checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "simd_helpers"
|
name = "simd_helpers"
|
||||||
@@ -4913,7 +4941,7 @@ checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "slint"
|
name = "slint"
|
||||||
version = "1.15.0"
|
version = "1.15.0"
|
||||||
source = "git+https://github.com/slint-ui/slint.git#af0b3822c64a5597e628c7ad487f1273f57356cf"
|
source = "git+https://github.com/slint-ui/slint.git#b85d29758ef9dbee47f62a1a6923066bb0436f20"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"const-field-offset",
|
"const-field-offset",
|
||||||
"i-slint-backend-selector",
|
"i-slint-backend-selector",
|
||||||
@@ -4921,6 +4949,7 @@ dependencies = [
|
|||||||
"i-slint-core",
|
"i-slint-core",
|
||||||
"i-slint-core-macros",
|
"i-slint-core-macros",
|
||||||
"i-slint-renderer-femtovg",
|
"i-slint-renderer-femtovg",
|
||||||
|
"i-slint-renderer-software",
|
||||||
"num-traits",
|
"num-traits",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"pin-weak",
|
"pin-weak",
|
||||||
@@ -4932,7 +4961,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "slint-build"
|
name = "slint-build"
|
||||||
version = "1.15.0"
|
version = "1.15.0"
|
||||||
source = "git+https://github.com/slint-ui/slint.git#af0b3822c64a5597e628c7ad487f1273f57356cf"
|
source = "git+https://github.com/slint-ui/slint.git#b85d29758ef9dbee47f62a1a6923066bb0436f20"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"derive_more",
|
"derive_more",
|
||||||
"i-slint-compiler",
|
"i-slint-compiler",
|
||||||
@@ -4943,7 +4972,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "slint-macros"
|
name = "slint-macros"
|
||||||
version = "1.15.0"
|
version = "1.15.0"
|
||||||
source = "git+https://github.com/slint-ui/slint.git#af0b3822c64a5597e628c7ad487f1273f57356cf"
|
source = "git+https://github.com/slint-ui/slint.git#b85d29758ef9dbee47f62a1a6923066bb0436f20"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"i-slint-compiler",
|
"i-slint-compiler",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
@@ -4953,9 +4982,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "slotmap"
|
name = "slotmap"
|
||||||
version = "1.0.7"
|
version = "1.1.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a"
|
checksum = "bdd58c3c93c3d278ca835519292445cb4b0d4dc59ccfdf7ceadaab3f8aeb4038"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"version_check",
|
"version_check",
|
||||||
]
|
]
|
||||||
@@ -5467,7 +5496,7 @@ checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"libc",
|
"libc",
|
||||||
"mio 1.1.0",
|
"mio 1.1.1",
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
"socket2 0.6.1",
|
"socket2 0.6.1",
|
||||||
"tokio-macros",
|
"tokio-macros",
|
||||||
@@ -5536,9 +5565,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "toml_edit"
|
name = "toml_edit"
|
||||||
version = "0.23.7"
|
version = "0.23.9"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6485ef6d0d9b5d0ec17244ff7eb05310113c3f316f2d14200d4de56b3cb98f8d"
|
checksum = "5d7cbc3b4b49633d57a0509303158ca50de80ae32c265093b24c414705807832"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"indexmap 2.12.1",
|
"indexmap 2.12.1",
|
||||||
"toml_datetime",
|
"toml_datetime",
|
||||||
@@ -5709,9 +5738,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "typed-index-collections"
|
name = "typed-index-collections"
|
||||||
version = "3.3.0"
|
version = "3.4.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3fd393dbd1e7b23e0cab7396570309b4068aa504e9dac2cd41d827583b4e9ab7"
|
checksum = "5318ee4ce62a4e948a33915574021a7a953d83e84fba6e25c72ffcfd7dad35ff"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode",
|
"bincode",
|
||||||
"serde",
|
"serde",
|
||||||
@@ -5823,9 +5852,9 @@ checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode-script"
|
name = "unicode-script"
|
||||||
version = "0.5.7"
|
version = "0.5.8"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9fb421b350c9aff471779e262955939f565ec18b86c15364e6bdf0d662ca7c1f"
|
checksum = "383ad40bb927465ec0ce7720e033cb4ca06912855fc35db31b5755d0de75b1ee"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode-segmentation"
|
name = "unicode-segmentation"
|
||||||
@@ -5904,12 +5933,12 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "uuid"
|
name = "uuid"
|
||||||
version = "1.18.1"
|
version = "1.19.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2f87b8aa10b915a06587d0dec516c282ff295b475d94abf425d62b57710070a2"
|
checksum = "e2e054861b4bd027cd373e18e8d8d8e6548085000e41290d95ce0c373a654b4a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"js-sys",
|
"js-sys",
|
||||||
"serde",
|
"serde_core",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -5961,7 +5990,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "vtable"
|
name = "vtable"
|
||||||
version = "0.3.0"
|
version = "0.3.0"
|
||||||
source = "git+https://github.com/slint-ui/slint.git#af0b3822c64a5597e628c7ad487f1273f57356cf"
|
source = "git+https://github.com/slint-ui/slint.git#b85d29758ef9dbee47f62a1a6923066bb0436f20"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"const-field-offset",
|
"const-field-offset",
|
||||||
"portable-atomic",
|
"portable-atomic",
|
||||||
@@ -5972,7 +6001,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "vtable-macro"
|
name = "vtable-macro"
|
||||||
version = "0.3.0"
|
version = "0.3.0"
|
||||||
source = "git+https://github.com/slint-ui/slint.git#af0b3822c64a5597e628c7ad487f1273f57356cf"
|
source = "git+https://github.com/slint-ui/slint.git#b85d29758ef9dbee47f62a1a6923066bb0436f20"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@@ -7149,18 +7178,18 @@ checksum = "6df3dc4292935e51816d896edcd52aa30bc297907c26167fec31e2b0c6a32524"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zerocopy"
|
name = "zerocopy"
|
||||||
version = "0.8.30"
|
version = "0.8.31"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4ea879c944afe8a2b25fef16bb4ba234f47c694565e97383b36f3a878219065c"
|
checksum = "fd74ec98b9250adb3ca554bdde269adf631549f51d8a8f8f0a10b50f1cb298c3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"zerocopy-derive",
|
"zerocopy-derive",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zerocopy-derive"
|
name = "zerocopy-derive"
|
||||||
version = "0.8.30"
|
version = "0.8.31"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "cf955aa904d6040f70dc8e9384444cb1030aed272ba3cb09bbc4ab9e7c1f34f5"
|
checksum = "d8a8d209fdf45cf5138cbb5a506f6b52522a25afccc534d1475dad8e31105c6a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@@ -7254,9 +7283,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zune-jpeg"
|
name = "zune-jpeg"
|
||||||
version = "0.5.5"
|
version = "0.5.6"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "dc6fb7703e32e9a07fb3f757360338b3a567a5054f21b5f52a666752e333d58e"
|
checksum = "f520eebad972262a1dde0ec455bce4f8b298b1e5154513de58c114c4c54303e8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"zune-core 0.5.0",
|
"zune-core 0.5.0",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "6.1.22"
|
version = "6.2.0"
|
||||||
rust-version = "1.82"
|
rust-version = "1.82"
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
@@ -57,12 +57,12 @@ glam = { version = "^0.22", features = ["serde"] }
|
|||||||
gumdrop = "^0.8"
|
gumdrop = "^0.8"
|
||||||
udev = { version = "^0.8", features = ["mio"] }
|
udev = { version = "^0.8", features = ["mio"] }
|
||||||
rusb = "^0.9"
|
rusb = "^0.9"
|
||||||
inotify = "^0.10.0"
|
inotify = "^0.10"
|
||||||
|
|
||||||
png_pong = "^0.8"
|
png_pong = "^0.8"
|
||||||
pix = "^0.13"
|
pix = "^0.13"
|
||||||
tinybmp = "^0.4.0"
|
tinybmp = "^0.4"
|
||||||
gif = "^0.12.0"
|
gif = "^0.12"
|
||||||
|
|
||||||
versions = "6.2"
|
versions = "6.2"
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,13 @@ impl AuraZbus {
|
|||||||
#[zbus(property)]
|
#[zbus(property)]
|
||||||
async fn set_brightness(&mut self, brightness: LedBrightness) -> Result<(), ZbErr> {
|
async fn set_brightness(&mut self, brightness: LedBrightness) -> Result<(), ZbErr> {
|
||||||
if let Some(bl) = self.0.backlight.as_ref() {
|
if let Some(bl) = self.0.backlight.as_ref() {
|
||||||
return Ok(bl.lock().await.set_brightness(brightness.into())?);
|
let res = bl.lock().await.set_brightness(brightness.into());
|
||||||
|
if res.is_ok() {
|
||||||
|
let mut config = self.0.config.lock().await;
|
||||||
|
config.brightness = brightness;
|
||||||
|
config.write();
|
||||||
|
}
|
||||||
|
return Ok(res?);
|
||||||
}
|
}
|
||||||
Err(ZbErr::Failed("No sysfs brightness control".to_string()))
|
Err(ZbErr::Failed("No sysfs brightness control".to_string()))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,12 @@ use serde::{Deserialize, Serialize};
|
|||||||
|
|
||||||
const CONFIG_FILE: &str = "asusd.ron";
|
const CONFIG_FILE: &str = "asusd.ron";
|
||||||
|
|
||||||
|
/// Default value for base_charge_control_end_threshold when not present in config.
|
||||||
|
/// Returns 0 so restore_charge_limit() skips restoration for upgraded configs.
|
||||||
|
fn default_base_charge_limit() -> u8 {
|
||||||
|
0
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Default, Clone, Deserialize, Serialize, PartialEq)]
|
#[derive(Default, Clone, Deserialize, Serialize, PartialEq)]
|
||||||
pub struct Tuning {
|
pub struct Tuning {
|
||||||
pub enabled: bool,
|
pub enabled: bool,
|
||||||
@@ -19,8 +25,8 @@ type Tunings = HashMap<PlatformProfile, Tuning>;
|
|||||||
pub struct Config {
|
pub struct Config {
|
||||||
// The current charge limit applied
|
// The current charge limit applied
|
||||||
pub charge_control_end_threshold: u8,
|
pub charge_control_end_threshold: u8,
|
||||||
/// Save charge limit for restoring
|
/// Save charge limit for restoring after one-shot full charge
|
||||||
#[serde(skip)]
|
#[serde(default = "default_base_charge_limit")]
|
||||||
pub base_charge_control_end_threshold: u8,
|
pub base_charge_control_end_threshold: u8,
|
||||||
pub disable_nvidia_powerd_on_battery: bool,
|
pub disable_nvidia_powerd_on_battery: bool,
|
||||||
/// An optional command/script to run when power is changed to AC
|
/// An optional command/script to run when power is changed to AC
|
||||||
@@ -86,6 +92,9 @@ impl Default for Config {
|
|||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
charge_control_end_threshold: 100,
|
charge_control_end_threshold: 100,
|
||||||
|
// NOTE: This is intentionally 100 (not 0 like the serde default).
|
||||||
|
// New installs get 100 (no limit). Upgraded configs missing this
|
||||||
|
// field get 0 via serde, which skips restore_charge_limit().
|
||||||
base_charge_control_end_threshold: 100,
|
base_charge_control_end_threshold: 100,
|
||||||
disable_nvidia_powerd_on_battery: true,
|
disable_nvidia_powerd_on_battery: true,
|
||||||
ac_command: Default::default(),
|
ac_command: Default::default(),
|
||||||
|
|||||||
190
distro-packaging/asusctl.spec
Normal file
190
distro-packaging/asusctl.spec
Normal file
@@ -0,0 +1,190 @@
|
|||||||
|
#
|
||||||
|
# spec file for package asus-nb-ctrl
|
||||||
|
#
|
||||||
|
# Copyright (c) 2020-2025 Luke Jones <luke@ljones.dev>
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
|
%if %{defined fedora}
|
||||||
|
%global debug_package %{nil}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%define version 6.2.0
|
||||||
|
%define specrelease %{?dist}
|
||||||
|
%define pkg_release 1%{specrelease}
|
||||||
|
|
||||||
|
# Use hardening ldflags.
|
||||||
|
%global rustflags -Clink-arg=-Wl,-z,relro,-z,now
|
||||||
|
Name: asusctl
|
||||||
|
Version: %{version}
|
||||||
|
Release: %{pkg_release}
|
||||||
|
Summary: Control fan speeds, LEDs, graphics modes, and charge levels for ASUS notebooks
|
||||||
|
License: MPLv2
|
||||||
|
|
||||||
|
Group: System Environment/Kernel
|
||||||
|
|
||||||
|
URL: https://gitlab.com/asus-linux/asusctl
|
||||||
|
Source: https://gitlab.com/asus-linux/asusctl/-/archive/%{version}/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
|
%if %{defined fedora}
|
||||||
|
BuildRequires: rust-packaging
|
||||||
|
BuildRequires: systemd-rpm-macros
|
||||||
|
%else
|
||||||
|
BuildRequires: cargo-packaging
|
||||||
|
%endif
|
||||||
|
BuildRequires: git
|
||||||
|
BuildRequires: clang-devel
|
||||||
|
BuildRequires: cargo
|
||||||
|
BuildRequires: cmake
|
||||||
|
BuildRequires: rust
|
||||||
|
BuildRequires: rust-std-static
|
||||||
|
BuildRequires: pkgconfig(gbm)
|
||||||
|
BuildRequires: pkgconfig(libinput)
|
||||||
|
BuildRequires: pkgconfig(libseat)
|
||||||
|
BuildRequires: pkgconfig(libudev)
|
||||||
|
BuildRequires: pkgconfig(xkbcommon)
|
||||||
|
BuildRequires: pkgconfig(libzstd)
|
||||||
|
BuildRequires: pkgconfig(fontconfig)
|
||||||
|
BuildRequires: desktop-file-utils
|
||||||
|
|
||||||
|
%description
|
||||||
|
asus-nb-ctrl is a utility for Linux to control many aspects of various
|
||||||
|
ASUS laptops but can also be used with non-Asus laptops with reduced features.
|
||||||
|
|
||||||
|
It provides an interface for rootless control of some system functions such as
|
||||||
|
fan speeds, keyboard LEDs, battery charge level, and graphics modes.
|
||||||
|
asus-nb-ctrl enables third-party apps to use the above with dbus methods.
|
||||||
|
|
||||||
|
%package rog-gui
|
||||||
|
Summary: An experimental GUI for %{name}
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description rog-gui
|
||||||
|
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
|
||||||
|
%autosetup
|
||||||
|
mkdir -p .cargo
|
||||||
|
cat > .cargo/config.toml << 'EOF'
|
||||||
|
[term]
|
||||||
|
verbose = true
|
||||||
|
[net]
|
||||||
|
offline = false
|
||||||
|
EOF
|
||||||
|
|
||||||
|
%build
|
||||||
|
export RUSTFLAGS="%{rustflags}"
|
||||||
|
%if %{defined fedora}
|
||||||
|
/usr/bin/cargo build --release --locked
|
||||||
|
%else
|
||||||
|
/usr/bin/cargo auditable build --release --locked
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%install
|
||||||
|
export RUSTFLAGS="%{rustflags}"
|
||||||
|
|
||||||
|
%define _target_dir target/release
|
||||||
|
|
||||||
|
# Install binaries
|
||||||
|
install -D -m 0755 %{_target_dir}/asusd %{buildroot}%{_bindir}/asusd
|
||||||
|
install -D -m 0755 %{_target_dir}/asusd-user %{buildroot}%{_bindir}/asusd-user
|
||||||
|
install -D -m 0755 %{_target_dir}/asusctl %{buildroot}%{_bindir}/asusctl
|
||||||
|
install -D -m 0755 %{_target_dir}/rog-control-center %{buildroot}%{_bindir}/rog-control-center
|
||||||
|
|
||||||
|
# Install systemd units
|
||||||
|
install -D -m 0644 data/asusd.service %{buildroot}%{_unitdir}/asusd.service
|
||||||
|
install -D -m 0644 data/asusd-user.service %{buildroot}%{_userunitdir}/asusd-user.service
|
||||||
|
|
||||||
|
# Install udev rules
|
||||||
|
install -D -m 0644 data/asusd.rules %{buildroot}%{_udevrulesdir}/99-asusd.rules
|
||||||
|
|
||||||
|
# Install dbus config
|
||||||
|
install -D -m 0644 data/asusd.conf %{buildroot}%{_datadir}/dbus-1/system.d/asusd.conf
|
||||||
|
|
||||||
|
# Install asusd data
|
||||||
|
install -D -m 0644 rog-aura/data/aura_support.ron %{buildroot}%{_datadir}/asusd/aura_support.ron
|
||||||
|
cp -r rog-anime/data/anime %{buildroot}%{_datadir}/asusd/
|
||||||
|
|
||||||
|
# Install rog-gui data
|
||||||
|
install -D -m 0644 rog-control-center/data/rog-control-center.desktop %{buildroot}%{_datadir}/applications/rog-control-center.desktop
|
||||||
|
install -D -m 0644 rog-control-center/data/rog-control-center.png %{buildroot}%{_datadir}/icons/hicolor/512x512/apps/rog-control-center.png
|
||||||
|
mkdir -p %{buildroot}%{_datadir}/rog-gui/layouts
|
||||||
|
cp -r rog-aura/data/layouts/*.ron %{buildroot}%{_datadir}/rog-gui/layouts/
|
||||||
|
|
||||||
|
# Install icons
|
||||||
|
install -D -m 0644 data/icons/asus_notif_yellow.png %{buildroot}%{_datadir}/icons/hicolor/512x512/apps/asus_notif_yellow.png
|
||||||
|
install -D -m 0644 data/icons/asus_notif_green.png %{buildroot}%{_datadir}/icons/hicolor/512x512/apps/asus_notif_green.png
|
||||||
|
install -D -m 0644 data/icons/asus_notif_blue.png %{buildroot}%{_datadir}/icons/hicolor/512x512/apps/asus_notif_blue.png
|
||||||
|
install -D -m 0644 data/icons/asus_notif_red.png %{buildroot}%{_datadir}/icons/hicolor/512x512/apps/asus_notif_red.png
|
||||||
|
install -D -m 0644 data/icons/asus_notif_orange.png %{buildroot}%{_datadir}/icons/hicolor/512x512/apps/asus_notif_orange.png
|
||||||
|
install -D -m 0644 data/icons/asus_notif_white.png %{buildroot}%{_datadir}/icons/hicolor/512x512/apps/asus_notif_white.png
|
||||||
|
install -D -m 0644 data/icons/scalable/gpu-compute.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/status/gpu-compute.svg
|
||||||
|
install -D -m 0644 data/icons/scalable/gpu-hybrid.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/status/gpu-hybrid.svg
|
||||||
|
install -D -m 0644 data/icons/scalable/gpu-integrated.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/status/gpu-integrated.svg
|
||||||
|
install -D -m 0644 data/icons/scalable/gpu-nvidia.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/status/gpu-nvidia.svg
|
||||||
|
install -D -m 0644 data/icons/scalable/gpu-vfio.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/status/gpu-vfio.svg
|
||||||
|
install -D -m 0644 data/icons/scalable/notification-reboot.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/status/notification-reboot.svg
|
||||||
|
|
||||||
|
# Install docs
|
||||||
|
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
|
||||||
|
|
||||||
|
# Install LICENSE to asusctl datadir
|
||||||
|
install -D -m 0644 LICENSE %{buildroot}%{_datadir}/asusctl/LICENSE
|
||||||
|
|
||||||
|
desktop-file-validate %{buildroot}%{_datadir}/applications/rog-control-center.desktop
|
||||||
|
|
||||||
|
%post
|
||||||
|
%systemd_post asusd.service
|
||||||
|
|
||||||
|
%preun
|
||||||
|
%systemd_preun asusd.service
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%systemd_postun_with_restart asusd.service
|
||||||
|
|
||||||
|
%files
|
||||||
|
%license LICENSE
|
||||||
|
%{_bindir}/asusd
|
||||||
|
%{_bindir}/asusd-user
|
||||||
|
%{_bindir}/asusctl
|
||||||
|
%{_unitdir}/asusd.service
|
||||||
|
%{_userunitdir}/asusd-user.service
|
||||||
|
%{_udevrulesdir}/99-asusd.rules
|
||||||
|
%{_datadir}/dbus-1/system.d/asusd.conf
|
||||||
|
%{_datadir}/icons/hicolor/512x512/apps/asus_notif_yellow.png
|
||||||
|
%{_datadir}/icons/hicolor/512x512/apps/asus_notif_green.png
|
||||||
|
%{_datadir}/icons/hicolor/512x512/apps/asus_notif_red.png
|
||||||
|
%{_datadir}/icons/hicolor/512x512/apps/asus_notif_blue.png
|
||||||
|
%{_datadir}/icons/hicolor/512x512/apps/asus_notif_orange.png
|
||||||
|
%{_datadir}/icons/hicolor/512x512/apps/asus_notif_white.png
|
||||||
|
%{_datadir}/icons/hicolor/scalable/status/gpu-compute.svg
|
||||||
|
%{_datadir}/icons/hicolor/scalable/status/gpu-hybrid.svg
|
||||||
|
%{_datadir}/icons/hicolor/scalable/status/gpu-integrated.svg
|
||||||
|
%{_datadir}/icons/hicolor/scalable/status/gpu-nvidia.svg
|
||||||
|
%{_datadir}/icons/hicolor/scalable/status/gpu-vfio.svg
|
||||||
|
%{_datadir}/icons/hicolor/scalable/status/notification-reboot.svg
|
||||||
|
%{_docdir}/%{name}/
|
||||||
|
%{_datadir}/asusctl/
|
||||||
|
%{_datadir}/asusd/
|
||||||
|
|
||||||
|
%files rog-gui
|
||||||
|
%{_bindir}/rog-control-center
|
||||||
|
%{_datadir}/applications/rog-control-center.desktop
|
||||||
|
%{_datadir}/icons/hicolor/512x512/apps/rog-control-center.png
|
||||||
|
%{_datadir}/rog-gui
|
||||||
|
|
||||||
|
%changelog
|
||||||
@@ -64,6 +64,7 @@ pub enum AnimeType {
|
|||||||
GA402,
|
GA402,
|
||||||
GU604,
|
GU604,
|
||||||
G635L,
|
G635L,
|
||||||
|
G835L,
|
||||||
#[default]
|
#[default]
|
||||||
Unsupported,
|
Unsupported,
|
||||||
}
|
}
|
||||||
@@ -72,13 +73,21 @@ impl FromStr for AnimeType {
|
|||||||
type Err = AnimeError;
|
type Err = AnimeError;
|
||||||
|
|
||||||
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
|
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
|
||||||
Ok(match s {
|
let dmi = s.to_uppercase();
|
||||||
"ga401" | "GA401" => Self::GA401,
|
|
||||||
"ga402" | "GA402" => Self::GA402,
|
if dmi.contains("GA401") {
|
||||||
"gu604" | "GU604" => Self::GU604,
|
return Ok(Self::GA401);
|
||||||
"g635L" | "G635L" => Self::G635L,
|
} else if dmi.contains("GA402") {
|
||||||
_ => Self::Unsupported,
|
return Ok(Self::GA402);
|
||||||
})
|
} else if dmi.contains("GU604") {
|
||||||
|
return Ok(Self::GU604);
|
||||||
|
} else if dmi.contains("G635L") {
|
||||||
|
return Ok(Self::G635L);
|
||||||
|
} else if dmi.contains("G835L") {
|
||||||
|
return Ok(Self::G835L);
|
||||||
|
}
|
||||||
|
|
||||||
|
Ok(Self::Unsupported)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,6 +111,7 @@ impl AnimeType {
|
|||||||
pub fn width(&self) -> usize {
|
pub fn width(&self) -> usize {
|
||||||
match self {
|
match self {
|
||||||
AnimeType::GU604 => 70,
|
AnimeType::GU604 => 70,
|
||||||
|
AnimeType::G835L => 74,
|
||||||
_ => 74,
|
_ => 74,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -111,6 +121,7 @@ impl AnimeType {
|
|||||||
match self {
|
match self {
|
||||||
AnimeType::GA401 => 36,
|
AnimeType::GA401 => 36,
|
||||||
AnimeType::GU604 => 43,
|
AnimeType::GU604 => 43,
|
||||||
|
AnimeType::G835L => 39,
|
||||||
_ => 39,
|
_ => 39,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -120,6 +131,7 @@ impl AnimeType {
|
|||||||
match self {
|
match self {
|
||||||
AnimeType::GA401 => PANE_LEN * 2,
|
AnimeType::GA401 => PANE_LEN * 2,
|
||||||
AnimeType::GU604 => PANE_LEN * 3,
|
AnimeType::GU604 => PANE_LEN * 3,
|
||||||
|
AnimeType::G835L => PANE_LEN * 3,
|
||||||
_ => PANE_LEN * 3,
|
_ => PANE_LEN * 3,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -184,7 +196,11 @@ impl TryFrom<AnimeDataBuffer> for AnimePacketType {
|
|||||||
|
|
||||||
let mut buffers = match anime.anime {
|
let mut buffers = match anime.anime {
|
||||||
AnimeType::GA401 => vec![[0; 640]; 2],
|
AnimeType::GA401 => vec![[0; 640]; 2],
|
||||||
AnimeType::GA402 | AnimeType::GU604 | AnimeType::G635L | AnimeType::Unsupported => {
|
AnimeType::GA402
|
||||||
|
| AnimeType::GU604
|
||||||
|
| AnimeType::G635L
|
||||||
|
| AnimeType::G835L
|
||||||
|
| AnimeType::Unsupported => {
|
||||||
vec![[0; 640]; 3]
|
vec![[0; 640]; 3]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -197,7 +213,11 @@ impl TryFrom<AnimeDataBuffer> for AnimePacketType {
|
|||||||
|
|
||||||
if matches!(
|
if matches!(
|
||||||
anime.anime,
|
anime.anime,
|
||||||
AnimeType::GA402 | AnimeType::GU604 | AnimeType::Unsupported
|
AnimeType::GA402
|
||||||
|
| AnimeType::GU604
|
||||||
|
| AnimeType::G635L
|
||||||
|
| AnimeType::G835L
|
||||||
|
| AnimeType::Unsupported
|
||||||
) {
|
) {
|
||||||
buffers[2][..7].copy_from_slice(&USB_PREFIX3);
|
buffers[2][..7].copy_from_slice(&USB_PREFIX3);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ impl From<AnimShutdown> for i32 {
|
|||||||
#[inline]
|
#[inline]
|
||||||
pub fn get_anime_type() -> AnimeType {
|
pub fn get_anime_type() -> AnimeType {
|
||||||
let dmi = DMIID::new().unwrap_or_default();
|
let dmi = DMIID::new().unwrap_or_default();
|
||||||
let board_name = dmi.board_name;
|
let board_name = dmi.board_name.to_uppercase();
|
||||||
|
|
||||||
if board_name.contains("GA401I") || board_name.contains("GA401Q") {
|
if board_name.contains("GA401I") || board_name.contains("GA401Q") {
|
||||||
AnimeType::GA401
|
AnimeType::GA401
|
||||||
@@ -253,6 +253,8 @@ pub fn get_anime_type() -> AnimeType {
|
|||||||
AnimeType::GU604
|
AnimeType::GU604
|
||||||
} else if board_name.contains("G635L") {
|
} else if board_name.contains("G635L") {
|
||||||
AnimeType::G635L
|
AnimeType::G635L
|
||||||
|
} else if board_name.contains("G835L") {
|
||||||
|
AnimeType::G835L
|
||||||
} else {
|
} else {
|
||||||
AnimeType::Unsupported
|
AnimeType::Unsupported
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,16 @@
|
|||||||
(
|
(
|
||||||
device_name: "FA617NS",
|
device_name: "FA617NS",
|
||||||
product_id: "",
|
product_id: "",
|
||||||
layout_name: "fx505d",
|
layout_name: "fa507",
|
||||||
|
basic_modes: [Static, Breathe, Pulse],
|
||||||
|
basic_zones: [],
|
||||||
|
advanced_type: r#None,
|
||||||
|
power_zones: [Keyboard],
|
||||||
|
),
|
||||||
|
(
|
||||||
|
device_name: "FA617NT",
|
||||||
|
product_id: "",
|
||||||
|
layout_name: "fa507",
|
||||||
basic_modes: [Static, Breathe, Pulse],
|
basic_modes: [Static, Breathe, Pulse],
|
||||||
basic_zones: [],
|
basic_zones: [],
|
||||||
advanced_type: r#None,
|
advanced_type: r#None,
|
||||||
@@ -47,7 +56,16 @@
|
|||||||
(
|
(
|
||||||
device_name: "FA617XS",
|
device_name: "FA617XS",
|
||||||
product_id: "",
|
product_id: "",
|
||||||
layout_name: "fx505d",
|
layout_name: "fa507",
|
||||||
|
basic_modes: [Static, Breathe, Pulse],
|
||||||
|
basic_zones: [],
|
||||||
|
advanced_type: r#None,
|
||||||
|
power_zones: [Keyboard],
|
||||||
|
),
|
||||||
|
(
|
||||||
|
device_name: "FA617XT",
|
||||||
|
product_id: "",
|
||||||
|
layout_name: "fa507",
|
||||||
basic_modes: [Static, Breathe, Pulse],
|
basic_modes: [Static, Breathe, Pulse],
|
||||||
basic_zones: [],
|
basic_zones: [],
|
||||||
advanced_type: r#None,
|
advanced_type: r#None,
|
||||||
@@ -107,6 +125,15 @@
|
|||||||
advanced_type: r#None,
|
advanced_type: r#None,
|
||||||
power_zones: [Keyboard],
|
power_zones: [Keyboard],
|
||||||
),
|
),
|
||||||
|
(
|
||||||
|
device_name: "FX607V",
|
||||||
|
product_id: "",
|
||||||
|
layout_name: "fa506i",
|
||||||
|
basic_modes: [Static, Breathe, RainbowCycle, Pulse],
|
||||||
|
basic_zones: [],
|
||||||
|
advanced_type: Zoned([SingleZone]),
|
||||||
|
power_zones: [Keyboard],
|
||||||
|
),
|
||||||
(
|
(
|
||||||
device_name: "FX617X",
|
device_name: "FX617X",
|
||||||
product_id: "",
|
product_id: "",
|
||||||
@@ -287,6 +314,15 @@
|
|||||||
advanced_type: r#None,
|
advanced_type: r#None,
|
||||||
power_zones: [Keyboard, Lightbar],
|
power_zones: [Keyboard, Lightbar],
|
||||||
),
|
),
|
||||||
|
(
|
||||||
|
device_name: "G614JU",
|
||||||
|
product_id: "",
|
||||||
|
layout_name: "g634j-per-key",
|
||||||
|
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
|
||||||
|
basic_zones: [],
|
||||||
|
advanced_type: PerKey,
|
||||||
|
power_zones: [Keyboard, Lightbar, Logo],
|
||||||
|
),
|
||||||
(
|
(
|
||||||
device_name: "G614JZ",
|
device_name: "G614JZ",
|
||||||
product_id: "",
|
product_id: "",
|
||||||
|
|||||||
@@ -168,15 +168,24 @@ pub fn setup_fan_curve_page(ui: &MainWindow, _config: Arc<Mutex<Config>>) {
|
|||||||
|
|
||||||
update_fan_data(handle, balanced, perf, quiet);
|
update_fan_data(handle, balanced, perf, quiet);
|
||||||
|
|
||||||
|
let choices_for_ui = platform_profile_choices.clone();
|
||||||
let handle_next1 = handle_copy.clone();
|
let handle_next1 = handle_copy.clone();
|
||||||
if let Err(e) = handle_copy.upgrade_in_event_loop(move |handle| {
|
if let Err(e) = handle_copy.upgrade_in_event_loop(move |handle| {
|
||||||
let global = handle.global::<FanPageData>();
|
let global = handle.global::<FanPageData>();
|
||||||
let fans1 = fans.clone();
|
let fans1 = fans.clone();
|
||||||
|
let choices = choices_for_ui.clone();
|
||||||
global.on_set_profile_default(move |profile| {
|
global.on_set_profile_default(move |profile| {
|
||||||
let fans = fans1.clone();
|
let fans = fans1.clone();
|
||||||
let handle_next = handle_next1.clone();
|
let handle_next = handle_next1.clone();
|
||||||
|
let choices = choices.clone();
|
||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
if fans.set_curves_to_defaults(profile.into()).await.is_err() {
|
let mut target: PlatformProfile = profile.into();
|
||||||
|
if target == PlatformProfile::Quiet
|
||||||
|
&& !choices.contains(&PlatformProfile::Quiet)
|
||||||
|
{
|
||||||
|
target = PlatformProfile::LowPower;
|
||||||
|
}
|
||||||
|
if fans.set_curves_to_defaults(target).await.is_err() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let Ok(balanced) = fans
|
let Ok(balanced) = fans
|
||||||
|
|||||||
@@ -40,6 +40,10 @@ pub fn setup_system_page(ui: &MainWindow, _config: Arc<Mutex<Config>>) {
|
|||||||
ui.global::<SystemPageData>().set_platform_profile(-1);
|
ui.global::<SystemPageData>().set_platform_profile(-1);
|
||||||
ui.global::<SystemPageData>().set_panel_overdrive(-1);
|
ui.global::<SystemPageData>().set_panel_overdrive(-1);
|
||||||
ui.global::<SystemPageData>().set_boot_sound(-1);
|
ui.global::<SystemPageData>().set_boot_sound(-1);
|
||||||
|
ui.global::<SystemPageData>().set_kbd_leds_awake(-1);
|
||||||
|
ui.global::<SystemPageData>().set_kbd_leds_sleep(-1);
|
||||||
|
ui.global::<SystemPageData>().set_kbd_leds_boot(-1);
|
||||||
|
ui.global::<SystemPageData>().set_kbd_leds_shutdown(-1);
|
||||||
ui.global::<SystemPageData>().set_screen_auto_brightness(-1);
|
ui.global::<SystemPageData>().set_screen_auto_brightness(-1);
|
||||||
ui.global::<SystemPageData>().set_mcu_powersave(-1);
|
ui.global::<SystemPageData>().set_mcu_powersave(-1);
|
||||||
ui.global::<SystemPageData>().set_mini_led_mode(-1);
|
ui.global::<SystemPageData>().set_mini_led_mode(-1);
|
||||||
@@ -669,6 +673,26 @@ pub fn setup_system_page_callbacks(ui: &MainWindow, _states: Arc<Mutex<Config>>)
|
|||||||
setup_callback!(boot_sound, handle, attr, i32);
|
setup_callback!(boot_sound, handle, attr, i32);
|
||||||
setup_external!(boot_sound, i32, handle, attr, value)
|
setup_external!(boot_sound, i32, handle, attr, value)
|
||||||
}
|
}
|
||||||
|
FirmwareAttribute::KbdLedsAwake => {
|
||||||
|
init_property!(kbd_leds_awake, handle, value, i32);
|
||||||
|
setup_callback!(kbd_leds_awake, handle, attr, i32);
|
||||||
|
setup_external!(kbd_leds_awake, i32, handle, attr, value)
|
||||||
|
}
|
||||||
|
FirmwareAttribute::KbdLedsSleep => {
|
||||||
|
init_property!(kbd_leds_sleep, handle, value, i32);
|
||||||
|
setup_callback!(kbd_leds_sleep, handle, attr, i32);
|
||||||
|
setup_external!(kbd_leds_sleep, i32, handle, attr, value)
|
||||||
|
}
|
||||||
|
FirmwareAttribute::KbdLedsBoot => {
|
||||||
|
init_property!(kbd_leds_boot, handle, value, i32);
|
||||||
|
setup_callback!(kbd_leds_boot, handle, attr, i32);
|
||||||
|
setup_external!(kbd_leds_boot, i32, handle, attr, value)
|
||||||
|
}
|
||||||
|
FirmwareAttribute::KbdLedsShutdown => {
|
||||||
|
init_property!(kbd_leds_shutdown, handle, value, i32);
|
||||||
|
setup_callback!(kbd_leds_shutdown, handle, attr, i32);
|
||||||
|
setup_external!(kbd_leds_shutdown, i32, handle, attr, value)
|
||||||
|
}
|
||||||
FirmwareAttribute::ScreenAutoBrightness => {
|
FirmwareAttribute::ScreenAutoBrightness => {
|
||||||
init_property!(screen_auto_brightness, handle, value, i32);
|
init_property!(screen_auto_brightness, handle, value, i32);
|
||||||
setup_callback!(screen_auto_brightness, handle, attr, i32);
|
setup_callback!(screen_auto_brightness, handle, attr, i32);
|
||||||
|
|||||||
@@ -51,6 +51,14 @@ export global SystemPageData {
|
|||||||
callback cb_panel_overdrive(int);
|
callback cb_panel_overdrive(int);
|
||||||
in-out property <int> boot_sound;
|
in-out property <int> boot_sound;
|
||||||
callback cb_boot_sound(int);
|
callback cb_boot_sound(int);
|
||||||
|
in-out property <int> kbd_leds_awake;
|
||||||
|
callback cb_kbd_leds_awake(int);
|
||||||
|
in-out property <int> kbd_leds_sleep;
|
||||||
|
callback cb_kbd_leds_sleep(int);
|
||||||
|
in-out property <int> kbd_leds_boot;
|
||||||
|
callback cb_kbd_leds_boot(int);
|
||||||
|
in-out property <int> kbd_leds_shutdown;
|
||||||
|
callback cb_kbd_leds_shutdown(int);
|
||||||
in-out property <int> screen_auto_brightness;
|
in-out property <int> screen_auto_brightness;
|
||||||
callback cb_screen_auto_brightness(int);
|
callback cb_screen_auto_brightness(int);
|
||||||
in-out property <int> mcu_powersave;
|
in-out property <int> mcu_powersave;
|
||||||
@@ -278,6 +286,44 @@ export component PageSystem inherits Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GroupBox {
|
||||||
|
title: @tr("Keyboard Power Management");
|
||||||
|
HorizontalLayout {
|
||||||
|
spacing: 10px;
|
||||||
|
if SystemPageData.kbd_leds_awake != -1: SystemToggleInt {
|
||||||
|
text: @tr("Keyboard Awake Effect");
|
||||||
|
checked_int <=> SystemPageData.kbd_leds_awake;
|
||||||
|
toggled => {
|
||||||
|
SystemPageData.cb_kbd_leds_awake(SystemPageData.kbd_leds_awake)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if SystemPageData.kbd_leds_sleep != -1: SystemToggleInt {
|
||||||
|
text: @tr("Keyboard Sleep Effect");
|
||||||
|
checked_int <=> SystemPageData.kbd_leds_sleep;
|
||||||
|
toggled => {
|
||||||
|
SystemPageData.cb_kbd_leds_sleep(SystemPageData.kbd_leds_sleep)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if SystemPageData.kbd_leds_boot != -1: SystemToggleInt {
|
||||||
|
text: @tr("Keyboard Boot Effect");
|
||||||
|
checked_int <=> SystemPageData.kbd_leds_boot;
|
||||||
|
toggled => {
|
||||||
|
SystemPageData.cb_kbd_leds_boot(SystemPageData.kbd_leds_boot)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if SystemPageData.kbd_leds_shutdown != -1: SystemToggleInt {
|
||||||
|
text: @tr("Keyboard Shutdown Effect");
|
||||||
|
checked_int <=> SystemPageData.kbd_leds_shutdown;
|
||||||
|
toggled => {
|
||||||
|
SystemPageData.cb_kbd_leds_shutdown(SystemPageData.kbd_leds_shutdown)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
HorizontalBox {
|
HorizontalBox {
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
spacing: 10px;
|
spacing: 10px;
|
||||||
|
|||||||
@@ -286,6 +286,10 @@ define_attribute_getters!(
|
|||||||
dgpu_tgp,
|
dgpu_tgp,
|
||||||
charge_mode,
|
charge_mode,
|
||||||
boot_sound,
|
boot_sound,
|
||||||
|
kbd_leds_awake,
|
||||||
|
kbd_leds_sleep,
|
||||||
|
kbd_leds_boot,
|
||||||
|
kbd_leds_shutdown,
|
||||||
mcu_powersave,
|
mcu_powersave,
|
||||||
panel_od,
|
panel_od,
|
||||||
panel_hd_mode,
|
panel_hd_mode,
|
||||||
@@ -342,6 +346,10 @@ pub enum FirmwareAttribute {
|
|||||||
PptEnabled = 24,
|
PptEnabled = 24,
|
||||||
None = 25,
|
None = 25,
|
||||||
ScreenAutoBrightness = 26,
|
ScreenAutoBrightness = 26,
|
||||||
|
KbdLedsAwake = 27,
|
||||||
|
KbdLedsSleep = 28,
|
||||||
|
KbdLedsBoot = 29,
|
||||||
|
KbdLedsShutdown = 30,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FirmwareAttribute {
|
impl FirmwareAttribute {
|
||||||
@@ -386,6 +394,10 @@ impl From<&str> for FirmwareAttribute {
|
|||||||
"nv_tgp" => Self::DgpuTgp,
|
"nv_tgp" => Self::DgpuTgp,
|
||||||
"charge_mode" => Self::ChargeMode,
|
"charge_mode" => Self::ChargeMode,
|
||||||
"boot_sound" => Self::BootSound,
|
"boot_sound" => Self::BootSound,
|
||||||
|
"kbd_leds_awake" => Self::KbdLedsAwake,
|
||||||
|
"kbd_leds_sleep" => Self::KbdLedsSleep,
|
||||||
|
"kbd_leds_boot" => Self::KbdLedsBoot,
|
||||||
|
"kbd_leds_shutdown" => Self::KbdLedsShutdown,
|
||||||
"mcu_powersave" => Self::McuPowersave,
|
"mcu_powersave" => Self::McuPowersave,
|
||||||
"panel_overdrive" => Self::PanelOverdrive,
|
"panel_overdrive" => Self::PanelOverdrive,
|
||||||
"panel_hd_mode" => Self::PanelHdMode,
|
"panel_hd_mode" => Self::PanelHdMode,
|
||||||
@@ -431,6 +443,10 @@ impl From<FirmwareAttribute> for &str {
|
|||||||
FirmwareAttribute::DgpuDisable => "dgpu_disable",
|
FirmwareAttribute::DgpuDisable => "dgpu_disable",
|
||||||
FirmwareAttribute::GpuMuxMode => "gpu_mux_mode",
|
FirmwareAttribute::GpuMuxMode => "gpu_mux_mode",
|
||||||
FirmwareAttribute::MiniLedMode => "mini_led_mode",
|
FirmwareAttribute::MiniLedMode => "mini_led_mode",
|
||||||
|
FirmwareAttribute::KbdLedsAwake => "kbd_leds_awake",
|
||||||
|
FirmwareAttribute::KbdLedsSleep => "kbd_leds_sleep",
|
||||||
|
FirmwareAttribute::KbdLedsBoot => "kbd_leds_boot",
|
||||||
|
FirmwareAttribute::KbdLedsShutdown => "kbd_leds_shutdown",
|
||||||
FirmwareAttribute::PendingReboot => "pending_reboot",
|
FirmwareAttribute::PendingReboot => "pending_reboot",
|
||||||
FirmwareAttribute::ScreenAutoBrightness => "screen_auto_brightness",
|
FirmwareAttribute::ScreenAutoBrightness => "screen_auto_brightness",
|
||||||
FirmwareAttribute::None => "none",
|
FirmwareAttribute::None => "none",
|
||||||
|
|||||||
@@ -13,8 +13,11 @@ use crate::usb::{PROD_ID1, PROD_ID1_STR, PROD_ID2, PROD_ID2_STR};
|
|||||||
#[derive(Default, Debug, Copy, Clone, PartialEq, Eq, Deserialize, Serialize)]
|
#[derive(Default, Debug, Copy, Clone, PartialEq, Eq, Deserialize, Serialize)]
|
||||||
pub enum SlashType {
|
pub enum SlashType {
|
||||||
GA403,
|
GA403,
|
||||||
|
GA403W,
|
||||||
GA605,
|
GA605,
|
||||||
GU605,
|
GU605,
|
||||||
|
GU605C,
|
||||||
|
G614F,
|
||||||
#[default]
|
#[default]
|
||||||
Unsupported,
|
Unsupported,
|
||||||
}
|
}
|
||||||
@@ -22,28 +25,40 @@ pub enum SlashType {
|
|||||||
impl SlashType {
|
impl SlashType {
|
||||||
pub const fn prod_id(&self) -> u16 {
|
pub const fn prod_id(&self) -> u16 {
|
||||||
match self {
|
match self {
|
||||||
|
SlashType::GA403W => PROD_ID2,
|
||||||
SlashType::GA403 => PROD_ID1,
|
SlashType::GA403 => PROD_ID1,
|
||||||
SlashType::GA605 => PROD_ID2,
|
SlashType::GA605 => PROD_ID2,
|
||||||
SlashType::GU605 => PROD_ID1,
|
SlashType::GU605 => PROD_ID1,
|
||||||
|
SlashType::GU605C => PROD_ID2,
|
||||||
|
SlashType::G614F => PROD_ID2,
|
||||||
SlashType::Unsupported => 0,
|
SlashType::Unsupported => 0,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub const fn prod_id_str(&self) -> &str {
|
pub const fn prod_id_str(&self) -> &str {
|
||||||
match self {
|
match self {
|
||||||
|
SlashType::GA403W => PROD_ID2_STR,
|
||||||
SlashType::GA403 => PROD_ID1_STR,
|
SlashType::GA403 => PROD_ID1_STR,
|
||||||
SlashType::GA605 => PROD_ID2_STR,
|
SlashType::GA605 => PROD_ID2_STR,
|
||||||
SlashType::GU605 => PROD_ID1_STR,
|
SlashType::GU605 => PROD_ID1_STR,
|
||||||
|
SlashType::GU605C => PROD_ID2_STR,
|
||||||
|
SlashType::G614F => PROD_ID2_STR,
|
||||||
SlashType::Unsupported => "",
|
SlashType::Unsupported => "",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn from_dmi() -> Self {
|
pub fn from_dmi() -> Self {
|
||||||
let board_name = DMIID::new().unwrap_or_default().board_name.to_uppercase();
|
let board_name = DMIID::new().unwrap_or_default().board_name.to_uppercase();
|
||||||
if board_name.contains("GA403") {
|
if board_name.contains("G614F") {
|
||||||
|
SlashType::G614F
|
||||||
|
} else if board_name.contains("GA403W") {
|
||||||
|
SlashType::GA403W
|
||||||
|
} else if board_name.contains("GA403") {
|
||||||
SlashType::GA403
|
SlashType::GA403
|
||||||
} else if board_name.contains("GA605") {
|
} else if board_name.contains("GA605") {
|
||||||
SlashType::GA605
|
SlashType::GA605
|
||||||
|
} else if board_name.contains("GU605C") {
|
||||||
|
SlashType::GU605C
|
||||||
} else if board_name.contains("GU605") {
|
} else if board_name.contains("GU605") {
|
||||||
SlashType::GU605
|
SlashType::GU605
|
||||||
} else {
|
} else {
|
||||||
@@ -56,10 +71,13 @@ impl FromStr for SlashType {
|
|||||||
type Err = SlashError;
|
type Err = SlashError;
|
||||||
|
|
||||||
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
|
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
|
||||||
Ok(match s {
|
Ok(match s.to_uppercase().as_str() {
|
||||||
"ga403" | "GA403" => Self::GA403,
|
"GA403W" => Self::GA403W,
|
||||||
"ga605" | "GA605" => Self::GA605,
|
"GA403" => Self::GA403,
|
||||||
"gu605" | "GU605" => Self::GU605,
|
"GA605" => Self::GA605,
|
||||||
|
"GU605C" => Self::GU605C,
|
||||||
|
"GU605" => Self::GU605,
|
||||||
|
"G614FR" => Self::G614F,
|
||||||
_ => Self::Unsupported,
|
_ => Self::Unsupported,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -68,6 +86,7 @@ impl FromStr for SlashType {
|
|||||||
#[cfg_attr(feature = "dbus", derive(Type, Value, OwnedValue))]
|
#[cfg_attr(feature = "dbus", derive(Type, Value, OwnedValue))]
|
||||||
#[derive(Debug, Default, PartialEq, Eq, Copy, Clone, Deserialize, Serialize)]
|
#[derive(Debug, Default, PartialEq, Eq, Copy, Clone, Deserialize, Serialize)]
|
||||||
pub enum SlashMode {
|
pub enum SlashMode {
|
||||||
|
Static = 0x06,
|
||||||
Bounce = 0x10,
|
Bounce = 0x10,
|
||||||
Slash = 0x12,
|
Slash = 0x12,
|
||||||
Loading = 0x13,
|
Loading = 0x13,
|
||||||
@@ -91,6 +110,7 @@ impl FromStr for SlashMode {
|
|||||||
|
|
||||||
fn from_str(s: &str) -> Result<Self, SlashError> {
|
fn from_str(s: &str) -> Result<Self, SlashError> {
|
||||||
match s {
|
match s {
|
||||||
|
"Static" => Ok(SlashMode::Static),
|
||||||
"Bounce" => Ok(SlashMode::Bounce),
|
"Bounce" => Ok(SlashMode::Bounce),
|
||||||
"Slash" => Ok(SlashMode::Slash),
|
"Slash" => Ok(SlashMode::Slash),
|
||||||
"Loading" => Ok(SlashMode::Loading),
|
"Loading" => Ok(SlashMode::Loading),
|
||||||
@@ -114,6 +134,7 @@ impl FromStr for SlashMode {
|
|||||||
impl Display for SlashMode {
|
impl Display for SlashMode {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
let str = match &self {
|
let str = match &self {
|
||||||
|
SlashMode::Static => String::from("Static"),
|
||||||
SlashMode::Bounce => String::from("Bounce"),
|
SlashMode::Bounce => String::from("Bounce"),
|
||||||
SlashMode::Slash => String::from("Slash"),
|
SlashMode::Slash => String::from("Slash"),
|
||||||
SlashMode::Loading => String::from("Loading"),
|
SlashMode::Loading => String::from("Loading"),
|
||||||
@@ -135,8 +156,9 @@ impl Display for SlashMode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl SlashMode {
|
impl SlashMode {
|
||||||
pub fn list() -> [String; 15] {
|
pub fn list() -> [String; 16] {
|
||||||
[
|
[
|
||||||
|
SlashMode::Static.to_string(),
|
||||||
SlashMode::Bounce.to_string(),
|
SlashMode::Bounce.to_string(),
|
||||||
SlashMode::Slash.to_string(),
|
SlashMode::Slash.to_string(),
|
||||||
SlashMode::Loading.to_string(),
|
SlashMode::Loading.to_string(),
|
||||||
|
|||||||
@@ -37,12 +37,17 @@ pub fn get_slash_type() -> SlashType {
|
|||||||
let dmi = DMIID::new()
|
let dmi = DMIID::new()
|
||||||
.map_err(|_| SlashError::NoDevice)
|
.map_err(|_| SlashError::NoDevice)
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
let board_name = dmi.board_name;
|
let board_name = dmi.board_name.to_uppercase();
|
||||||
|
if board_name.contains("G614F") {
|
||||||
if board_name.contains("GA403") {
|
SlashType::G614F
|
||||||
|
} else if board_name.contains("GA403W") {
|
||||||
|
SlashType::GA403W
|
||||||
|
} else if board_name.contains("GA403") {
|
||||||
SlashType::GA403
|
SlashType::GA403
|
||||||
} else if board_name.contains("GA605") {
|
} else if board_name.contains("GA605") {
|
||||||
SlashType::GA605
|
SlashType::GA605
|
||||||
|
} else if board_name.contains("GU605C") {
|
||||||
|
SlashType::GU605C
|
||||||
} else if board_name.contains("GU605") {
|
} else if board_name.contains("GU605") {
|
||||||
SlashType::GU605
|
SlashType::GU605
|
||||||
} else {
|
} else {
|
||||||
@@ -52,9 +57,12 @@ pub fn get_slash_type() -> SlashType {
|
|||||||
|
|
||||||
pub const fn report_id(slash_type: SlashType) -> u8 {
|
pub const fn report_id(slash_type: SlashType) -> u8 {
|
||||||
match slash_type {
|
match slash_type {
|
||||||
|
SlashType::GA403W => REPORT_ID_19B6,
|
||||||
SlashType::GA403 => REPORT_ID_193B,
|
SlashType::GA403 => REPORT_ID_193B,
|
||||||
SlashType::GA605 => REPORT_ID_19B6,
|
SlashType::GA605 => REPORT_ID_19B6,
|
||||||
|
SlashType::G614F => REPORT_ID_19B6,
|
||||||
SlashType::GU605 => REPORT_ID_193B,
|
SlashType::GU605 => REPORT_ID_193B,
|
||||||
|
SlashType::GU605C => REPORT_ID_19B6,
|
||||||
SlashType::Unsupported => REPORT_ID_19B6,
|
SlashType::Unsupported => REPORT_ID_19B6,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,10 +43,12 @@ impl AniMatrix {
|
|||||||
vertical: 2,
|
vertical: 2,
|
||||||
horizontal: 5,
|
horizontal: 5,
|
||||||
},
|
},
|
||||||
AnimeType::GA402 | AnimeType::G635L | AnimeType::Unsupported => LedShape {
|
AnimeType::GA402 | AnimeType::G635L | AnimeType::G835L | AnimeType::Unsupported => {
|
||||||
vertical: 2,
|
LedShape {
|
||||||
horizontal: 5,
|
vertical: 2,
|
||||||
},
|
horizontal: 5,
|
||||||
|
}
|
||||||
|
}
|
||||||
AnimeType::GU604 => LedShape {
|
AnimeType::GU604 => LedShape {
|
||||||
vertical: 2,
|
vertical: 2,
|
||||||
horizontal: 5,
|
horizontal: 5,
|
||||||
@@ -56,7 +58,9 @@ impl AniMatrix {
|
|||||||
// Do a hard mapping of each (derived from wireshardk captures)
|
// Do a hard mapping of each (derived from wireshardk captures)
|
||||||
let rows = match model {
|
let rows = match model {
|
||||||
AnimeType::GA401 => GA401.to_vec(),
|
AnimeType::GA401 => GA401.to_vec(),
|
||||||
AnimeType::GA402 | AnimeType::G635L | AnimeType::Unsupported => GA402.to_vec(),
|
AnimeType::GA402 | AnimeType::G635L | AnimeType::G835L | AnimeType::Unsupported => {
|
||||||
|
GA402.to_vec()
|
||||||
|
}
|
||||||
AnimeType::GU604 => GU604.to_vec(),
|
AnimeType::GU604 => GU604.to_vec(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user