build: update hyprland-rs to 0.4.0-alpha.1

(#565) 

this does have some breaking changes in it so it could have other
side effects.
This commit is contained in:
Nadia 2024-05-03 15:39:09 -05:00 committed by GitHub
parent 78fcd44c1a
commit f7a39ddecc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 18 additions and 58 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/target /target
.direnv/

69
Cargo.lock generated
View File

@ -26,6 +26,7 @@ dependencies = [
"cfg-if", "cfg-if",
"getrandom", "getrandom",
"once_cell", "once_cell",
"serde",
"version_check", "version_check",
] ]
@ -529,12 +530,6 @@ dependencies = [
"crossbeam-utils", "crossbeam-utils",
] ]
[[package]]
name = "convert_case"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e"
[[package]] [[package]]
name = "core-foundation" name = "core-foundation"
version = "0.9.3" version = "0.9.3"
@ -703,10 +698,8 @@ version = "0.99.17"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321"
dependencies = [ dependencies = [
"convert_case",
"proc-macro2", "proc-macro2",
"quote 1.0.35", "quote 1.0.35",
"rustc_version",
"syn 1.0.109", "syn 1.0.109",
] ]
@ -750,12 +743,6 @@ dependencies = [
"libloading", "libloading",
] ]
[[package]]
name = "doc-comment"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"
[[package]] [[package]]
name = "downcast-rs" name = "downcast-rs"
version = "1.2.0" version = "1.2.0"
@ -1457,32 +1444,28 @@ dependencies = [
[[package]] [[package]]
name = "hyprland" name = "hyprland"
version = "0.3.13" version = "0.4.0-alpha.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f87a8f1cc065d451894dd3916c0bc3fcf9b67b276126c05f27b1db912688dde8" checksum = "54fdc60390459bd6da28ec708ee7a672b8f6680efb8f8f33cbe970da16f40a48"
dependencies = [ dependencies = [
"async-trait", "ahash",
"derive_more", "derive_more",
"doc-comment",
"futures",
"hex",
"hyprland-macros", "hyprland-macros",
"lazy_static",
"num-traits", "num-traits",
"once_cell",
"paste", "paste",
"regex", "regex",
"serde", "serde",
"serde_json", "serde_json",
"serde_repr", "serde_repr",
"strum",
"tokio", "tokio",
] ]
[[package]] [[package]]
name = "hyprland-macros" name = "hyprland-macros"
version = "0.3.4" version = "0.4.0-alpha.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c941d3d52e979612af8cb94e8de49000c7fada2014a7791d173ab41339f4e4eb" checksum = "5dd8ce4c182ce77e485918f49262425ee51a2746fe97f14084869aeff2fbc38e"
dependencies = [ dependencies = [
"quote 1.0.35", "quote 1.0.35",
"syn 2.0.48", "syn 2.0.48",
@ -1614,6 +1597,7 @@ dependencies = [
"mpris", "mpris",
"nix 0.27.1", "nix 0.27.1",
"notify", "notify",
"num-traits",
"regex", "regex",
"reqwest", "reqwest",
"serde", "serde",
@ -2033,9 +2017,9 @@ dependencies = [
[[package]] [[package]]
name = "num-traits" name = "num-traits"
version = "0.2.15" version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a"
dependencies = [ dependencies = [
"autocfg", "autocfg",
] ]
@ -2193,9 +2177,9 @@ dependencies = [
[[package]] [[package]]
name = "paste" name = "paste"
version = "1.0.12" version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c"
[[package]] [[package]]
name = "percent-encoding" name = "percent-encoding"
@ -2653,12 +2637,6 @@ version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ecd36cc4259e3e4514335c4a138c6b43171a8d61d8f5c9348f9fc7529416f247" checksum = "ecd36cc4259e3e4514335c4a138c6b43171a8d61d8f5c9348f9fc7529416f247"
[[package]]
name = "rustversion"
version = "1.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06"
[[package]] [[package]]
name = "ryu" name = "ryu"
version = "1.0.13" version = "1.0.13"
@ -2937,28 +2915,6 @@ version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01"
[[package]]
name = "strum"
version = "0.26.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "723b93e8addf9aa965ebe2d11da6d7540fa2283fcea14b3371ff055f7ba13f5f"
dependencies = [
"strum_macros",
]
[[package]]
name = "strum_macros"
version = "0.26.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a3417fc93d76740d974a01654a09777cb500428cc874ca9f45edfe0c4d4cd18"
dependencies = [
"heck 0.4.1",
"proc-macro2",
"quote 1.0.35",
"rustversion",
"syn 2.0.48",
]
[[package]] [[package]]
name = "swayipc-async" name = "swayipc-async"
version = "2.0.1" version = "2.0.1"
@ -3169,7 +3125,6 @@ dependencies = [
"libc", "libc",
"mio", "mio",
"num_cpus", "num_cpus",
"parking_lot",
"pin-project-lite", "pin-project-lite",
"signal-hook-registry", "signal-hook-registry",
"socket2 0.5.5", "socket2 0.5.5",

View File

@ -148,7 +148,9 @@ libpulse-binding = { version = "2.28.1", optional = true }
# workspaces # workspaces
swayipc-async = { version = "2.0.1", optional = true } swayipc-async = { version = "2.0.1", optional = true }
hyprland = { version = "0.3.13", default_features = false, features = ["listener", "tokio", "silent"], optional = true } hyprland = { version = "0.4.0-alpha.1", features = ["silent"], optional = true }
futures-util = { version = "0.3.30", optional = true }
num-traits = "0.2.18"
# shared # shared
futures-lite = { version = "2.3.0", optional = true } # workspaces, upower futures-lite = { version = "2.3.0", optional = true } # workspaces, upower

View File

@ -186,6 +186,7 @@ impl Client {
fn get_workspace(name: &str, active: Option<&Workspace>) -> Option<Workspace> { fn get_workspace(name: &str, active: Option<&Workspace>) -> Option<Workspace> {
Workspaces::get() Workspaces::get()
.expect("Failed to get workspaces") .expect("Failed to get workspaces")
.into_iter()
.find_map(|w| { .find_map(|w| {
if w.name == name { if w.name == name {
let vis = Visibility::from((&w, active.map(|w| w.name.as_ref()), &|w| { let vis = Visibility::from((&w, active.map(|w| w.name.as_ref()), &|w| {
@ -228,6 +229,7 @@ impl WorkspaceClient for Client {
let workspaces = Workspaces::get() let workspaces = Workspaces::get()
.expect("Failed to get workspaces") .expect("Failed to get workspaces")
.into_iter()
.map(|w| { .map(|w| {
let vis = Visibility::from((&w, active_id.as_deref(), &is_visible)); let vis = Visibility::from((&w, active_id.as_deref(), &is_visible));