Many cleanup and fix

This commit is contained in:
Luke D. Jones
2024-04-17 11:52:27 +12:00
parent 3142353f98
commit 64e8cb65d0
15 changed files with 466 additions and 96 deletions

View File

@@ -17,6 +17,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Added
- Support GA402N keyboard
- Support GL553V keyboard
- Support Z13 lightbar (with kernel patch)
## [v5.0.8]

389
Cargo.lock generated
View File

@@ -55,6 +55,12 @@ dependencies = [
"memchr",
]
[[package]]
name = "aligned-vec"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4aa90d7ce82d4be67b64039a3d588d38dbcc6736577de4a847025ce5b0c468d1"
[[package]]
name = "allocator-api2"
version = "0.2.16"
@@ -103,6 +109,29 @@ dependencies = [
"libc",
]
[[package]]
name = "anyhow"
version = "1.0.82"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519"
[[package]]
name = "arbitrary"
version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110"
[[package]]
name = "arg_enum_proc_macro"
version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.58",
]
[[package]]
name = "arrayref"
version = "0.3.7"
@@ -450,6 +479,29 @@ version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80"
[[package]]
name = "av1-grain"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6678909d8c5d46a42abcf571271e15fdbc0a225e3646cf23762cd415046c78bf"
dependencies = [
"anyhow",
"arrayvec",
"log",
"nom",
"num-rational",
"v_frame",
]
[[package]]
name = "avif-serialize"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "876c75a42f6364451a033496a14c44bffe41f5f4a8236f697391f11024e596d2"
dependencies = [
"arrayvec",
]
[[package]]
name = "az"
version = "1.2.1"
@@ -540,6 +592,12 @@ dependencies = [
"serde",
]
[[package]]
name = "bitstream-io"
version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06c9989a51171e2e81038ab168b6ae22886fe9ded214430dbb4f41c28cf176da"
[[package]]
name = "block"
version = "0.1.6"
@@ -590,6 +648,12 @@ dependencies = [
"tracing",
]
[[package]]
name = "built"
version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41bfbdb21256b87a8b5e80fab81a8eed158178e812fd7ba451907518b2742f16"
[[package]]
name = "bumpalo"
version = "3.16.0"
@@ -691,6 +755,16 @@ dependencies = [
"nom",
]
[[package]]
name = "cfg-expr"
version = "0.15.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02"
dependencies = [
"smallvec",
"target-lexicon",
]
[[package]]
name = "cfg-if"
version = "1.0.0"
@@ -856,7 +930,7 @@ dependencies = [
[[package]]
name = "const-field-offset"
version = "0.1.5"
source = "git+https://github.com/flukejones/sixtyfps.git?branch=feat/color_hsv#490f571f6c3242516bf2067f0e02cfd02ae76223"
source = "git+https://github.com/slint-ui/slint.git#385ec7d1995ea1d584855f34a9b4c2b8b460f532"
dependencies = [
"const-field-offset-macro",
"field-offset",
@@ -865,7 +939,7 @@ dependencies = [
[[package]]
name = "const-field-offset-macro"
version = "0.1.5"
source = "git+https://github.com/flukejones/sixtyfps.git?branch=feat/color_hsv#490f571f6c3242516bf2067f0e02cfd02ae76223"
source = "git+https://github.com/slint-ui/slint.git#385ec7d1995ea1d584855f34a9b4c2b8b460f532"
dependencies = [
"proc-macro2",
"quote",
@@ -1428,7 +1502,7 @@ dependencies = [
"bitflags 2.5.0",
"fnv",
"glow",
"image",
"image 0.24.9",
"imgref",
"log",
"lru",
@@ -1903,6 +1977,12 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
[[package]]
name = "heck"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "hermit-abi"
version = "0.3.9"
@@ -1933,7 +2013,7 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
[[package]]
name = "i-slint-backend-linuxkms"
version = "1.6.0"
source = "git+https://github.com/flukejones/sixtyfps.git?branch=feat/color_hsv#490f571f6c3242516bf2067f0e02cfd02ae76223"
source = "git+https://github.com/slint-ui/slint.git#385ec7d1995ea1d584855f34a9b4c2b8b460f532"
dependencies = [
"calloop",
"drm",
@@ -1953,7 +2033,7 @@ dependencies = [
[[package]]
name = "i-slint-backend-qt"
version = "1.6.0"
source = "git+https://github.com/flukejones/sixtyfps.git?branch=feat/color_hsv#490f571f6c3242516bf2067f0e02cfd02ae76223"
source = "git+https://github.com/slint-ui/slint.git#385ec7d1995ea1d584855f34a9b4c2b8b460f532"
dependencies = [
"const-field-offset",
"i-slint-common",
@@ -1965,7 +2045,7 @@ dependencies = [
[[package]]
name = "i-slint-backend-selector"
version = "1.6.0"
source = "git+https://github.com/flukejones/sixtyfps.git?branch=feat/color_hsv#490f571f6c3242516bf2067f0e02cfd02ae76223"
source = "git+https://github.com/slint-ui/slint.git#385ec7d1995ea1d584855f34a9b4c2b8b460f532"
dependencies = [
"cfg-if",
"i-slint-backend-linuxkms",
@@ -1978,7 +2058,7 @@ dependencies = [
[[package]]
name = "i-slint-backend-winit"
version = "1.6.0"
source = "git+https://github.com/flukejones/sixtyfps.git?branch=feat/color_hsv#490f571f6c3242516bf2067f0e02cfd02ae76223"
source = "git+https://github.com/slint-ui/slint.git#385ec7d1995ea1d584855f34a9b4c2b8b460f532"
dependencies = [
"bytemuck",
"cfg-if",
@@ -2011,7 +2091,7 @@ dependencies = [
[[package]]
name = "i-slint-common"
version = "1.6.0"
source = "git+https://github.com/flukejones/sixtyfps.git?branch=feat/color_hsv#490f571f6c3242516bf2067f0e02cfd02ae76223"
source = "git+https://github.com/slint-ui/slint.git#385ec7d1995ea1d584855f34a9b4c2b8b460f532"
dependencies = [
"cfg-if",
"derive_more",
@@ -2022,7 +2102,7 @@ dependencies = [
[[package]]
name = "i-slint-compiler"
version = "1.6.0"
source = "git+https://github.com/flukejones/sixtyfps.git?branch=feat/color_hsv#490f571f6c3242516bf2067f0e02cfd02ae76223"
source = "git+https://github.com/slint-ui/slint.git#385ec7d1995ea1d584855f34a9b4c2b8b460f532"
dependencies = [
"by_address",
"codemap",
@@ -2031,7 +2111,7 @@ dependencies = [
"derive_more",
"fontdue",
"i-slint-common",
"image",
"image 0.25.1",
"itertools 0.12.1",
"linked_hash_set",
"lyon_extra",
@@ -2051,7 +2131,7 @@ dependencies = [
[[package]]
name = "i-slint-core"
version = "1.6.0"
source = "git+https://github.com/flukejones/sixtyfps.git?branch=feat/color_hsv#490f571f6c3242516bf2067f0e02cfd02ae76223"
source = "git+https://github.com/slint-ui/slint.git#385ec7d1995ea1d584855f34a9b4c2b8b460f532"
dependencies = [
"auto_enums",
"bytemuck",
@@ -2064,7 +2144,7 @@ dependencies = [
"gettext-rs",
"i-slint-common",
"i-slint-core-macros",
"image",
"image 0.25.1",
"integer-sqrt",
"lyon_algorithms",
"lyon_extra",
@@ -2096,7 +2176,7 @@ dependencies = [
[[package]]
name = "i-slint-core-macros"
version = "1.6.0"
source = "git+https://github.com/flukejones/sixtyfps.git?branch=feat/color_hsv#490f571f6c3242516bf2067f0e02cfd02ae76223"
source = "git+https://github.com/slint-ui/slint.git#385ec7d1995ea1d584855f34a9b4c2b8b460f532"
dependencies = [
"quote",
"syn 2.0.58",
@@ -2105,7 +2185,7 @@ dependencies = [
[[package]]
name = "i-slint-renderer-femtovg"
version = "1.6.0"
source = "git+https://github.com/flukejones/sixtyfps.git?branch=feat/color_hsv#490f571f6c3242516bf2067f0e02cfd02ae76223"
source = "git+https://github.com/slint-ui/slint.git#385ec7d1995ea1d584855f34a9b4c2b8b460f532"
dependencies = [
"cfg-if",
"const-field-offset",
@@ -2136,7 +2216,7 @@ dependencies = [
[[package]]
name = "i-slint-renderer-skia"
version = "1.6.0"
source = "git+https://github.com/flukejones/sixtyfps.git?branch=feat/color_hsv#490f571f6c3242516bf2067f0e02cfd02ae76223"
source = "git+https://github.com/slint-ui/slint.git#385ec7d1995ea1d584855f34a9b4c2b8b460f532"
dependencies = [
"bytemuck",
"cfg-if",
@@ -2215,17 +2295,44 @@ name = "image"
version = "0.24.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5690139d2f55868e080017335e4b94cb7414274c74f1669c84fb5feba2c9f69d"
dependencies = [
"bytemuck",
"byteorder",
"color_quant",
"num-traits",
]
[[package]]
name = "image"
version = "0.25.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd54d660e773627692c524beaad361aca785a4f9f5730ce91f42aabe5bce3d11"
dependencies = [
"bytemuck",
"byteorder",
"color_quant",
"exr",
"gif 0.13.1",
"jpeg-decoder",
"image-webp",
"num-traits",
"png",
"qoi",
"ravif",
"rayon",
"rgb",
"tiff",
"zune-core",
"zune-jpeg",
]
[[package]]
name = "image-webp"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a84a25dcae3ac487bc24ef280f9e20c79c9b1a3e5e32cbed3041d1c514aa87c"
dependencies = [
"byteorder",
"thiserror",
]
[[package]]
@@ -2310,6 +2417,17 @@ dependencies = [
"num-traits",
]
[[package]]
name = "interpolate_name"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.58",
]
[[package]]
name = "io-lifetimes"
version = "1.0.11"
@@ -2392,9 +2510,6 @@ name = "jpeg-decoder"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0"
dependencies = [
"rayon",
]
[[package]]
name = "js-sys"
@@ -2460,6 +2575,17 @@ version = "0.2.153"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd"
[[package]]
name = "libfuzzer-sys"
version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a96cfd5557eb82f2b83fed4955246c988d331975a002961b07c81584d107e7f7"
dependencies = [
"arbitrary",
"cc",
"once_cell",
]
[[package]]
name = "libloading"
version = "0.7.4"
@@ -2615,6 +2741,15 @@ dependencies = [
"zbus 4.1.2",
]
[[package]]
name = "loop9"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062"
dependencies = [
"imgref",
]
[[package]]
name = "lru"
version = "0.12.3"
@@ -2683,6 +2818,16 @@ dependencies = [
"libc",
]
[[package]]
name = "maybe-rayon"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519"
dependencies = [
"cfg-if",
"rayon",
]
[[package]]
name = "memchr"
version = "2.7.2"
@@ -2824,6 +2969,12 @@ dependencies = [
"jni-sys",
]
[[package]]
name = "new_debug_unreachable"
version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086"
[[package]]
name = "nix"
version = "0.26.4"
@@ -2871,6 +3022,12 @@ dependencies = [
"minimal-lexical",
]
[[package]]
name = "noop_proc_macro"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8"
[[package]]
name = "notify-rust"
version = "4.7.0"
@@ -2882,12 +3039,55 @@ dependencies = [
"zbus 4.1.2",
]
[[package]]
name = "num-bigint"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0"
dependencies = [
"autocfg",
"num-integer",
"num-traits",
]
[[package]]
name = "num-conv"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
[[package]]
name = "num-derive"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.58",
]
[[package]]
name = "num-integer"
version = "0.1.46"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
dependencies = [
"num-traits",
]
[[package]]
name = "num-rational"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0"
dependencies = [
"autocfg",
"num-bigint",
"num-integer",
"num-traits",
]
[[package]]
name = "num-traits"
version = "0.2.18"
@@ -3258,6 +3458,25 @@ dependencies = [
"unicode-ident",
]
[[package]]
name = "profiling"
version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43d84d1d7a6ac92673717f9f6d1518374ef257669c24ebc5ac25d5033828be58"
dependencies = [
"profiling-procmacros",
]
[[package]]
name = "profiling-procmacros"
version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8021cf59c8ec9c432cfc2526ac6b8aa508ecaf29cd415f271b8406c1b851c3fd"
dependencies = [
"quote",
"syn 2.0.58",
]
[[package]]
name = "qoi"
version = "0.4.1"
@@ -3267,6 +3486,12 @@ dependencies = [
"bytemuck",
]
[[package]]
name = "quick-error"
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3"
[[package]]
name = "quick-xml"
version = "0.30.0"
@@ -3324,6 +3549,56 @@ dependencies = [
"getrandom",
]
[[package]]
name = "rav1e"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd87ce80a7665b1cce111f8a16c1f3929f6547ce91ade6addf4ec86a8dda5ce9"
dependencies = [
"arbitrary",
"arg_enum_proc_macro",
"arrayvec",
"av1-grain",
"bitstream-io",
"built",
"cfg-if",
"interpolate_name",
"itertools 0.12.1",
"libc",
"libfuzzer-sys",
"log",
"maybe-rayon",
"new_debug_unreachable",
"noop_proc_macro",
"num-derive",
"num-traits",
"once_cell",
"paste",
"profiling",
"rand",
"rand_chacha",
"simd_helpers",
"system-deps",
"thiserror",
"v_frame",
"wasm-bindgen",
]
[[package]]
name = "ravif"
version = "0.11.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc13288f5ab39e6d7c9d501759712e6969fcc9734220846fc9ed26cae2cc4234"
dependencies = [
"avif-serialize",
"imgref",
"loop9",
"quick-error",
"rav1e",
"rayon",
"rgb",
]
[[package]]
name = "raw-window-handle"
version = "0.5.2"
@@ -3773,7 +4048,7 @@ checksum = "e3586be2cf6c0a8099a79a12b4084357aa9b3e0b0d7980e3b67aaf7a9d55f9f0"
dependencies = [
"cfg-if",
"libc",
"version-compare",
"version-compare 0.1.1",
]
[[package]]
@@ -3865,6 +4140,15 @@ version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
[[package]]
name = "simd_helpers"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6"
dependencies = [
"quote",
]
[[package]]
name = "simplecss"
version = "0.2.1"
@@ -3889,7 +4173,7 @@ dependencies = [
"bindgen",
"cc",
"flate2",
"heck",
"heck 0.4.1",
"lazy_static",
"regex",
"serde_json",
@@ -3921,7 +4205,7 @@ dependencies = [
[[package]]
name = "slint"
version = "1.6.0"
source = "git+https://github.com/flukejones/sixtyfps.git?branch=feat/color_hsv#490f571f6c3242516bf2067f0e02cfd02ae76223"
source = "git+https://github.com/slint-ui/slint.git#385ec7d1995ea1d584855f34a9b4c2b8b460f532"
dependencies = [
"const-field-offset",
"i-slint-backend-selector",
@@ -3937,7 +4221,7 @@ dependencies = [
[[package]]
name = "slint-build"
version = "1.6.0"
source = "git+https://github.com/flukejones/sixtyfps.git?branch=feat/color_hsv#490f571f6c3242516bf2067f0e02cfd02ae76223"
source = "git+https://github.com/slint-ui/slint.git#385ec7d1995ea1d584855f34a9b4c2b8b460f532"
dependencies = [
"i-slint-compiler",
"spin_on",
@@ -3948,7 +4232,7 @@ dependencies = [
[[package]]
name = "slint-macros"
version = "1.6.0"
source = "git+https://github.com/flukejones/sixtyfps.git?branch=feat/color_hsv#490f571f6c3242516bf2067f0e02cfd02ae76223"
source = "git+https://github.com/slint-ui/slint.git#385ec7d1995ea1d584855f34a9b4c2b8b460f532"
dependencies = [
"i-slint-compiler",
"proc-macro2",
@@ -4137,7 +4421,7 @@ version = "0.26.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946"
dependencies = [
"heck",
"heck 0.4.1",
"proc-macro2",
"quote",
"rustversion",
@@ -4191,6 +4475,19 @@ dependencies = [
"unicode-ident",
]
[[package]]
name = "system-deps"
version = "6.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349"
dependencies = [
"cfg-expr",
"heck 0.5.0",
"pkg-config",
"toml 0.8.12",
"version-compare 0.2.0",
]
[[package]]
name = "systemd-zbus"
version = "0.3.1"
@@ -4212,6 +4509,12 @@ dependencies = [
"xattr",
]
[[package]]
name = "target-lexicon"
version = "0.12.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f"
[[package]]
name = "tauri-winrt-notification"
version = "0.1.3"
@@ -4692,6 +4995,17 @@ dependencies = [
"xmlwriter",
]
[[package]]
name = "v_frame"
version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6f32aaa24bacd11e488aa9ba66369c7cd514885742c9fe08cfe85884db3e92b"
dependencies = [
"aligned-vec",
"num-traits",
"wasm-bindgen",
]
[[package]]
name = "vcpkg"
version = "0.2.15"
@@ -4704,6 +5018,12 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "579a42fc0b8e0c63b76519a339be31bed574929511fa53c1a3acae26eb258f29"
[[package]]
name = "version-compare"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b"
[[package]]
name = "version_check"
version = "0.9.4"
@@ -4723,7 +5043,7 @@ dependencies = [
[[package]]
name = "vtable"
version = "0.2.0"
source = "git+https://github.com/flukejones/sixtyfps.git?branch=feat/color_hsv#490f571f6c3242516bf2067f0e02cfd02ae76223"
source = "git+https://github.com/slint-ui/slint.git#385ec7d1995ea1d584855f34a9b4c2b8b460f532"
dependencies = [
"const-field-offset",
"portable-atomic",
@@ -4734,7 +5054,7 @@ dependencies = [
[[package]]
name = "vtable-macro"
version = "0.2.0"
source = "git+https://github.com/flukejones/sixtyfps.git?branch=feat/color_hsv#490f571f6c3242516bf2067f0e02cfd02ae76223"
source = "git+https://github.com/slint-ui/slint.git#385ec7d1995ea1d584855f34a9b4c2b8b460f532"
dependencies = [
"proc-macro2",
"quote",
@@ -5654,6 +5974,12 @@ dependencies = [
"syn 2.0.58",
]
[[package]]
name = "zune-core"
version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a"
[[package]]
name = "zune-inflate"
version = "0.2.54"
@@ -5663,6 +5989,15 @@ dependencies = [
"simd-adler32",
]
[[package]]
name = "zune-jpeg"
version = "0.4.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec866b44a2a1fd6133d363f073ca1b179f438f99e7e5bfb1e33f7181facfe448"
dependencies = [
"zune-core",
]
[[package]]
name = "zvariant"
version = "3.15.1"

View File

@@ -191,7 +191,7 @@ 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) {

View File

@@ -156,20 +156,10 @@ impl AuraManager {
}
pub(crate) fn dbus_path_for_dev(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 devnum = devnum.to_string_lossy();
if let Some(devpath) = parent.attribute_value("devpath") {
let devpath = devpath.to_string_lossy();
format!("{AURA_ZBUS_PATH}/{id_product}_{devnum}_{devpath}")
} else {
format!("{AURA_ZBUS_PATH}/{id_product}_{devnum}")
}
} else {
format!("{AURA_ZBUS_PATH}/{id_product}")
};
return Some(ObjectPath::from_str_unchecked(&path).into());
if let Some(filename) = super::filename_partial(parent) {
return Some(
ObjectPath::from_str_unchecked(&format!("{AURA_ZBUS_PATH}/{filename}")).into(),
);
}
None
}

View File

@@ -1,5 +1,29 @@
use udev::Device;
use zbus::zvariant::{ObjectPath, OwnedObjectPath};
pub mod config;
pub mod controller;
pub mod manager;
/// Implements `CtrlTask`, `Reloadable`, `ZbusRun`
pub mod trait_impls;
/// Returns only the Device details concatenated in a form usable for
/// adding/appending to a filename
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 devnum = devnum.to_string_lossy();
if let Some(devpath) = parent.attribute_value("devpath") {
let devpath = devpath.to_string_lossy();
format!("{id_product}_{devnum}_{devpath}")
} else {
format!("{id_product}_{devnum}")
}
} else {
format!("{id_product}")
};
return Some(ObjectPath::from_str_unchecked(&path).into());
}
None
}

View File

@@ -233,7 +233,16 @@ impl CtrlPlatform {
cpu.set_epp(enegy_pref).ok();
} else if let Ok(gov) = cpu.get_governor() {
if gov != CPUGovernor::Powersave {
warn!("powersave governor is not is use, you should use it.");
warn!("powersave governor is not is use, trying to set.");
cpu.set_governor(CPUGovernor::Powersave)
.map_err(|e| error!("couldn't set powersave: {e:?}"))
.ok();
if epp.contains(&enegy_pref) {
debug!("Setting {enegy_pref:?}");
cpu.set_epp(enegy_pref)
.map_err(|e| error!("couldn't set EPP: {e:?}"))
.ok();
}
}
}
}

View File

@@ -7,11 +7,11 @@ After=nvidia-powerd.service systemd-udevd.service
[Service]
Environment=IS_SERVICE=1
Environment=RUST_LOG="info"
# ExecStartPre=/bin/sleep 2 # was required only for slow devices
ExecStartPre=/bin/sleep 2 # required to prevent init issues with hid_asus and MCU
ExecStart=/usr/bin/asusd
Restart=on-failure
RestartSec=1
Type=dbus
BusName=org.asuslinux.Daemon
SELinuxContext=system_u:system_r:unconfined_t:s0
#SELinuxContext=system_u:object_r:modules_object_t:s0
#SELinuxContext=system_u:object_r:modules_object_t:s0

View File

@@ -594,7 +594,7 @@
power_zones: [Keyboard],
),
(
device_name: "GL553VE",
device_name: "GL553V",
product_id: "",
layout_name: "g533q",
basic_modes: [Static, Breathe, Strobe],
@@ -829,7 +829,7 @@
),
(
device_name: "GZ301Z",
product_id: "1a30",
product_id: "",
layout_name: "ga401q",
basic_modes: [Static, Breathe, Pulse],
basic_zones: [],
@@ -845,6 +845,15 @@
advanced_type: None,
power_zones: [None],
),
(
device_name: "GZ301Z",
product_id: "1a30",
layout_name: "ga401q",
basic_modes: [Static, Breathe, Pulse],
basic_zones: [],
advanced_type: None,
power_zones: [Keyboard],
),
(
device_name: "RC71L",
product_id: "",

View File

@@ -91,6 +91,7 @@ impl LedSupportFile {
if !config.product_id.is_empty() {
info!("Checking product ID");
if config.product_id == product_id {
info!("Matched to {}", config.product_id);
return Some(config.clone());
} else {
continue;
@@ -192,6 +193,7 @@ mod tests {
// Ensure the data is sorted
let mut tmp_sort = tmp.clone();
tmp_sort.0.sort_by(|a, b| a.product_id.cmp(&b.product_id));
tmp_sort.0.sort_by(|a, b| a.device_name.cmp(&b.device_name));
if tmp != tmp_sort {
let sorted =

View File

@@ -276,7 +276,6 @@ impl From<OldAuraPower> for u32 {
#[cfg(test)]
mod test {
use crate::aura_detection::LedSupportData;
use crate::keyboard::{AuraPowerState, LaptopAuraPower};
use crate::{AuraDeviceType, PowerZones};

View File

@@ -46,14 +46,13 @@ versions.workspace = true
nix = "^0.26.1"
tempfile = "3.3.0"
i-slint-backend-selector = { git = "https://github.com/flukejones/sixtyfps.git", branch = "feat/color_hsv" }
i-slint-core = { git = "https://github.com/flukejones/sixtyfps.git", branch = "feat/color_hsv" }
i-slint-backend-winit = { git = "https://github.com/flukejones/sixtyfps.git", branch = "feat/color_hsv" }
i-slint-backend-selector = { git = "https://github.com/slint-ui/slint.git" }
i-slint-core = { git = "https://github.com/slint-ui/slint.git" }
i-slint-backend-winit = { git = "https://github.com/slint-ui/slint.git" }
winit = "*"
[dependencies.slint]
git = "https://github.com/flukejones/sixtyfps.git"
branch = "feat/color_hsv"
git = "https://github.com/slint-ui/slint.git"
default-features = false
features = [
"std",
@@ -65,8 +64,7 @@ features = [
]
[build-dependencies.slint-build]
git = "https://github.com/flukejones/sixtyfps.git"
branch = "feat/color_hsv"
git = "https://github.com/slint-ui/slint.git"
[dev-dependencies]
cargo-husky.workspace = true

View File

@@ -86,10 +86,10 @@ impl From<SlintAuraPowerState> for AuraPowerState {
fn from(value: SlintAuraPowerState) -> Self {
Self {
zone: value.zone.into(),
boot: value.boot.into(),
awake: value.awake.into(),
sleep: value.sleep.into(),
shutdown: value.shutdown.into(),
boot: value.boot,
awake: value.awake,
sleep: value.sleep,
shutdown: value.shutdown,
}
}
}
@@ -98,10 +98,10 @@ impl From<AuraPowerState> for SlintAuraPowerState {
fn from(value: AuraPowerState) -> Self {
let zone = value.zone.into();
SlintAuraPowerState {
boot: value.boot.into(),
awake: value.awake.into(),
sleep: value.sleep.into(),
shutdown: value.shutdown.into(),
boot: value.boot,
awake: value.awake,
sleep: value.sleep,
shutdown: value.shutdown,
zone,
zone_name_idx: zone as i32,
}
@@ -112,10 +112,10 @@ impl From<&AuraPowerState> for SlintAuraPowerState {
fn from(value: &AuraPowerState) -> Self {
let zone = value.zone.into();
SlintAuraPowerState {
boot: value.boot.into(),
awake: value.awake.into(),
sleep: value.sleep.into(),
shutdown: value.shutdown.into(),
boot: value.boot,
awake: value.awake,
sleep: value.sleep,
shutdown: value.shutdown,
zone,
zone_name_idx: zone as i32,
}
@@ -134,11 +134,8 @@ impl From<SlintLaptopAuraPower> for rog_aura::keyboard::LaptopAuraPower {
impl From<LaptopAuraPower> for SlintLaptopAuraPower {
fn from(value: LaptopAuraPower) -> Self {
let converted: Vec<SlintAuraPowerState> = value
.states
.iter()
.map(|s| SlintAuraPowerState::from(s))
.collect();
let converted: Vec<SlintAuraPowerState> =
value.states.iter().map(SlintAuraPowerState::from).collect();
Self {
states: ModelRc::from(converted.as_slice()),
}

View File

@@ -2,7 +2,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2024-04-10 09:14+0000\n"
"POT-Creation-Date: 2024-04-16 23:52+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"

View File

@@ -68,21 +68,23 @@ export component ColourSlider inherits VerticalLayout {
];
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));
root.colourbox = root.final_colour;
}//
}
//
callback external_colour_change();
external_colour_change => {
if (root.final_colour.hue < 0) {
c1.value = (root.base_colours.length - 1) * ((root.final_colour.hue + 360) / 360);
if (root.final_colour.to-hsv().hue < 0) {
c1.value = (root.base_colours.length - 1) * ((root.final_colour.to-hsv().hue + 360) / 360);
} else {
c1.value = (root.base_colours.length - 1) * (root.final_colour.hue / 360);
c1.value = (root.base_colours.length - 1) * (root.final_colour.to-hsv().hue / 360);
}
c2.value = root.base_shade.length - (root.base_shade.length * root.final_colour.value);
c2.value = root.base_shade.length - (root.base_shade.length * root.final_colour.to-hsv().value);
root.set_base_colour();
}
Rectangle {

View File

@@ -1,7 +1,7 @@
// Copyright © SixtyFPS GmbH <info@slint.dev>
// SPDX-License-Identifier: MIT
import { StyleMetrics, Palette } from "std-widgets.slint";
import { Palette, HorizontalBox, VerticalBox } from "std-widgets.slint";
component SideBarItem inherits Rectangle {
padding: 10px;
@@ -24,23 +24,23 @@ component SideBarItem inherits Rectangle {
focused when root.has-focus: {
state.opacity: 0.8;
}
]state := Rectangle {
]
state := Rectangle {
opacity: 0;
border-width: 2px;
border-radius: 10px;
border-color: StyleMetrics.default-text-color;
background: StyleMetrics.window-background;
border-color: Palette.accent-background;
background: Palette.alternate-background;
animate opacity { duration: 150ms; }
animate border-width { duration: 150ms; }
height: l.preferred-height;
}
l := HorizontalLayout {
l := HorizontalBox {
y: (parent.height - self.height) / 2;
padding: StyleMetrics.layout-padding;
spacing: 0px;
label := Text {
color: StyleMetrics.default-text-color;
color: Palette.foreground;
vertical-alignment: center;
}
}
@@ -57,14 +57,17 @@ export component SideBar inherits Rectangle {
in property <string> title <=> label.text;
out property <int> current-item: 0;
out property <int> current-focused: fs.has-focus ? fs.focused-tab : -1;
// The currently focused tab
width: 180px;
// The currently focused tab
width: 160px;
forward-focus: fs;
accessible-role: tab;
accessible-delegate-focus: root.current-focused >= 0 ? root.current-focused : root.current-item;
Rectangle {
background: StyleMetrics.window-background.darker(0.2);
border-width: 2px;
border-color: Palette.accent-background;
border-radius: 0px;
background: Palette.background.darker(0.2);
fs := FocusScope {
key-pressed(event) => {
if (event.text == "\n") {
@@ -95,9 +98,8 @@ export component SideBar inherits Rectangle {
}
}
VerticalLayout {
padding: StyleMetrics.layout-padding;
spacing: StyleMetrics.layout-spacing;
VerticalBox {
spacing: 4px;
alignment: start;
label := Text {
font-size: 16px;
@@ -105,7 +107,7 @@ export component SideBar inherits Rectangle {
}
navigation := VerticalLayout {
// spacing: 10px;
spacing: -6px;
alignment: start;
vertical-stretch: 0;
for item[index] in root.model: SideBarItem {
@@ -120,9 +122,10 @@ export component SideBar inherits Rectangle {
}
VerticalLayout {
bottom := VerticalLayout {
padding-left: StyleMetrics.layout-padding;
padding-right: StyleMetrics.layout-padding;
bottom := VerticalBox {
padding-left: 0px;
padding-top: 0px;
padding-bottom: 0px;
@children
}
}