Fix sortof notifs

This commit is contained in:
Luke D. Jones
2024-05-24 18:49:23 +12:00
parent d203fab70d
commit 4730e645ba
6 changed files with 125 additions and 139 deletions

210
Cargo.lock generated
View File

@@ -154,7 +154,7 @@ dependencies = [
"config-traits",
"dmi_id",
"env_logger",
"futures-lite 1.13.0",
"futures-lite 2.3.0",
"inotify",
"log",
"logind-zbus",
@@ -376,7 +376,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.65",
"syn 2.0.66",
]
[[package]]
@@ -416,7 +416,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.65",
"syn 2.0.66",
]
[[package]]
@@ -433,7 +433,7 @@ checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.65",
"syn 2.0.66",
]
[[package]]
@@ -451,7 +451,7 @@ dependencies = [
"derive_utils",
"proc-macro2",
"quote",
"syn 2.0.65",
"syn 2.0.66",
]
[[package]]
@@ -543,7 +543,7 @@ dependencies = [
"flume",
"icrate 0.1.2",
"log",
"objc2 0.5.1",
"objc2 0.5.2",
"once_cell",
"parking_lot",
"png",
@@ -570,7 +570,7 @@ dependencies = [
"regex",
"rustc-hash",
"shlex",
"syn 2.0.65",
"syn 2.0.66",
"which",
]
@@ -636,7 +636,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e58aa60e59d8dbfcc36138f5f18be5f24394d33b38b24f7fd0b1caa33095f22f"
dependencies = [
"block-sys",
"objc2 0.5.1",
"objc2 0.5.2",
]
[[package]]
@@ -682,7 +682,7 @@ checksum = "4da9a32f3fed317401fa3c862968128267c3106685286e15d5aaa3d7389c2f60"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.65",
"syn 2.0.66",
]
[[package]]
@@ -892,7 +892,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f76990911f2267d837d9d0ad060aa63aaad170af40904b29461734c339030d4d"
dependencies = [
"quote",
"syn 2.0.65",
"syn 2.0.66",
]
[[package]]
@@ -954,7 +954,7 @@ dependencies = [
[[package]]
name = "const-field-offset"
version = "0.1.5"
source = "git+https://github.com/slint-ui/slint.git#9ca5c63583c566c0fbfe9104669070e4d8cbdb17"
source = "git+https://github.com/slint-ui/slint.git#23f7a7864dcd4012405b0bce567ff22c32a4d3e6"
dependencies = [
"const-field-offset-macro",
"field-offset",
@@ -963,11 +963,11 @@ dependencies = [
[[package]]
name = "const-field-offset-macro"
version = "0.1.5"
source = "git+https://github.com/slint-ui/slint.git#9ca5c63583c566c0fbfe9104669070e4d8cbdb17"
source = "git+https://github.com/slint-ui/slint.git#23f7a7864dcd4012405b0bce567ff22c32a4d3e6"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.65",
"syn 2.0.66",
]
[[package]]
@@ -1063,9 +1063,9 @@ dependencies = [
[[package]]
name = "crc32fast"
version = "1.4.0"
version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa"
checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3"
dependencies = [
"cfg-if",
]
@@ -1142,7 +1142,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f"
dependencies = [
"quote",
"syn 2.0.65",
"syn 2.0.66",
]
[[package]]
@@ -1187,7 +1187,7 @@ checksum = "61bb5a1014ce6dfc2a378578509abe775a5aa06bff584a547555d9efdb81b926"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.65",
"syn 2.0.66",
]
[[package]]
@@ -1352,7 +1352,7 @@ checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.65",
"syn 2.0.66",
]
[[package]]
@@ -1386,9 +1386,9 @@ dependencies = [
[[package]]
name = "euclid"
version = "0.22.9"
version = "0.22.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87f253bc5c813ca05792837a0ff4b3a580336b224512d48f7eda1d7dd9210787"
checksum = "e0f0eb73b934648cd7a4a61f1b15391cd95dab0b4da6e2e66c2a072c144b4a20"
dependencies = [
"num-traits",
]
@@ -1621,7 +1621,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.65",
"syn 2.0.66",
]
[[package]]
@@ -2114,7 +2114,7 @@ dependencies = [
[[package]]
name = "i-slint-backend-linuxkms"
version = "1.6.0"
source = "git+https://github.com/slint-ui/slint.git#9ca5c63583c566c0fbfe9104669070e4d8cbdb17"
source = "git+https://github.com/slint-ui/slint.git#23f7a7864dcd4012405b0bce567ff22c32a4d3e6"
dependencies = [
"calloop",
"drm",
@@ -2134,7 +2134,7 @@ dependencies = [
[[package]]
name = "i-slint-backend-selector"
version = "1.6.0"
source = "git+https://github.com/slint-ui/slint.git#9ca5c63583c566c0fbfe9104669070e4d8cbdb17"
source = "git+https://github.com/slint-ui/slint.git#23f7a7864dcd4012405b0bce567ff22c32a4d3e6"
dependencies = [
"cfg-if",
"i-slint-backend-linuxkms",
@@ -2146,7 +2146,7 @@ dependencies = [
[[package]]
name = "i-slint-backend-winit"
version = "1.6.0"
source = "git+https://github.com/slint-ui/slint.git#9ca5c63583c566c0fbfe9104669070e4d8cbdb17"
source = "git+https://github.com/slint-ui/slint.git#23f7a7864dcd4012405b0bce567ff22c32a4d3e6"
dependencies = [
"cfg-if",
"cfg_aliases 0.2.1",
@@ -2176,7 +2176,7 @@ dependencies = [
[[package]]
name = "i-slint-common"
version = "1.6.0"
source = "git+https://github.com/slint-ui/slint.git#9ca5c63583c566c0fbfe9104669070e4d8cbdb17"
source = "git+https://github.com/slint-ui/slint.git#23f7a7864dcd4012405b0bce567ff22c32a4d3e6"
dependencies = [
"cfg-if",
"derive_more",
@@ -2187,7 +2187,7 @@ dependencies = [
[[package]]
name = "i-slint-compiler"
version = "1.6.0"
source = "git+https://github.com/slint-ui/slint.git#9ca5c63583c566c0fbfe9104669070e4d8cbdb17"
source = "git+https://github.com/slint-ui/slint.git#23f7a7864dcd4012405b0bce567ff22c32a4d3e6"
dependencies = [
"by_address",
"codemap",
@@ -2216,7 +2216,7 @@ dependencies = [
[[package]]
name = "i-slint-core"
version = "1.6.0"
source = "git+https://github.com/slint-ui/slint.git#9ca5c63583c566c0fbfe9104669070e4d8cbdb17"
source = "git+https://github.com/slint-ui/slint.git#23f7a7864dcd4012405b0bce567ff22c32a4d3e6"
dependencies = [
"auto_enums",
"bitflags 2.5.0",
@@ -2259,16 +2259,16 @@ dependencies = [
[[package]]
name = "i-slint-core-macros"
version = "1.6.0"
source = "git+https://github.com/slint-ui/slint.git#9ca5c63583c566c0fbfe9104669070e4d8cbdb17"
source = "git+https://github.com/slint-ui/slint.git#23f7a7864dcd4012405b0bce567ff22c32a4d3e6"
dependencies = [
"quote",
"syn 2.0.65",
"syn 2.0.66",
]
[[package]]
name = "i-slint-renderer-femtovg"
version = "1.6.0"
source = "git+https://github.com/slint-ui/slint.git#9ca5c63583c566c0fbfe9104669070e4d8cbdb17"
source = "git+https://github.com/slint-ui/slint.git#23f7a7864dcd4012405b0bce567ff22c32a4d3e6"
dependencies = [
"cfg-if",
"const-field-offset",
@@ -2299,7 +2299,7 @@ dependencies = [
[[package]]
name = "i-slint-renderer-skia"
version = "1.6.0"
source = "git+https://github.com/slint-ui/slint.git#9ca5c63583c566c0fbfe9104669070e4d8cbdb17"
source = "git+https://github.com/slint-ui/slint.git#23f7a7864dcd4012405b0bce567ff22c32a4d3e6"
dependencies = [
"bytemuck",
"cfg-if",
@@ -2370,7 +2370,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3fb69199826926eb864697bddd27f73d9fddcffc004f5733131e15b465e30642"
dependencies = [
"block2 0.4.0",
"objc2 0.5.1",
"objc2 0.5.2",
]
[[package]]
@@ -2829,9 +2829,9 @@ dependencies = [
[[package]]
name = "mac-notification-sys"
version = "0.5.9"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9402858e87f85f88bf518bd2e68450640df1c99b1ddb3ea28c4d5d823bb54cdd"
checksum = "51fca4d74ff9dbaac16a01b924bc3693fa2bba0862c2c633abc73f9a8ea21f64"
dependencies = [
"cc",
"dirs-next",
@@ -3052,9 +3052,11 @@ dependencies = [
[[package]]
name = "notify-rust"
version = "4.7.0"
source = "git+https://github.com/flukejones/notify-rust.git?rev=54176413b81189a3e4edbdc20a0b4f7e2e35c063#54176413b81189a3e4edbdc20a0b4f7e2e35c063"
version = "4.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5312f837191c317644f313f7b2b39f9cb1496570c74f7c17152dd3961219551f"
dependencies = [
"log",
"mac-notification-sys",
"serde",
"tauri-winrt-notification",
@@ -3105,7 +3107,7 @@ dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
"syn 2.0.65",
"syn 2.0.66",
]
[[package]]
@@ -3131,9 +3133,9 @@ dependencies = [
[[package]]
name = "objc-sys"
version = "0.3.3"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da284c198fb9b7b0603f8635185e85fbd5b64ee154b1ed406d489077de2d6d60"
checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310"
[[package]]
name = "objc2"
@@ -3147,12 +3149,12 @@ dependencies = [
[[package]]
name = "objc2"
version = "0.5.1"
version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4b25e1034d0e636cd84707ccdaa9f81243d399196b8a773946dcffec0401659"
checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804"
dependencies = [
"objc-sys",
"objc2-encode 4.0.1",
"objc2-encode 4.0.3",
]
[[package]]
@@ -3163,9 +3165,9 @@ checksum = "d079845b37af429bfe5dfa76e6d087d788031045b25cfc6fd898486fd9847666"
[[package]]
name = "objc2-encode"
version = "4.0.1"
version = "4.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "88658da63e4cc2c8adb1262902cd6af51094df0488b760d6fd27194269c0950a"
checksum = "7891e71393cd1f227313c9379a26a584ff3d7e6e7159e988851f0934c993f0f8"
[[package]]
name = "objc_exception"
@@ -3296,7 +3298,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.65",
"syn 2.0.66",
]
[[package]]
@@ -3422,7 +3424,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e"
dependencies = [
"proc-macro2",
"syn 2.0.65",
"syn 2.0.66",
]
[[package]]
@@ -3463,7 +3465,7 @@ dependencies = [
"itertools",
"proc-macro2",
"quote",
"syn 2.0.65",
"syn 2.0.66",
]
[[package]]
@@ -3484,15 +3486,6 @@ dependencies = [
"bytemuck",
]
[[package]]
name = "quick-xml"
version = "0.30.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956"
dependencies = [
"memchr",
]
[[package]]
name = "quick-xml"
version = "0.31.0"
@@ -4010,7 +4003,7 @@ checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.65",
"syn 2.0.66",
]
[[package]]
@@ -4032,7 +4025,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.65",
"syn 2.0.66",
]
[[package]]
@@ -4141,7 +4134,7 @@ dependencies = [
[[package]]
name = "slint"
version = "1.6.0"
source = "git+https://github.com/slint-ui/slint.git#9ca5c63583c566c0fbfe9104669070e4d8cbdb17"
source = "git+https://github.com/slint-ui/slint.git#23f7a7864dcd4012405b0bce567ff22c32a4d3e6"
dependencies = [
"const-field-offset",
"i-slint-backend-selector",
@@ -4157,7 +4150,7 @@ dependencies = [
[[package]]
name = "slint-build"
version = "1.6.0"
source = "git+https://github.com/slint-ui/slint.git#9ca5c63583c566c0fbfe9104669070e4d8cbdb17"
source = "git+https://github.com/slint-ui/slint.git#23f7a7864dcd4012405b0bce567ff22c32a4d3e6"
dependencies = [
"i-slint-compiler",
"spin_on",
@@ -4168,7 +4161,7 @@ dependencies = [
[[package]]
name = "slint-macros"
version = "1.6.0"
source = "git+https://github.com/slint-ui/slint.git#9ca5c63583c566c0fbfe9104669070e4d8cbdb17"
source = "git+https://github.com/slint-ui/slint.git#23f7a7864dcd4012405b0bce567ff22c32a4d3e6"
dependencies = [
"i-slint-compiler",
"proc-macro2",
@@ -4361,7 +4354,7 @@ dependencies = [
"proc-macro2",
"quote",
"rustversion",
"syn 2.0.65",
"syn 2.0.66",
]
[[package]]
@@ -4402,9 +4395,9 @@ dependencies = [
[[package]]
name = "syn"
version = "2.0.65"
version = "2.0.66"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2863d96a84c6439701d7a38f9de935ec562c8832cc55d1dde0f513b52fad106"
checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5"
dependencies = [
"proc-macro2",
"quote",
@@ -4430,12 +4423,13 @@ dependencies = [
[[package]]
name = "tauri-winrt-notification"
version = "0.1.3"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "006851c9ccefa3c38a7646b8cec804bb429def3da10497bfa977179869c3e8e2"
checksum = "f89f5fb70d6f62381f5d9b2ba9008196150b40b75f3068eb24faeddf1c686871"
dependencies = [
"quick-xml 0.30.0",
"windows 0.51.1",
"quick-xml",
"windows 0.56.0",
"windows-version",
]
[[package]]
@@ -4488,7 +4482,7 @@ checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.65",
"syn 2.0.66",
]
[[package]]
@@ -4620,7 +4614,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.65",
"syn 2.0.66",
]
[[package]]
@@ -4770,7 +4764,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.65",
"syn 2.0.66",
]
[[package]]
@@ -4841,7 +4835,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a615d6c2764852a2e88a4f16e9ce1ea49bb776b5872956309e170d63a042a34f"
dependencies = [
"quote",
"syn 2.0.65",
"syn 2.0.66",
]
[[package]]
@@ -5037,7 +5031,7 @@ dependencies = [
[[package]]
name = "vtable"
version = "0.2.0"
source = "git+https://github.com/slint-ui/slint.git#9ca5c63583c566c0fbfe9104669070e4d8cbdb17"
source = "git+https://github.com/slint-ui/slint.git#23f7a7864dcd4012405b0bce567ff22c32a4d3e6"
dependencies = [
"const-field-offset",
"portable-atomic",
@@ -5048,11 +5042,11 @@ dependencies = [
[[package]]
name = "vtable-macro"
version = "0.2.0"
source = "git+https://github.com/slint-ui/slint.git#9ca5c63583c566c0fbfe9104669070e4d8cbdb17"
source = "git+https://github.com/slint-ui/slint.git#23f7a7864dcd4012405b0bce567ff22c32a4d3e6"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.65",
"syn 2.0.66",
]
[[package]]
@@ -5107,7 +5101,7 @@ dependencies = [
"once_cell",
"proc-macro2",
"quote",
"syn 2.0.65",
"syn 2.0.66",
"wasm-bindgen-shared",
]
@@ -5141,7 +5135,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.65",
"syn 2.0.66",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@@ -5245,7 +5239,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "63b3a62929287001986fb58c789dce9b67604a397c15c611ad9f747300b6c283"
dependencies = [
"proc-macro2",
"quick-xml 0.31.0",
"quick-xml",
"quote",
]
@@ -5349,16 +5343,6 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "windows"
version = "0.51.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9"
dependencies = [
"windows-core 0.51.1",
"windows-targets 0.48.5",
]
[[package]]
name = "windows"
version = "0.54.0"
@@ -5379,15 +5363,6 @@ dependencies = [
"windows-targets 0.52.5",
]
[[package]]
name = "windows-core"
version = "0.51.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64"
dependencies = [
"windows-targets 0.48.5",
]
[[package]]
name = "windows-core"
version = "0.52.0"
@@ -5427,7 +5402,7 @@ checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.65",
"syn 2.0.66",
]
[[package]]
@@ -5438,7 +5413,7 @@ checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.65",
"syn 2.0.66",
]
[[package]]
@@ -5523,6 +5498,15 @@ dependencies = [
"windows_x86_64_msvc 0.52.5",
]
[[package]]
name = "windows-version"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6998aa457c9ba8ff2fb9f13e9d2a930dabcea28f1d0ab94d687d8b3654844515"
dependencies = [
"windows-targets 0.52.5",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.42.2"
@@ -5869,9 +5853,9 @@ checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9"
[[package]]
name = "zbus"
version = "4.2.1"
version = "4.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5915716dff34abef1351d2b10305b019c8ef33dcf6c72d31a6e227d5d9d7a21"
checksum = "989c3977a7aafa97b12b9a35d21cdcff9b0d2289762b14683f45d66b1ba6c48f"
dependencies = [
"async-broadcast",
"async-executor",
@@ -5907,14 +5891,14 @@ dependencies = [
[[package]]
name = "zbus_macros"
version = "4.2.1"
version = "4.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "66fceb36d0c1c4a6b98f3ce40f410e64e5a134707ed71892e1b178abc4c695d4"
checksum = "6fe9de53245dcf426b7be226a4217dd5e339080e5d46e64a02d6e5dcbf90fca1"
dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
"syn 1.0.109",
"syn 2.0.66",
"zvariant_utils",
]
@@ -5946,7 +5930,7 @@ checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.65",
"syn 2.0.66",
]
[[package]]
@@ -5960,9 +5944,9 @@ dependencies = [
[[package]]
name = "zvariant"
version = "4.1.0"
version = "4.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "877ef94e5e82b231d2a309c531f191a8152baba8241a7939ee04bd76b0171308"
checksum = "9aa6d31a02fbfb602bfde791de7fedeb9c2c18115b3d00f3a36e489f46ffbbc7"
dependencies = [
"endi",
"enumflags2",
@@ -5973,24 +5957,24 @@ dependencies = [
[[package]]
name = "zvariant_derive"
version = "4.1.0"
version = "4.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7ca98581cc6a8120789d8f1f0997e9053837d6aa5346cbb43454d7121be6e39"
checksum = "642bf1b6b6d527988b3e8193d20969d53700a36eac734d21ae6639db168701c8"
dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
"syn 1.0.109",
"syn 2.0.66",
"zvariant_utils",
]
[[package]]
name = "zvariant_utils"
version = "1.1.1"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "75fa7291bdd68cd13c4f97cc9d78cbf16d96305856dfc7ac942aeff4c2de7d5a"
checksum = "fc242db087efc22bd9ade7aa7809e4ba828132edc312871584a6b4391bdf8786"
dependencies = [
"proc-macro2",
"quote",
"syn 1.0.109",
"syn 2.0.66",
]

View File

@@ -71,9 +71,7 @@ gif = "^0.12.0"
versions = "6.2"
notify-rust = { git = "https://github.com/flukejones/notify-rust.git", rev = "54176413b81189a3e4edbdc20a0b4f7e2e35c063", default-features = false, features = [
"z",
] }
notify-rust = { version = "4.11.0", features = ["z", "async"] }
[profile.release]
# thin = 57s, asusd = 9.0M

View File

@@ -25,6 +25,7 @@ use tokio::runtime::Runtime;
#[tokio::main]
async fn main() -> Result<()> {
dbg!(notify_rust::get_capabilities().unwrap());
#[cfg(feature = "tokio-debug")]
console_subscriber::init();

View File

@@ -9,8 +9,8 @@ use std::process::Command;
use std::sync::{Arc, Mutex};
use std::time::Duration;
use log::{error, info, warn};
use notify_rust::{Hint, Notification, NotificationHandle, Urgency};
use log::{debug, error, info, warn};
use notify_rust::{Hint, Notification, Timeout, Urgency};
use rog_dbus::zbus_platform::PlatformProxy;
use rog_platform::platform::GpuMode;
use rog_platform::power::AsusPower;
@@ -60,7 +60,7 @@ fn start_dpu_status_mon(config: Arc<Mutex<Config>>) {
std::thread::spawn(move || {
let mut last_status = GfxPower::Unknown;
loop {
std::thread::sleep(Duration::from_millis(1000));
std::thread::sleep(Duration::from_millis(1500));
if let Ok(status) = dev.get_runtime_status() {
if status != GfxPower::Unknown && status != last_status {
if let Ok(config) = enabled_notifications_copy.lock() {
@@ -72,7 +72,11 @@ fn start_dpu_status_mon(config: Arc<Mutex<Config>>) {
}
// Required check because status cycles through
// active/unknown/suspended
do_gpu_status_notif("dGPU status changed:", &status).ok();
do_gpu_status_notif("dGPU status changed:", &status)
.show()
.unwrap()
.on_close(|_| ());
debug!("dGPU status changed: {:?}", &status);
}
last_status = status;
}
@@ -240,7 +244,11 @@ pub fn start_notifications(
}
// Required check because status cycles through
// active/unknown/suspended
do_gpu_status_notif("dGPU status changed:", &status).ok();
do_gpu_status_notif("dGPU status changed:", &status)
.show_async()
.await
.unwrap()
.on_close(|_| ());
}
last_status = status;
}
@@ -269,19 +277,15 @@ where
T: Display,
{
let mut notif = Notification::new();
notif
.summary(NOTIF_HEADER)
.body(&format!("{message} {data}"))
.timeout(-1)
//.hint(Hint::Resident(true))
.appname(NOTIF_HEADER)
.summary(&format!("{message} {data}"))
.timeout(Timeout::Milliseconds(3000))
.hint(Hint::Category("device".into()));
notif
}
fn do_gpu_status_notif(message: &str, data: &GfxPower) -> Result<NotificationHandle> {
// eww
fn do_gpu_status_notif(message: &str, data: &GfxPower) -> Notification {
let mut notif = base_notification(message, &<&str>::from(data).to_owned());
let icon = match data {
GfxPower::Suspended => "asus_notif_blue",
@@ -291,7 +295,7 @@ fn do_gpu_status_notif(message: &str, data: &GfxPower) -> Result<NotificationHan
GfxPower::Unknown => "gpu-integrated",
};
notif.icon(icon);
Ok(Notification::show(&notif)?)
notif
}
fn do_gfx_action_notif(message: &str, action: GfxUserAction, mode: GpuMode) -> Result<()> {
@@ -302,13 +306,12 @@ fn do_gfx_action_notif(message: &str, action: GfxUserAction, mode: GpuMode) -> R
let mut notif = Notification::new();
notif
.summary(NOTIF_HEADER)
.body(&format!("Changing to {mode}. {message}"))
.timeout(2000)
.appname(NOTIF_HEADER)
.summary(&format!("Changing to {mode}. {message}"))
//.hint(Hint::Resident(true))
.hint(Hint::Category("device".into()))
.urgency(Urgency::Critical)
.timeout(-1)
.timeout(Timeout::Never)
.icon("dialog-warning")
.hint(Hint::Transient(true));

View File

@@ -185,7 +185,7 @@ export component PageSystem inherits Rectangle {
}
if SystemPageData.available.ppt-pl1-spl: SystemSlider {
text: @tr("ppt_pl1_spl" => "PL1, Sustained Power Limit");
text: @tr("ppt_pl1_spl" => "PL1, sustained power limit");
minimum: 5;
maximum: 250;
value <=> SystemPageData.ppt_pl1_spl;
@@ -205,7 +205,7 @@ export component PageSystem inherits Rectangle {
}
if SystemPageData.available.ppt-fppt: SystemSlider {
text: @tr("ppt_fppt" => "fPPT, fast power limit");
text: @tr("ppt_fppt" => "FPPT, Fast Power Limit");
minimum: 5;
maximum: 250;
value <=> SystemPageData.ppt_fppt;
@@ -215,7 +215,7 @@ export component PageSystem inherits Rectangle {
}
if SystemPageData.available.ppt-apu-sppt: SystemSlider {
text: @tr("ppt_apu_sppt" => "sPPT, APU slow power limit");
text: @tr("ppt_apu_sppt" => "SPPT, APU slow power limit");
minimum: 5;
maximum: 130;
value <=> SystemPageData.ppt_apu_sppt;
@@ -225,7 +225,7 @@ export component PageSystem inherits Rectangle {
}
if SystemPageData.available.ppt-platform-sppt: SystemSlider {
text: @tr("ppt_platform_sppt" => "Slow Package Power Tracking Limit");
text: @tr("ppt_platform_sppt" => "Slow package power tracking limit");
maximum: 130;
minimum: 5;
value <=> SystemPageData.ppt_platform_sppt;

View File

@@ -17,7 +17,7 @@ export component SystemSlider inherits RogItem {
callback released(int);
HorizontalLayout {
HorizontalLayout {
width: 30%;
width: 50%;
alignment: LayoutAlignment.space-between;
padding-left: 10px;
Text {