From b579c78cce82bcbc6a64d1a5e2f04e8a30d89224 Mon Sep 17 00:00:00 2001 From: Simone Camito Date: Tue, 31 Mar 2026 19:20:30 +0200 Subject: [PATCH 01/14] Fix PositionButton for reactive rendering Add hover state tracking and shell.request_redraw() to PositionButton, matching iced 0.14's reactive rendering protocol (PR #2662). Previously, hover status was computed live in draw() from cursor position. With reactive rendering, draw() is only called when a widget requests it. Without request_redraw(), the button never triggers a redraw on hover enter/leave. Now: update() tracks is_hovered state changes and calls request_redraw() when hover changes. draw() uses the tracked state instead of live cursor. --- Cargo.lock | 2998 ++++---------------------- Cargo.toml | 9 +- src/app.rs | 91 +- src/components/icons.rs | 2 +- src/config.rs | 29 +- src/main.rs | 54 +- src/menu.rs | 19 +- src/modules/clock.rs | 2 +- src/modules/custom_module.rs | 25 +- src/modules/keyboard_layout.rs | 2 +- src/modules/keyboard_submap.rs | 2 +- src/modules/media_player.rs | 11 +- src/modules/mod.rs | 22 +- src/modules/privacy.rs | 3 +- src/modules/settings/audio.rs | 22 +- src/modules/settings/bluetooth.rs | 35 +- src/modules/settings/brightness.rs | 2 +- src/modules/settings/mod.rs | 26 +- src/modules/settings/network.rs | 35 +- src/modules/settings/power.rs | 11 +- src/modules/system_info.rs | 11 +- src/modules/tempo.rs | 45 +- src/modules/tray.rs | 22 +- src/modules/updates.rs | 42 +- src/modules/window_title.rs | 2 +- src/modules/workspaces.rs | 37 +- src/outputs.rs | 124 +- src/password_dialog.rs | 16 +- src/services/audio.rs | 145 +- src/services/bluetooth/mod.rs | 19 +- src/services/brightness.rs | 11 +- src/services/compositor/mod.rs | 11 +- src/services/logind.rs | 11 +- src/services/mod.rs | 2 +- src/services/mpris/mod.rs | 21 +- src/services/network/dbus.rs | 2 +- src/services/network/iwd_dbus/mod.rs | 6 +- src/services/network/mod.rs | 15 +- src/services/privacy.rs | 11 +- src/services/throttle.rs | 2 +- src/services/tray/dbus.rs | 2 +- src/services/tray/mod.rs | 13 +- src/services/upower/mod.rs | 15 +- src/theme.rs | 91 +- src/utils/mod.rs | 41 + src/utils/remote_value.rs | 12 +- src/widgets/centerbox.rs | 91 +- src/widgets/menu_wrapper.rs | 80 +- src/widgets/position_button.rs | 145 +- 49 files changed, 1177 insertions(+), 3268 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0d8e29b3..3e368dfe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,102 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "ab_glyph" -version = "0.2.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01c0457472c38ea5bd1c3b5ada5e368271cb550be7a4ca4a0b4634e9913f6cc2" -dependencies = [ - "ab_glyph_rasterizer", - "owned_ttf_parser", -] - -[[package]] -name = "ab_glyph_rasterizer" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "366ffbaa4442f4684d91e2cd7c5ea7c4ed8add41959a31447066e279e432b618" - -[[package]] -name = "accesskit" -version = "0.16.0" -source = "git+https://github.com/wash2/accesskit?tag=iced-xdg-surface-0.13-rc#c46afc041b1968a5af0186fa6aba3ea9cf24c8c3" - -[[package]] -name = "accesskit_atspi_common" -version = "0.9.0" -source = "git+https://github.com/wash2/accesskit?tag=iced-xdg-surface-0.13-rc#c46afc041b1968a5af0186fa6aba3ea9cf24c8c3" -dependencies = [ - "accesskit", - "accesskit_consumer", - "atspi-common", - "serde", - "thiserror 1.0.69", - "zvariant 3.15.2", -] - -[[package]] -name = "accesskit_consumer" -version = "0.24.0" -source = "git+https://github.com/wash2/accesskit?tag=iced-xdg-surface-0.13-rc#c46afc041b1968a5af0186fa6aba3ea9cf24c8c3" -dependencies = [ - "accesskit", - "immutable-chunkmap", -] - -[[package]] -name = "accesskit_macos" -version = "0.17.0" -source = "git+https://github.com/wash2/accesskit?tag=iced-xdg-surface-0.13-rc#c46afc041b1968a5af0186fa6aba3ea9cf24c8c3" -dependencies = [ - "accesskit", - "accesskit_consumer", - "objc2", - "objc2-app-kit", - "objc2-foundation", - "once_cell", -] - -[[package]] -name = "accesskit_unix" -version = "0.12.0" -source = "git+https://github.com/wash2/accesskit?tag=iced-xdg-surface-0.13-rc#c46afc041b1968a5af0186fa6aba3ea9cf24c8c3" -dependencies = [ - "accesskit", - "accesskit_atspi_common", - "atspi", - "futures-lite 1.13.0", - "serde", - "tokio", - "tokio-stream", - "zbus 3.15.2", -] - -[[package]] -name = "accesskit_windows" -version = "0.22.0" -source = "git+https://github.com/wash2/accesskit?tag=iced-xdg-surface-0.13-rc#c46afc041b1968a5af0186fa6aba3ea9cf24c8c3" -dependencies = [ - "accesskit", - "accesskit_consumer", - "paste", - "static_assertions", - "windows 0.54.0", -] - -[[package]] -name = "accesskit_winit" -version = "0.22.0" -source = "git+https://github.com/wash2/accesskit?tag=iced-xdg-surface-0.13-rc#c46afc041b1968a5af0186fa6aba3ea9cf24c8c3" -dependencies = [ - "accesskit", - "accesskit_macos", - "accesskit_unix", - "accesskit_windows", - "raw-window-handle", - "winit", -] - [[package]] name = "adler2" version = "2.0.1" @@ -110,19 +14,6 @@ version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0453232ace82dee0dd0b4c87a59bd90f7b53b314f3e0f61fe2ee7c8a16482289" -[[package]] -name = "ahash" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" -dependencies = [ - "cfg-if", - "getrandom 0.3.4", - "once_cell", - "version_check", - "zerocopy", -] - [[package]] name = "aho-corasick" version = "1.1.4" @@ -138,24 +29,6 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd" -[[package]] -name = "aligned" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee4508988c62edf04abd8d92897fca0c2995d907ce1dfeaf369dac3716a40685" -dependencies = [ - "as-slice", -] - -[[package]] -name = "aligned-vec" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc890384c8602f339876ded803c97ad529f3842aba97f6392b3dba0dd171769b" -dependencies = [ - "equator", -] - [[package]] name = "alloc-no-stdlib" version = "2.0.4" @@ -200,33 +73,6 @@ dependencies = [ "unicode-joining-type", ] -[[package]] -name = "android-activity" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046" -dependencies = [ - "android-properties", - "bitflags 2.10.0", - "cc", - "cesu8", - "jni", - "jni-sys", - "libc", - "log", - "ndk", - "ndk-context", - "ndk-sys 0.6.0+11769913", - "num_enum", - "thiserror 1.0.69", -] - -[[package]] -name = "android-properties" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" - [[package]] name = "android_system_properties" version = "0.1.5" @@ -243,7 +89,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "710e8eae58854cdc1790fcb56cca04d712a17be849eeb81da2a724bf4bae2bc4" dependencies = [ "anstyle", - "unicode-width 0.2.2", + "unicode-width", ] [[package]] @@ -258,32 +104,6 @@ version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f0e0fee31ef5ed1ba1316088939cea399010ed7731dba877ed44aeb407a75ea" -[[package]] -name = "approx" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" -dependencies = [ - "num-traits", -] - -[[package]] -name = "arbitrary" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" - -[[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.114", -] - [[package]] name = "arrayref" version = "0.3.9" @@ -296,21 +116,6 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" -[[package]] -name = "as-raw-xcb-connection" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" - -[[package]] -name = "as-slice" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "516b6b4f0e40d50dcda9365d53964ec74560ad4284da2e7fc97122cd83174516" -dependencies = [ - "stable_deref_trait", -] - [[package]] name = "ash" version = "0.38.0+1.3.281" @@ -333,7 +138,7 @@ dependencies = [ "freedesktop-icons", "hex_color", "hyprland", - "iced", + "iced_layershell", "inotify", "itertools 0.14.0", "libc", @@ -359,17 +164,7 @@ dependencies = [ "url", "wayland-client", "wayland-protocols", - "zbus 5.13.2", -] - -[[package]] -name = "async-broadcast" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c48ccdbf6ca6b121e0f586cbc0e73ae440e56c67c30fa0873b4e110d9c26d2b" -dependencies = [ - "event-listener 2.5.3", - "futures-core", + "zbus", ] [[package]] @@ -378,99 +173,12 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532" dependencies = [ - "event-listener 5.4.1", + "event-listener", "event-listener-strategy", "futures-core", "pin-project-lite", ] -[[package]] -name = "async-channel" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2" -dependencies = [ - "concurrent-queue", - "event-listener-strategy", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-io" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" -dependencies = [ - "async-lock 2.8.0", - "autocfg", - "cfg-if", - "concurrent-queue", - "futures-lite 1.13.0", - "log", - "parking", - "polling 2.8.0", - "rustix 0.37.28", - "slab", - "socket2 0.4.10", - "waker-fn", -] - -[[package]] -name = "async-io" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc" -dependencies = [ - "autocfg", - "cfg-if", - "concurrent-queue", - "futures-io", - "futures-lite 2.6.1", - "parking", - "polling 3.11.0", - "rustix 1.1.3", - "slab", - "windows-sys 0.61.2", -] - -[[package]] -name = "async-lock" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" -dependencies = [ - "event-listener 2.5.3", -] - -[[package]] -name = "async-lock" -version = "3.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311" -dependencies = [ - "event-listener 5.4.1", - "event-listener-strategy", - "pin-project-lite", -] - -[[package]] -name = "async-process" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" -dependencies = [ - "async-io 1.13.0", - "async-lock 2.8.0", - "async-signal", - "blocking", - "cfg-if", - "event-listener 3.1.0", - "futures-lite 1.13.0", - "rustix 0.38.44", - "windows-sys 0.48.0", -] - [[package]] name = "async-recursion" version = "1.1.1" @@ -482,24 +190,6 @@ dependencies = [ "syn 2.0.114", ] -[[package]] -name = "async-signal" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43c070bbf59cd3570b6b2dd54cd772527c7c3620fce8be898406dd3ed6adc64c" -dependencies = [ - "async-io 2.6.0", - "async-lock 3.4.2", - "atomic-waker", - "cfg-if", - "futures-core", - "futures-io", - "rustix 1.1.3", - "signal-hook-registry", - "slab", - "windows-sys 0.61.2", -] - [[package]] name = "async-stream" version = "0.3.6" @@ -522,12 +212,6 @@ dependencies = [ "syn 2.0.114", ] -[[package]] -name = "async-task" -version = "4.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" - [[package]] name = "async-trait" version = "0.1.89" @@ -545,103 +229,12 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" -[[package]] -name = "atspi" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6059f350ab6f593ea00727b334265c4dfc7fd442ee32d264794bd9bdc68e87ca" -dependencies = [ - "atspi-common", - "atspi-connection", - "atspi-proxies", -] - -[[package]] -name = "atspi-common" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92af95f966d2431f962bc632c2e68eda7777330158bf640c4af4249349b2cdf5" -dependencies = [ - "enumflags2", - "serde", - "static_assertions", - "zbus 3.15.2", - "zbus_names 2.6.1", - "zvariant 3.15.2", -] - -[[package]] -name = "atspi-connection" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c65e7d70f86d4c0e3b2d585d9bf3f979f0b19d635a336725a88d279f76b939" -dependencies = [ - "atspi-common", - "atspi-proxies", - "futures-lite 1.13.0", - "zbus 3.15.2", -] - -[[package]] -name = "atspi-proxies" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6495661273703e7a229356dcbe8c8f38223d697aacfaf0e13590a9ac9977bb52" -dependencies = [ - "atspi-common", - "serde", - "zbus 3.15.2", -] - [[package]] name = "autocfg" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" -[[package]] -name = "av-scenechange" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f321d77c20e19b92c39e7471cf986812cbb46659d2af674adc4331ef3f18394" -dependencies = [ - "aligned", - "anyhow", - "arg_enum_proc_macro", - "arrayvec", - "log", - "num-rational", - "num-traits", - "pastey", - "rayon", - "thiserror 2.0.18", - "v_frame", - "y4m", -] - -[[package]] -name = "av1-grain" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cfddb07216410377231960af4fcab838eaa12e013417781b78bd95ee22077f8" -dependencies = [ - "anyhow", - "arrayvec", - "log", - "nom 8.0.0", - "num-rational", - "v_frame", -] - -[[package]] -name = "avif-serialize" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47c8fbc0f831f4519fe8b810b6a7a91410ec83031b8233f730a0480029f6a23f" -dependencies = [ - "arrayvec", -] - [[package]] name = "aws-lc-rs" version = "1.15.4" @@ -691,24 +284,18 @@ dependencies = [ [[package]] name = "bit-set" -version = "0.6.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0481a0e032742109b1133a095184ee93d88f3dc9e0d28a5d033dc77a073f44f" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" dependencies = [ "bit-vec", ] [[package]] name = "bit-vec" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2c54ff287cfc0a34f38a6b832ea1bd8e448a330b3e40a50859e6488bee07f22" - -[[package]] -name = "bit_field" -version = "0.10.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e4b40c7323adcfc0a41c4b88143ed58346ff65a288fc144329c5c45e05d70c6" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" [[package]] name = "bitflags" @@ -731,52 +318,12 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "bitstream-io" -version = "4.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60d4bd9d1db2c6bdf285e223a7fa369d5ce98ec767dec949c6ca62863ce61757" -dependencies = [ - "core2", -] - [[package]] name = "block" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "block2" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" -dependencies = [ - "objc2", -] - -[[package]] -name = "blocking" -version = "1.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e83f8d02be6967315521be875afa792a316e28d57b5a2d401897e2a7921b7f21" -dependencies = [ - "async-channel", - "async-task", - "futures-io", - "futures-lite 2.6.1", - "piper", -] - [[package]] name = "brotli-decompressor" version = "4.0.3" @@ -798,24 +345,12 @@ dependencies = [ "serde", ] -[[package]] -name = "built" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4ad8f11f288f48ca24471bbd51ac257aaeaaa07adae295591266b792902ae64" - [[package]] name = "bumpalo" version = "3.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" -[[package]] -name = "by_address" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64fa3c856b712db6612c019f14756e64e4bcea13337a6b33b696333a9eaa2d06" - [[package]] name = "bytemuck" version = "1.25.0" @@ -854,43 +389,17 @@ version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" -[[package]] -name = "calloop" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" -dependencies = [ - "bitflags 2.10.0", - "log", - "polling 3.11.0", - "rustix 0.38.44", - "slab", - "thiserror 1.0.69", -] - [[package]] name = "calloop" version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb9f6e1368bd4621d2c86baa7e37de77a938adf5221e5dd3d6133340101b309e" dependencies = [ - "bitflags 2.10.0", - "polling 3.11.0", - "rustix 1.1.3", - "slab", - "tracing", -] - -[[package]] -name = "calloop-wayland-source" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" -dependencies = [ - "calloop 0.13.0", - "rustix 0.38.44", - "wayland-backend", - "wayland-client", + "bitflags 2.10.0", + "polling", + "rustix", + "slab", + "tracing", ] [[package]] @@ -899,8 +408,8 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "138efcf0940a02ebf0cc8d1eff41a1682a46b431630f4c52450d6265876021fa" dependencies = [ - "calloop 0.14.3", - "rustix 1.1.3", + "calloop", + "rustix", "wayland-backend", "wayland-client", ] @@ -948,12 +457,6 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" -[[package]] -name = "cfg_aliases" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" - [[package]] name = "cfg_aliases" version = "0.2.1" @@ -979,7 +482,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6139a8597ed92cf816dfb33f5dd6cf0bb93a6adc938f11039f371bc5bcd26c3" dependencies = [ "chrono", - "phf 0.12.1", + "phf", ] [[package]] @@ -1031,44 +534,6 @@ version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3e64b0cc0439b12df2fa678eae89a1c56a529fd067a9115f7827f1fffd22b32" -[[package]] -name = "clipboard-win" -version = "5.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde03770d3df201d4fb868f2c9c59e66a3e4e2bd06692a0fe701e7103c7e84d4" -dependencies = [ - "error-code", -] - -[[package]] -name = "clipboard_macos" -version = "0.1.0" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-0.13-2#6b9faab87bea9cebec6ae036906fd67fed254f5f" -dependencies = [ - "objc", - "objc-foundation", - "objc_id", -] - -[[package]] -name = "clipboard_wayland" -version = "0.2.2" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-0.13-2#6b9faab87bea9cebec6ae036906fd67fed254f5f" -dependencies = [ - "dnd", - "mime", - "smithay-clipboard", -] - -[[package]] -name = "clipboard_x11" -version = "0.4.2" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-0.13-2#6b9faab87bea9cebec6ae036906fd67fed254f5f" -dependencies = [ - "thiserror 1.0.69", - "x11rb", -] - [[package]] name = "cmake" version = "0.1.54" @@ -1078,44 +543,15 @@ dependencies = [ "cc", ] -[[package]] -name = "cocoa" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6140449f97a6e97f9511815c5632d84c8aacf8ac271ad77c559218161a1373c" -dependencies = [ - "bitflags 1.3.2", - "block", - "cocoa-foundation", - "core-foundation 0.9.4", - "core-graphics", - "foreign-types", - "libc", - "objc", -] - -[[package]] -name = "cocoa-foundation" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c6234cbb2e4c785b456c0644748b1ac416dd045799740356f8363dfe00c93f7" -dependencies = [ - "bitflags 1.3.2", - "block", - "core-foundation 0.9.4", - "core-graphics-types", - "libc", - "objc", -] - [[package]] name = "codespan-reporting" -version = "0.11.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +checksum = "fe6d2e5af09e8c8ad56c969f2157a3d4238cebc7c55f0a517728c38f7b200f81" dependencies = [ + "serde", "termcolor", - "unicode-width 0.1.14", + "unicode-width", ] [[package]] @@ -1124,37 +560,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" -[[package]] -name = "com" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e17887fd17353b65b1b2ef1c526c83e26cd72e74f598a8dc1bee13a48f3d9f6" -dependencies = [ - "com_macros", -] - -[[package]] -name = "com_macros" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d375883580a668c7481ea6631fc1a8863e33cc335bf56bfad8d7e6d4b04b13a5" -dependencies = [ - "com_macros_support", - "proc-macro2", - "syn 1.0.109", -] - -[[package]] -name = "com_macros_support" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad899a1087a9296d5644792d7cb72b8e34c1bec8e7d4fbc002230169a6e8710c" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "combine" version = "4.6.7" @@ -1198,16 +603,6 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9885fa71e26b8ab7855e2ec7cae6e9b380edff76cd052e07c683a0319d51b3a2" -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "core-foundation" version = "0.10.1" @@ -1224,39 +619,17 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" -[[package]] -name = "core-graphics" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" -dependencies = [ - "bitflags 1.3.2", - "core-foundation 0.9.4", - "core-graphics-types", - "foreign-types", - "libc", -] - [[package]] name = "core-graphics-types" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" +checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" dependencies = [ - "bitflags 1.3.2", - "core-foundation 0.9.4", + "bitflags 2.10.0", + "core-foundation", "libc", ] -[[package]] -name = "core2" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" -dependencies = [ - "memchr", -] - [[package]] name = "core_maths" version = "0.1.1" @@ -1266,48 +639,22 @@ dependencies = [ "libm", ] -[[package]] -name = "cosmic-client-toolkit" -version = "0.2.0" -source = "git+https://github.com/MalpenZibo/cosmic-protocols?branch=develop#e0b42393458a8b8ffdabd385c080ec189066ab8a" -dependencies = [ - "bitflags 2.10.0", - "cosmic-protocols", - "libc", - "smithay-client-toolkit 0.20.0", - "wayland-client", - "wayland-protocols", -] - -[[package]] -name = "cosmic-protocols" -version = "0.2.0" -source = "git+https://github.com/MalpenZibo/cosmic-protocols?branch=develop#e0b42393458a8b8ffdabd385c080ec189066ab8a" -dependencies = [ - "bitflags 2.10.0", - "wayland-backend", - "wayland-client", - "wayland-protocols", - "wayland-protocols-wlr", - "wayland-scanner", - "wayland-server", -] - [[package]] name = "cosmic-text" -version = "0.18.2" -source = "git+https://github.com/pop-os/cosmic-text.git#d5a972a2b63649fad11ea3a7e80f7dc4c592f01a" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "173852283a9a57a3cbe365d86e74dc428a09c50421477d5ad6fe9d9509e37737" dependencies = [ "bitflags 2.10.0", - "fontdb 0.23.0", + "fontdb", "harfrust", "linebender_resource_handle", "log", "rangemap", - "rustc-hash 2.1.1", + "rustc-hash 1.1.0", "self_cell", - "skrifa 0.40.0", - "smol_str 0.3.5", + "skrifa", + "smol_str", "swash", "sys-locale", "unicode-bidi", @@ -1316,15 +663,6 @@ dependencies = [ "unicode-segmentation", ] -[[package]] -name = "cpufeatures" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" -dependencies = [ - "libc", -] - [[package]] name = "crc32fast" version = "1.5.0" @@ -1334,25 +672,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crossbeam-deque" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - [[package]] name = "crossbeam-utils" version = "0.8.21" @@ -1366,38 +685,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] -name = "crypto-common" -version = "0.1.7" +name = "cryoglyph" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +checksum = "08bc795bdbccdbd461736fb163930a009da6597b226d6f6fce33e7a8eb6ec519" dependencies = [ - "generic-array", - "typenum", + "cosmic-text", + "etagere", + "lru", + "rustc-hash 2.1.1", + "wgpu", ] -[[package]] -name = "ctor-lite" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b29fccfdaeb0f9bd90da5759b1d0eaa2f6cfcfe90960124cfc83141ed4e111fd" - [[package]] name = "cursor-icon" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f27ae1dd37df86211c42e150270f82743308803d90a6f6e6651cd730d5e1732f" -[[package]] -name = "d3d12" -version = "22.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdbd1f579714e3c809ebd822c81ef148b1ceaeb3d535352afc73fd0c4c6a0017" -dependencies = [ - "bitflags 2.10.0", - "libloading", - "winapi", -] - [[package]] name = "darling" version = "0.21.3" @@ -1439,17 +744,6 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be1e0bca6c3637f992fc1cc7cbc52a78c1ef6db076dbf1059c4323d6a2048376" -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "derive_more" version = "2.1.1" @@ -1473,16 +767,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", -] - [[package]] name = "dirs" version = "5.0.1" @@ -1526,10 +810,14 @@ dependencies = [ ] [[package]] -name = "dispatch" -version = "0.2.0" +name = "dispatch2" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" +checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" +dependencies = [ + "bitflags 2.10.0", + "objc2", +] [[package]] name = "displaydoc" @@ -1560,18 +848,6 @@ dependencies = [ "rand 0.8.5", ] -[[package]] -name = "dnd" -version = "0.1.0" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-0.13-2#6b9faab87bea9cebec6ae036906fd67fed254f5f" -dependencies = [ - "bitflags 2.10.0", - "mime", - "raw-window-handle", - "smithay-client-toolkit 0.19.2", - "smithay-clipboard", -] - [[package]] name = "document-features" version = "0.2.12" @@ -1587,50 +863,6 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" -[[package]] -name = "dpi" -version = "0.1.1" -source = "git+https://github.com/pop-os/winit.git?tag=iced-xdg-surface-0.13-rc#dd46a1499bcc38f2134ab869e8860a32e091c55b" - -[[package]] -name = "drm" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0f8a69e60d75ae7dab4ef26a59ca99f2a89d4c142089b537775ae0c198bdcde" -dependencies = [ - "bitflags 2.10.0", - "bytemuck", - "drm-ffi", - "drm-fourcc", - "rustix 0.38.44", -] - -[[package]] -name = "drm-ffi" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41334f8405792483e32ad05fbb9c5680ff4e84491883d2947a4757dc54cb2ac6" -dependencies = [ - "drm-sys", - "rustix 0.38.44", -] - -[[package]] -name = "drm-fourcc" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aafbcdb8afc29c1a7ee5fbe53b5d62f4565b35a042a662ca9fecd0b54dae6f4" - -[[package]] -name = "drm-sys" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d09ff881f92f118b11105ba5e34ff8f4adf27b30dae8f12e28c193af1c83176" -dependencies = [ - "libc", - "linux-raw-sys 0.6.5", -] - [[package]] name = "dunce" version = "1.0.5" @@ -1679,26 +911,6 @@ dependencies = [ "syn 2.0.114", ] -[[package]] -name = "equator" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4711b213838dfee0117e3be6ac926007d7f433d7bbe33595975d4190cb07e6fc" -dependencies = [ - "equator-macro", -] - -[[package]] -name = "equator-macro" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44f23cf4b44bfce11a86ace86f8a73ffdec849c9fd00a386a53d278bd9e81fb3" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - [[package]] name = "equivalent" version = "1.0.2" @@ -1715,12 +927,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "error-code" -version = "3.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dea2df4cf52843e0452895c455a1a2cfbb842a1e7329671acf418fdc53ed4c59" - [[package]] name = "etagere" version = "0.2.15" @@ -1733,28 +939,11 @@ dependencies = [ [[package]] name = "euclid" -version = "0.22.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df61bf483e837f88d5c2291dcf55c67be7e676b3a51acc48db3a7b163b91ed63" -dependencies = [ - "num-traits", -] - -[[package]] -name = "event-listener" -version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" - -[[package]] -name = "event-listener" -version = "3.1.0" +version = "0.22.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" +checksum = "df61bf483e837f88d5c2291dcf55c67be7e676b3a51acc48db3a7b163b91ed63" dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", + "num-traits", ] [[package]] @@ -1774,66 +963,16 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" dependencies = [ - "event-listener 5.4.1", + "event-listener", "pin-project-lite", ] -[[package]] -name = "exr" -version = "1.74.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4300e043a56aa2cb633c01af81ca8f699a321879a7854d3896a0ba89056363be" -dependencies = [ - "bit_field", - "half", - "lebe", - "miniz_oxide", - "rayon-core", - "smallvec", - "zune-inflate", -] - -[[package]] -name = "fast-srgb8" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd2e7510819d6fbf51a5545c8f922716ecfb14df168a3242f7d33e0239efe6a1" - -[[package]] -name = "fastrand" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - [[package]] name = "fastrand" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" -[[package]] -name = "fax" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f05de7d48f37cd6730705cbca900770cab77a89f413d23e100ad7fad7795a0ab" -dependencies = [ - "fax_derive", -] - -[[package]] -name = "fax_derive" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0aca10fb742cb43f9e7bb8467c91aa9bcb8e3ffbc6a6f7389bb93ffc920577d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - [[package]] name = "fdeflate" version = "0.3.7" @@ -1898,19 +1037,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" [[package]] -name = "font-types" -version = "0.10.1" +name = "foldhash" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39a654f404bbcbd48ea58c617c2993ee91d1cb63727a37bf2323a4edeed1b8c5" -dependencies = [ - "bytemuck", -] +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" [[package]] name = "font-types" -version = "0.11.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1e4d2d0cf79d38430cc9dc9aadec84774bff2e1ba30ae2bf6c16cfce9385a23" +checksum = "39a654f404bbcbd48ea58c617c2993ee91d1cb63727a37bf2323a4edeed1b8c5" dependencies = [ "bytemuck", ] @@ -1924,20 +1060,6 @@ dependencies = [ "roxmltree", ] -[[package]] -name = "fontdb" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e32eac81c1135c1df01d4e6d4233c47ba11f6a6d07f33e0bba09d18797077770" -dependencies = [ - "fontconfig-parser", - "log", - "memmap2 0.9.9", - "slotmap", - "tinyvec", - "ttf-parser 0.21.1", -] - [[package]] name = "fontdb" version = "0.23.0" @@ -1946,10 +1068,10 @@ checksum = "457e789b3d1202543297a350643cf459f836cade38934e7a4cf6a39e7cde2905" dependencies = [ "fontconfig-parser", "log", - "memmap2 0.9.9", + "memmap2", "slotmap", "tinyvec", - "ttf-parser 0.25.1", + "ttf-parser", ] [[package]] @@ -2058,7 +1180,6 @@ dependencies = [ "futures-core", "futures-task", "futures-util", - "num_cpus", ] [[package]] @@ -2067,28 +1188,13 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" -[[package]] -name = "futures-lite" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" -dependencies = [ - "fastrand 1.9.0", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite", - "waker-fn", -] - [[package]] name = "futures-lite" version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" dependencies = [ - "fastrand 2.3.0", + "fastrand", "futures-core", "futures-io", "parking", @@ -2136,26 +1242,6 @@ dependencies = [ "slab", ] -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "gethostname" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8" -dependencies = [ - "rustix 1.1.3", - "windows-link 0.2.1", -] - [[package]] name = "getrandom" version = "0.2.17" @@ -2193,16 +1279,6 @@ dependencies = [ "weezl", ] -[[package]] -name = "gif" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5df2ba84018d80c213569363bdcd0c64e6933c67fe4c1d60ecf822971a3c35e" -dependencies = [ - "color_quant", - "weezl", -] - [[package]] name = "gl_generator" version = "0.14.0" @@ -2228,9 +1304,9 @@ checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" [[package]] name = "glow" -version = "0.13.1" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd348e04c43b32574f2de31c8bb397d96c9fcfa1371bd4ca6d8bdc464ab121b1" +checksum = "c5e5ea60d70410161c8bf5da3fdfeaa1c72ed2c15f8bbb9d19fe3a4fad085f08" dependencies = [ "js-sys", "slotmap", @@ -2274,15 +1350,14 @@ dependencies = [ [[package]] name = "gpu-allocator" -version = "0.26.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdd4240fc91d3433d5e5b0fc5b67672d771850dc19bbee03c1381e19322803d7" +checksum = "c151a2a5ef800297b4e79efa4f4bec035c5f51d5ae587287c9b952bdf734cacd" dependencies = [ "log", "presser", "thiserror 1.0.69", - "winapi", - "windows 0.52.0", + "windows 0.54.0", ] [[package]] @@ -2323,19 +1398,20 @@ checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" dependencies = [ "cfg-if", "crunchy", + "num-traits", "zerocopy", ] [[package]] name = "harfrust" -version = "0.5.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f9f40651a03bc0f7316bd75267ff5767e93017ef3cfffe76c6aa7252cc5a31c" +checksum = "92c020db12c71d8a12a3fe7607873cade3a01a6287e29d540c8723276221b9d8" dependencies = [ "bitflags 2.10.0", "bytemuck", "core_maths", - "read-fonts 0.37.0", + "read-fonts", "smallvec", ] @@ -2345,7 +1421,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" dependencies = [ - "ahash 0.4.8", + "ahash", ] [[package]] @@ -2354,7 +1430,7 @@ version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ - "foldhash", + "foldhash 0.1.5", ] [[package]] @@ -2362,20 +1438,8 @@ name = "hashbrown" version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" - -[[package]] -name = "hassle-rs" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af2a7e73e1f34c48da31fb668a907f250794837e08faa144fd24f0b8b741e890" dependencies = [ - "bitflags 2.10.0", - "com", - "libc", - "libloading", - "thiserror 1.0.69", - "widestring", - "winapi", + "foldhash 0.2.0", ] [[package]] @@ -2518,7 +1582,7 @@ dependencies = [ "libc", "percent-encoding", "pin-project-lite", - "socket2 0.6.2", + "socket2", "tokio", "tower-service", "tracing", @@ -2533,7 +1597,7 @@ dependencies = [ "async-stream", "derive_more", "either", - "futures-lite 2.6.1", + "futures-lite", "hyprland-macros", "pastey", "serde", @@ -2577,86 +1641,55 @@ dependencies = [ "cc", ] -[[package]] -name = "iced" -version = "0.14.0-dev" -source = "git+https://github.com/MalpenZibo/iced?rev=ba37674a834b0c9fe67a09a96b80a3a3d0dd75ef#ba37674a834b0c9fe67a09a96b80a3a3d0dd75ef" -dependencies = [ - "dnd", - "iced_accessibility", - "iced_core", - "iced_futures", - "iced_renderer", - "iced_widget", - "iced_winit", - "image", - "mime", - "thiserror 1.0.69", - "window_clipboard", -] - -[[package]] -name = "iced_accessibility" -version = "0.1.0" -source = "git+https://github.com/MalpenZibo/iced?rev=ba37674a834b0c9fe67a09a96b80a3a3d0dd75ef#ba37674a834b0c9fe67a09a96b80a3a3d0dd75ef" -dependencies = [ - "accesskit", - "accesskit_winit", -] - [[package]] name = "iced_core" -version = "0.14.0-dev" -source = "git+https://github.com/MalpenZibo/iced?rev=ba37674a834b0c9fe67a09a96b80a3a3d0dd75ef#ba37674a834b0c9fe67a09a96b80a3a3d0dd75ef" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ab1937d699403e7e69252ae743a902bcee9f4ab2052cc4c9a46fcf34729d85" dependencies = [ "bitflags 2.10.0", "bytes", - "cosmic-client-toolkit", - "dnd", "glam", + "lilt", "log", - "mime", "num-traits", - "once_cell", - "palette", - "raw-window-handle", "rustc-hash 2.1.1", - "smol_str 0.2.2", - "thiserror 1.0.69", + "smol_str", + "thiserror 2.0.18", "web-time", - "window_clipboard", ] [[package]] -name = "iced_futures" -version = "0.14.0-dev" -source = "git+https://github.com/MalpenZibo/iced?rev=ba37674a834b0c9fe67a09a96b80a3a3d0dd75ef#ba37674a834b0c9fe67a09a96b80a3a3d0dd75ef" +name = "iced_debug" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25035ab0215a620e53f4103e36fc4e59a1fb2817e4bfc38a30ad27b4202ea0be" dependencies = [ - "futures", "iced_core", + "iced_futures", "log", - "rustc-hash 2.1.1", - "tokio", - "wasm-bindgen-futures", - "wasm-timer", ] [[package]] -name = "iced_glyphon" -version = "0.6.0" -source = "git+https://github.com/pop-os/glyphon.git?tag=iced-0.14-dev#6ef9d12a20cfd0f7bdf38136a26ded9f7459ec8b" +name = "iced_futures" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c0c85ccad42dfbec7293c36c018af0ea0dbcc52d137a4a9a0b0f6822a3fdf0a" dependencies = [ - "cosmic-text", - "etagere", - "lru", + "futures", + "iced_core", + "log", "rustc-hash 2.1.1", - "wgpu", + "tokio", + "wasm-bindgen-futures", + "wasmtimer", ] [[package]] name = "iced_graphics" -version = "0.14.0-dev" -source = "git+https://github.com/MalpenZibo/iced?rev=ba37674a834b0c9fe67a09a96b80a3a3d0dd75ef#ba37674a834b0c9fe67a09a96b80a3a3d0dd75ef" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "234ca1c2cec4155055f68fa5fad1b5242c496ac8238d80a259bca382fb44a102" dependencies = [ "bitflags 2.10.0", "bytemuck", @@ -2668,47 +1701,70 @@ dependencies = [ "kamadak-exif", "log", "lyon_path", - "once_cell", "raw-window-handle", "rustc-hash 2.1.1", - "thiserror 1.0.69", + "thiserror 2.0.18", "unicode-segmentation", ] +[[package]] +name = "iced_layershell" +version = "0.1.0" +dependencies = [ + "calloop", + "calloop-wayland-source", + "futures", + "iced_core", + "iced_futures", + "iced_graphics", + "iced_renderer", + "iced_runtime", + "iced_widget", + "log", + "raw-window-handle", + "smithay-client-toolkit", + "smithay-clipboard", + "thiserror 2.0.18", + "wayland-backend", + "wayland-client", + "wayland-protocols", +] + [[package]] name = "iced_renderer" -version = "0.14.0-dev" -source = "git+https://github.com/MalpenZibo/iced?rev=ba37674a834b0c9fe67a09a96b80a3a3d0dd75ef#ba37674a834b0c9fe67a09a96b80a3a3d0dd75ef" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "250cc0802408e8c077986ec56c7d07c65f423ee658a4b9fd795a1f2aae5dac05" dependencies = [ "iced_graphics", "iced_tiny_skia", "iced_wgpu", "log", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "iced_runtime" -version = "0.14.0-dev" -source = "git+https://github.com/MalpenZibo/iced?rev=ba37674a834b0c9fe67a09a96b80a3a3d0dd75ef#ba37674a834b0c9fe67a09a96b80a3a3d0dd75ef" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1889b819ce4c06674183242e336c8d49465665441396914dc07cc86f44fa8d4" dependencies = [ "bytes", - "cosmic-client-toolkit", - "dnd", "iced_core", "iced_futures", "raw-window-handle", - "thiserror 1.0.69", - "window_clipboard", + "thiserror 2.0.18", ] [[package]] name = "iced_tiny_skia" -version = "0.14.0-dev" -source = "git+https://github.com/MalpenZibo/iced?rev=ba37674a834b0c9fe67a09a96b80a3a3d0dd75ef#ba37674a834b0c9fe67a09a96b80a3a3d0dd75ef" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe0acf8b75a3bc914aff5f2329fdffc1b36eeaea29dda0e4bd232f1c62e9cc3d" dependencies = [ "bytemuck", "cosmic-text", + "iced_debug", "iced_graphics", "kurbo 0.10.4", "log", @@ -2720,80 +1776,38 @@ dependencies = [ [[package]] name = "iced_wgpu" -version = "0.14.0-dev" -source = "git+https://github.com/MalpenZibo/iced?rev=ba37674a834b0c9fe67a09a96b80a3a3d0dd75ef#ba37674a834b0c9fe67a09a96b80a3a3d0dd75ef" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff144a999b0ca0f8a10257934500060240825c42e950ec0ebee9c8ae30561c13" dependencies = [ - "as-raw-xcb-connection", "bitflags 2.10.0", "bytemuck", - "cosmic-client-toolkit", + "cryoglyph", "futures", "glam", "guillotiere", - "iced_glyphon", + "iced_debug", "iced_graphics", "log", "lyon", - "once_cell", - "raw-window-handle", "resvg", "rustc-hash 2.1.1", - "rustix 0.38.44", - "thiserror 1.0.69", - "tiny-xlib", - "wayland-backend", - "wayland-client", - "wayland-protocols", - "wayland-sys", + "thiserror 2.0.18", "wgpu", - "x11rb", ] [[package]] name = "iced_widget" -version = "0.14.0-dev" -source = "git+https://github.com/MalpenZibo/iced?rev=ba37674a834b0c9fe67a09a96b80a3a3d0dd75ef#ba37674a834b0c9fe67a09a96b80a3a3d0dd75ef" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1596afa0d3109c2618e8bc12bae6c11d3064df8f95c42dfce570397dbe957ab" dependencies = [ - "cosmic-client-toolkit", - "dnd", "iced_renderer", - "iced_runtime", "log", "num-traits", - "once_cell", "rustc-hash 2.1.1", - "thiserror 1.0.69", + "thiserror 2.0.18", "unicode-segmentation", - "window_clipboard", -] - -[[package]] -name = "iced_winit" -version = "0.14.0-dev" -source = "git+https://github.com/MalpenZibo/iced?rev=ba37674a834b0c9fe67a09a96b80a3a3d0dd75ef#ba37674a834b0c9fe67a09a96b80a3a3d0dd75ef" -dependencies = [ - "cosmic-client-toolkit", - "dnd", - "iced_futures", - "iced_graphics", - "iced_runtime", - "log", - "raw-window-handle", - "rustc-hash 2.1.1", - "rustix 0.38.44", - "thiserror 1.0.69", - "tracing", - "wasm-bindgen-futures", - "wayland-backend", - "wayland-client", - "wayland-protocols", - "web-sys", - "winapi", - "window_clipboard", - "winit", - "xkbcommon 0.7.0", - "xkbcommon-dl", - "xkeysym", ] [[package]] @@ -2912,20 +1926,8 @@ checksum = "e6506c6c10786659413faa717ceebcb8f70731c0a60cbae39795fdf114519c1a" dependencies = [ "bytemuck", "byteorder-lite", - "color_quant", - "exr", - "gif 0.14.1", - "image-webp", "moxcms", "num-traits", - "png 0.18.0", - "qoi", - "ravif", - "rayon", - "rgb", - "tiff", - "zune-core 0.5.1", - "zune-jpeg 0.5.12", ] [[package]] @@ -2940,24 +1942,9 @@ dependencies = [ [[package]] name = "imagesize" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029d73f573d8e8d63e6d5020011d3255b28c3ba85d6cf870a07184ed23de9284" - -[[package]] -name = "imgref" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7c5cedc30da3a610cac6b4ba17597bdf7152cf974e8aab3afb3d54455e371c8" - -[[package]] -name = "immutable-chunkmap" -version = "2.1.2" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3e98b1520e49e252237edc238a39869da9f3241f2ec19dc788c1d24694d1e4" -dependencies = [ - "arrayvec", -] +checksum = "edcd27d72f2f071c64249075f42e205ff93c9a4c5f6c6da53e79ed9f9832c285" [[package]] name = "indexmap" @@ -3000,26 +1987,6 @@ dependencies = [ "libc", ] -[[package]] -name = "instant" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" -dependencies = [ - "cfg-if", -] - -[[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.114", -] - [[package]] name = "io-lifetimes" version = "1.0.11" @@ -3108,15 +2075,9 @@ version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" dependencies = [ - "getrandom 0.3.4", - "libc", -] - -[[package]] -name = "jpeg-decoder" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00810f1d8b74be64b13dbf3db89ac67740615d6c891f0e7b6179326533011a07" + "getrandom 0.3.4", + "libc", +] [[package]] name = "js-sys" @@ -3130,9 +2091,9 @@ dependencies = [ [[package]] name = "kamadak-exif" -version = "0.5.5" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef4fc70d0ab7e5b6bafa30216a6b48705ea964cdfc29c050f2412295eba58077" +checksum = "1130d80c7374efad55a117d715a3af9368f0fa7a2c54573afc15a188cd984837" dependencies = [ "mutate_once", ] @@ -3181,28 +2142,12 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" -[[package]] -name = "lebe" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a79a3332a6609480d7d0c9eab957bca6b455b91bb84e66d19f5ff66294b85b8" - [[package]] name = "libc" version = "0.2.182" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6800badb6cb2082ffd7b6a67e6125bb39f18782f793520caee8cb8846be06112" -[[package]] -name = "libfuzzer-sys" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5037190e1f70cbeef565bd267599242926f724d3b8a9f510fd7e0b540cfa4404" -dependencies = [ - "arbitrary", - "cc", -] - [[package]] name = "libloading" version = "0.8.9" @@ -3254,7 +2199,6 @@ checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616" dependencies = [ "bitflags 2.10.0", "libc", - "redox_syscall 0.7.0", ] [[package]] @@ -3269,7 +2213,7 @@ dependencies = [ "cookie-factory", "libc", "libspa-sys", - "nix 0.30.1", + "nix", "nom 8.0.0", "system-deps", ] @@ -3306,6 +2250,15 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "lilt" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f67562e5eff6b20553fa9be1c503356768420994e28f67e3eafe6f41910e57ad" +dependencies = [ + "web-time", +] + [[package]] name = "linebender_resource_handle" version = "0.1.1" @@ -3322,24 +2275,6 @@ dependencies = [ "rust-ini", ] -[[package]] -name = "linux-raw-sys" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - -[[package]] -name = "linux-raw-sys" -version = "0.4.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" - -[[package]] -name = "linux-raw-sys" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a385b1be4e5c3e362ad2ffa73c392e53f031eaa5b7d648e64cd87f27f6063d7" - [[package]] name = "linux-raw-sys" version = "0.11.0" @@ -3373,20 +2308,11 @@ version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" -[[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.5" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" +checksum = "a1dc47f592c06f33f8e3aea9591776ec7c9f9e4124778ff8a3c3b87159f7e593" [[package]] name = "lru-slab" @@ -3455,31 +2381,12 @@ 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.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" -[[package]] -name = "memmap2" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a5a03cefb0d953ec0be133036f14e109412fa594edc2f77227249db66cc3ed" -dependencies = [ - "libc", -] - [[package]] name = "memmap2" version = "0.9.9" @@ -3489,15 +2396,6 @@ dependencies = [ "libc", ] -[[package]] -name = "memoffset" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" -dependencies = [ - "autocfg", -] - [[package]] name = "memoffset" version = "0.9.1" @@ -3509,9 +2407,9 @@ dependencies = [ [[package]] name = "metal" -version = "0.29.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ecfd3296f8c56b7c1f6fbac3c71cefa9d78ce009850c45000015f206dc7fa21" +checksum = "00c15a6f673ff72ddcc22394663290f870fb224c1bfce55734a75c414150e605" dependencies = [ "bitflags 2.10.0", "block", @@ -3522,14 +2420,6 @@ dependencies = [ "paste", ] -[[package]] -name = "mime" -version = "0.1.0" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-0.13-2#6b9faab87bea9cebec6ae036906fd67fed254f5f" -dependencies = [ - "smithay-clipboard", -] - [[package]] name = "minimal-lexical" version = "0.2.1" @@ -3575,23 +2465,28 @@ checksum = "13d2233c9842d08cfe13f9eac96e207ca6a2ea10b80259ebe8ad0268be27d2af" [[package]] name = "naga" -version = "22.1.0" +version = "27.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bd5a652b6faf21496f2cfd88fc49989c8db0825d1f6746b1a71a6ede24a63ad" +checksum = "066cf25f0e8b11ee0df221219010f213ad429855f57c494f995590c861a9a7d8" dependencies = [ "arrayvec", "bit-set", "bitflags 2.10.0", - "cfg_aliases 0.1.1", + "cfg-if", + "cfg_aliases", "codespan-reporting", + "half", + "hashbrown 0.16.1", "hexf-parse", "indexmap", + "libm", "log", + "num-traits", + "once_cell", "rustc-hash 1.1.0", "spirv", - "termcolor", - "thiserror 1.0.69", - "unicode-xid", + "thiserror 2.0.18", + "unicode-ident", ] [[package]] @@ -3603,27 +2498,12 @@ dependencies = [ "bitflags 2.10.0", "jni-sys", "log", - "ndk-sys 0.6.0+11769913", + "ndk-sys", "num_enum", "raw-window-handle", "thiserror 1.0.69", ] -[[package]] -name = "ndk-context" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" - -[[package]] -name = "ndk-sys" -version = "0.5.0+25.2.9519653" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691" -dependencies = [ - "jni-sys", -] - [[package]] name = "ndk-sys" version = "0.6.0+11769913" @@ -3633,12 +2513,6 @@ 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 = "niri-ipc" version = "25.11.0" @@ -3649,18 +2523,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "nix" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" -dependencies = [ - "bitflags 1.3.2", - "cfg-if", - "libc", - "memoffset 0.7.1", -] - [[package]] name = "nix" version = "0.30.1" @@ -3669,7 +2531,7 @@ checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" dependencies = [ "bitflags 2.10.0", "cfg-if", - "cfg_aliases 0.2.1", + "cfg_aliases", "libc", ] @@ -3692,12 +2554,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "noop_proc_macro" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8" - [[package]] name = "ntapi" version = "0.4.2" @@ -3716,16 +2572,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "num-bigint" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" -dependencies = [ - "num-integer", - "num-traits", -] - [[package]] name = "num-derive" version = "0.4.2" @@ -3737,26 +2583,6 @@ dependencies = [ "syn 2.0.114", ] -[[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.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" -dependencies = [ - "num-bigint", - "num-integer", - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.19" @@ -3767,16 +2593,6 @@ dependencies = [ "libm", ] -[[package]] -name = "num_cpus" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" -dependencies = [ - "hermit-abi 0.5.2", - "libc", -] - [[package]] name = "num_enum" version = "0.7.5" @@ -3793,7 +2609,7 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff32365de1b6743cb203b710788263c44a03de03802daf96092f2da4fe6ba4d7" dependencies = [ - "proc-macro-crate 3.4.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.114", @@ -3808,85 +2624,15 @@ dependencies = [ "malloc_buf", ] -[[package]] -name = "objc-foundation" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" -dependencies = [ - "block", - "objc", - "objc_id", -] - -[[package]] -name = "objc-sys" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" - [[package]] name = "objc2" -version = "0.5.2" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" +checksum = "3a12a8ed07aefc768292f076dc3ac8c48f3781c8f2d5851dd3d98950e8c5a89f" dependencies = [ - "objc-sys", "objc2-encode", ] -[[package]] -name = "objc2-app-kit" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" -dependencies = [ - "bitflags 2.10.0", - "block2", - "libc", - "objc2", - "objc2-core-data", - "objc2-core-image", - "objc2-foundation", - "objc2-quartz-core", -] - -[[package]] -name = "objc2-cloud-kit" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" -dependencies = [ - "bitflags 2.10.0", - "block2", - "objc2", - "objc2-core-location", - "objc2-foundation", -] - -[[package]] -name = "objc2-contacts" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" -dependencies = [ - "block2", - "objc2", - "objc2-foundation", -] - -[[package]] -name = "objc2-core-data" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" -dependencies = [ - "bitflags 2.10.0", - "block2", - "objc2", - "objc2-foundation", -] - [[package]] name = "objc2-core-foundation" version = "0.3.2" @@ -3894,160 +2640,71 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" dependencies = [ "bitflags 2.10.0", -] - -[[package]] -name = "objc2-core-image" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" -dependencies = [ - "block2", - "objc2", - "objc2-foundation", - "objc2-metal", -] - -[[package]] -name = "objc2-core-location" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" -dependencies = [ - "block2", - "objc2", - "objc2-contacts", - "objc2-foundation", -] - -[[package]] -name = "objc2-encode" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" - -[[package]] -name = "objc2-foundation" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" -dependencies = [ - "bitflags 2.10.0", - "block2", - "dispatch", - "libc", + "dispatch2", "objc2", ] [[package]] -name = "objc2-io-kit" +name = "objc2-core-graphics" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33fafba39597d6dc1fb709123dfa8289d39406734be322956a69f0931c73bb15" -dependencies = [ - "libc", - "objc2-core-foundation", -] - -[[package]] -name = "objc2-link-presentation" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" -dependencies = [ - "block2", - "objc2", - "objc2-app-kit", - "objc2-foundation", -] - -[[package]] -name = "objc2-metal" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" -dependencies = [ - "bitflags 2.10.0", - "block2", - "objc2", - "objc2-foundation", -] - -[[package]] -name = "objc2-quartz-core" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" +checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" dependencies = [ "bitflags 2.10.0", - "block2", + "dispatch2", "objc2", - "objc2-foundation", - "objc2-metal", + "objc2-core-foundation", + "objc2-io-surface", ] [[package]] -name = "objc2-symbols" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" -dependencies = [ - "objc2", - "objc2-foundation", -] +name = "objc2-encode" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" [[package]] -name = "objc2-ui-kit" -version = "0.2.2" +name = "objc2-foundation" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" +checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" dependencies = [ "bitflags 2.10.0", - "block2", "objc2", - "objc2-cloud-kit", - "objc2-core-data", - "objc2-core-image", - "objc2-core-location", - "objc2-foundation", - "objc2-link-presentation", - "objc2-quartz-core", - "objc2-symbols", - "objc2-uniform-type-identifiers", - "objc2-user-notifications", + "objc2-core-foundation", ] [[package]] -name = "objc2-uniform-type-identifiers" -version = "0.2.2" +name = "objc2-io-kit" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" +checksum = "33fafba39597d6dc1fb709123dfa8289d39406734be322956a69f0931c73bb15" dependencies = [ - "block2", - "objc2", - "objc2-foundation", + "libc", + "objc2-core-foundation", ] [[package]] -name = "objc2-user-notifications" -version = "0.2.2" +name = "objc2-io-surface" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" +checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" dependencies = [ "bitflags 2.10.0", - "block2", "objc2", - "objc2-core-location", - "objc2-foundation", + "objc2-core-foundation", ] [[package]] -name = "objc_id" -version = "0.1.1" +name = "objc2-quartz-core" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" +checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f" dependencies = [ - "objc", + "bitflags 2.10.0", + "objc2", + "objc2-core-foundation", + "objc2-foundation", ] [[package]] @@ -4069,13 +2726,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] -name = "orbclient" -version = "0.3.50" +name = "ordered-float" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ad2c6bae700b7aa5d1cc30c59bdd3a1c180b09dbaea51e2ae2b8e1cf211fdd" +checksum = "b7d950ca161dc355eaf28f82b11345ed76c6e1f6eb1f4f4479e0323b9e2fbd0e" dependencies = [ - "libc", - "libredox", + "num-traits", ] [[package]] @@ -4131,56 +2787,12 @@ dependencies = [ "syn 2.0.114", ] -[[package]] -name = "owned_ttf_parser" -version = "0.25.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36820e9051aca1014ddc75770aab4d68bc1e9e632f0f5627c4086bc216fb583b" -dependencies = [ - "ttf-parser 0.25.1", -] - -[[package]] -name = "palette" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cbf71184cc5ecc2e4e1baccdb21026c20e5fc3dcf63028a086131b3ab00b6e6" -dependencies = [ - "approx", - "fast-srgb8", - "palette_derive", - "phf 0.11.3", -] - -[[package]] -name = "palette_derive" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5030daf005bface118c096f510ffb781fc28f9ab6a32ab224d8631be6851d30" -dependencies = [ - "by_address", - "proc-macro2", - "quote", - "syn 2.0.114", -] - [[package]] name = "parking" version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", -] - [[package]] name = "parking_lot" version = "0.12.5" @@ -4188,21 +2800,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" dependencies = [ "lock_api", - "parking_lot_core 0.9.12", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "winapi", + "parking_lot_core", ] [[package]] @@ -4213,7 +2811,7 @@ checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.18", + "redox_syscall", "smallvec", "windows-link 0.2.1", ] @@ -4255,55 +2853,13 @@ version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" -[[package]] -name = "phf" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" -dependencies = [ - "phf_macros", - "phf_shared 0.11.3", -] - [[package]] name = "phf" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "913273894cec178f401a31ec4b656318d95473527be05c0752cc41cdc32be8b7" dependencies = [ - "phf_shared 0.12.1", -] - -[[package]] -name = "phf_generator" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" -dependencies = [ - "phf_shared 0.11.3", - "rand 0.8.5", -] - -[[package]] -name = "phf_macros" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" -dependencies = [ - "phf_generator", - "phf_shared 0.11.3", - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "phf_shared" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" -dependencies = [ - "siphasher", + "phf_shared", ] [[package]] @@ -4321,26 +2877,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" -[[package]] -name = "pin-project" -version = "1.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - [[package]] name = "pin-project-lite" version = "0.2.16" @@ -4353,17 +2889,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "piper" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" -dependencies = [ - "atomic-waker", - "fastrand 2.3.0", - "futures-io", -] - [[package]] name = "pipewire" version = "0.9.2" @@ -4375,7 +2900,7 @@ dependencies = [ "libc", "libspa", "libspa-sys", - "nix 0.30.1", + "nix", "once_cell", "pipewire-sys", "thiserror 2.0.18", @@ -4411,47 +2936,33 @@ dependencies = [ "miniz_oxide", ] -[[package]] -name = "png" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97baced388464909d42d89643fe4361939af9b7ce7a31ee32a168f832a70f2a0" -dependencies = [ - "bitflags 2.10.0", - "crc32fast", - "fdeflate", - "flate2", - "miniz_oxide", -] - [[package]] name = "polling" -version = "2.8.0" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" +checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" dependencies = [ - "autocfg", - "bitflags 1.3.2", "cfg-if", "concurrent-queue", - "libc", - "log", + "hermit-abi 0.5.2", "pin-project-lite", - "windows-sys 0.48.0", + "rustix", + "windows-sys 0.61.2", ] [[package]] -name = "polling" -version = "3.11.0" +name = "portable-atomic" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" +checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" + +[[package]] +name = "portable-atomic-util" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "091397be61a01d4be58e7841595bd4bfedb15f1cd54977d79b8271e94ed799a3" dependencies = [ - "cfg-if", - "concurrent-queue", - "hermit-abi 0.5.2", - "pin-project-lite", - "rustix 1.1.3", - "windows-sys 0.61.2", + "portable-atomic", ] [[package]] @@ -4478,23 +2989,13 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" -[[package]] -name = "proc-macro-crate" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "toml_edit 0.19.15", -] - [[package]] name = "proc-macro-crate" version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" dependencies = [ - "toml_edit 0.23.10+spec-1.0.0", + "toml_edit", ] [[package]] @@ -4535,19 +3036,6 @@ name = "profiling" version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3eb8486b569e12e2c32ad3e204dbaba5e4b5b216e9367044f25f1dba42341773" -dependencies = [ - "profiling-procmacros", -] - -[[package]] -name = "profiling-procmacros" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52717f9a02b6965224f95ca2a81e2e0c5c43baacd28ca057577988930b6c3d5b" -dependencies = [ - "quote", - "syn 2.0.114", -] [[package]] name = "pxfm" @@ -4558,15 +3046,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "qoi" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001" -dependencies = [ - "bytemuck", -] - [[package]] name = "quick-error" version = "2.0.1" @@ -4589,13 +3068,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" dependencies = [ "bytes", - "cfg_aliases 0.2.1", + "cfg_aliases", "pin-project-lite", "quinn-proto", "quinn-udp", "rustc-hash 2.1.1", "rustls", - "socket2 0.6.2", + "socket2", "thiserror 2.0.18", "tokio", "tracing", @@ -4630,10 +3109,10 @@ version = "0.5.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" dependencies = [ - "cfg_aliases 0.2.1", + "cfg_aliases", "libc", "once_cell", - "socket2 0.6.2", + "socket2", "tracing", "windows-sys 0.60.2", ] @@ -4675,185 +3154,77 @@ dependencies = [ ] [[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_chacha" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" -dependencies = [ - "ppv-lite86", - "rand_core 0.9.5", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.17", -] - -[[package]] -name = "rand_core" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" -dependencies = [ - "getrandom 0.3.4", -] - -[[package]] -name = "range-alloc" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d6831663a5098ea164f89cff59c6284e95f4e3c76ce9848d4529f5ccca9bde" - -[[package]] -name = "rangemap" -version = "1.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "973443cf09a9c8656b574a866ab68dfa19f0867d0340648c7d2f6a71b8a8ea68" - -[[package]] -name = "rav1e" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b6dd56e85d9483277cde964fd1bdb0428de4fec5ebba7540995639a21cb32b" -dependencies = [ - "aligned-vec", - "arbitrary", - "arg_enum_proc_macro", - "arrayvec", - "av-scenechange", - "av1-grain", - "bitstream-io", - "built", - "cfg-if", - "interpolate_name", - "itertools 0.14.0", - "libc", - "libfuzzer-sys", - "log", - "maybe-rayon", - "new_debug_unreachable", - "noop_proc_macro", - "num-derive", - "num-traits", - "paste", - "profiling", - "rand 0.9.2", - "rand_chacha 0.9.0", - "simd_helpers", - "thiserror 2.0.18", - "v_frame", - "wasm-bindgen", -] - -[[package]] -name = "ravif" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef69c1990ceef18a116855938e74793a5f7496ee907562bd0857b6ac734ab285" -dependencies = [ - "avif-serialize", - "imgref", - "loop9", - "quick-error", - "rav1e", - "rayon", - "rgb", -] - -[[package]] -name = "raw-window-handle" -version = "0.6.2" +name = "rand_chacha" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] [[package]] -name = "rayon" -version = "1.11.0" +name = "rand_chacha" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" dependencies = [ - "either", - "rayon-core", + "ppv-lite86", + "rand_core 0.9.5", ] [[package]] -name = "rayon-core" -version = "1.13.0" +name = "rand_core" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "crossbeam-deque", - "crossbeam-utils", + "getrandom 0.2.17", ] [[package]] -name = "read-fonts" -version = "0.35.0" +name = "rand_core" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6717cf23b488adf64b9d711329542ba34de147df262370221940dfabc2c91358" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" dependencies = [ - "bytemuck", - "font-types 0.10.1", + "getrandom 0.3.4", ] [[package]] -name = "read-fonts" -version = "0.37.0" +name = "range-alloc" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b634fabf032fab15307ffd272149b622260f55974d9fad689292a5d33df02e5" -dependencies = [ - "bytemuck", - "core_maths", - "font-types 0.11.0", -] +checksum = "c3d6831663a5098ea164f89cff59c6284e95f4e3c76ce9848d4529f5ccca9bde" [[package]] -name = "redox_event" -version = "0.4.5" +name = "rangemap" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3514da49aa6ca4cff5088a1b382ef3a0d9149964d29bb49ebd03fd66cc575a18" -dependencies = [ - "bitflags 2.10.0", - "libredox", -] +checksum = "973443cf09a9c8656b574a866ab68dfa19f0867d0340648c7d2f6a71b8a8ea68" [[package]] -name = "redox_syscall" -version = "0.2.16" +name = "raw-window-handle" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", -] +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" [[package]] -name = "redox_syscall" -version = "0.5.18" +name = "read-fonts" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +checksum = "6717cf23b488adf64b9d711329542ba34de147df262370221940dfabc2c91358" dependencies = [ - "bitflags 2.10.0", + "bytemuck", + "core_maths", + "font-types", ] [[package]] name = "redox_syscall" -version = "0.7.0" +version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f3fe0889e69e2ae9e41f4d6c4c0181701d00e4697b356fb1f74173a5e0ee27" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ "bitflags 2.10.0", ] @@ -4954,18 +3325,19 @@ dependencies = [ [[package]] name = "resvg" -version = "0.42.0" +version = "0.45.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "944d052815156ac8fa77eaac055220e95ba0b01fa8887108ca710c03805d9051" +checksum = "a8928798c0a55e03c9ca6c4c6846f76377427d2c1e1f7e6de3c06ae57942df43" dependencies = [ - "gif 0.13.3", - "jpeg-decoder", + "gif", + "image-webp", "log", "pico-args", "rgb", "svgtypes", "tiny-skia", "usvg", + "zune-jpeg", ] [[package]] @@ -5028,33 +3400,6 @@ dependencies = [ "semver", ] -[[package]] -name = "rustix" -version = "0.37.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "519165d378b97752ca44bbe15047d5d3409e875f39327546b42ac81d7e18c1b6" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", -] - -[[package]] -name = "rustix" -version = "0.38.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" -dependencies = [ - "bitflags 2.10.0", - "errno", - "libc", - "linux-raw-sys 0.4.15", - "windows-sys 0.59.0", -] - [[package]] name = "rustix" version = "1.1.3" @@ -5064,7 +3409,7 @@ dependencies = [ "bitflags 2.10.0", "errno", "libc", - "linux-raw-sys 0.11.0", + "linux-raw-sys", "windows-sys 0.61.2", ] @@ -5110,7 +3455,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d99feebc72bae7ab76ba994bb5e121b8d83d910ca40b36e0921f53becc41784" dependencies = [ - "core-foundation 0.10.1", + "core-foundation", "core-foundation-sys", "jni", "log", @@ -5151,14 +3496,16 @@ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "rustybuzz" -version = "0.14.1" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfb9cf8877777222e4a3bc7eb247e398b56baba500c38c1c46842431adc8b55c" +checksum = "fd3c7c96f8a08ee34eff8857b11b49b07d71d1c3f4e88f8a88d4c9e9f90b1702" dependencies = [ "bitflags 2.10.0", "bytemuck", + "core_maths", + "log", "smallvec", - "ttf-parser 0.21.1", + "ttf-parser", "unicode-bidi-mirroring", "unicode-ccc", "unicode-properties", @@ -5195,19 +3542,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "sctk-adwaita" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6277f0217056f77f1d8f49f2950ac6c278c0d607c45f5ee99328d792ede24ec" -dependencies = [ - "ab_glyph", - "log", - "memmap2 0.9.9", - "smithay-client-toolkit 0.19.2", - "tiny-skia", -] - [[package]] name = "security-framework" version = "3.5.1" @@ -5215,7 +3549,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3297343eaf830f66ede390ea39da1d462b6b0c1b000f420d0a83f898bbbe6ef" dependencies = [ "bitflags 2.10.0", - "core-foundation 0.10.1", + "core-foundation", "core-foundation-sys", "libc", "security-framework-sys", @@ -5328,17 +3662,6 @@ dependencies = [ "syn 2.0.114", ] -[[package]] -name = "sha1" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - [[package]] name = "shellexpand" version = "3.1.1" @@ -5394,15 +3717,6 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" -[[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.2" @@ -5425,17 +3739,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c31071dedf532758ecf3fed987cdb4bd9509f900e026ab684b4ecb81ea49841" dependencies = [ "bytemuck", - "read-fonts 0.35.0", -] - -[[package]] -name = "skrifa" -version = "0.40.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fbdfe3d2475fbd7ddd1f3e5cf8288a30eb3e5f95832829570cd88115a7434ac" -dependencies = [ - "bytemuck", - "read-fonts 0.37.0", + "read-fonts", ] [[package]] @@ -5459,31 +3763,6 @@ version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" -[[package]] -name = "smithay-client-toolkit" -version = "0.19.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" -dependencies = [ - "bitflags 2.10.0", - "calloop 0.13.0", - "calloop-wayland-source 0.3.0", - "cursor-icon", - "libc", - "log", - "memmap2 0.9.9", - "rustix 0.38.44", - "thiserror 1.0.69", - "wayland-backend", - "wayland-client", - "wayland-csd-frame", - "wayland-cursor", - "wayland-protocols", - "wayland-protocols-wlr", - "wayland-scanner", - "xkeysym", -] - [[package]] name = "smithay-client-toolkit" version = "0.20.0" @@ -5492,14 +3771,14 @@ checksum = "0512da38f5e2b31201a93524adb8d3136276fa4fe4aafab4e1f727a82b534cc0" dependencies = [ "bitflags 2.10.0", "bytemuck", - "calloop 0.14.3", - "calloop-wayland-source 0.4.1", + "calloop", + "calloop-wayland-source", "cursor-icon", "libc", "log", - "memmap2 0.9.9", + "memmap2", "pkg-config", - "rustix 1.1.3", + "rustix", "thiserror 2.0.18", "wayland-backend", "wayland-client", @@ -5510,18 +3789,18 @@ dependencies = [ "wayland-protocols-misc", "wayland-protocols-wlr", "wayland-scanner", - "xkbcommon 0.8.0", + "xkbcommon", "xkeysym", ] [[package]] name = "smithay-clipboard" -version = "0.8.0" -source = "git+https://github.com/pop-os/smithay-clipboard?tag=pop-dnd-5#5a3007def49eb678d1144850c9ee04b80707c56a" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71704c03f739f7745053bde45fa203a46c58d25bc5c4efba1d9a60e9dba81226" dependencies = [ "libc", - "raw-window-handle", - "smithay-client-toolkit 0.19.2", + "smithay-client-toolkit", "wayland-backend", ] @@ -5534,22 +3813,6 @@ dependencies = [ "serde", ] -[[package]] -name = "smol_str" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f7a918bd2a9951d18ee6e48f076843e8e73a9a5d22cf05bcd4b7a81bdd04e17" - -[[package]] -name = "socket2" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "socket2" version = "0.6.2" @@ -5562,32 +3825,24 @@ dependencies = [ [[package]] name = "softbuffer" -version = "0.4.1" -source = "git+https://github.com/pop-os/softbuffer?tag=cosmic-4.0#a3f77e251e7422803f693df6e3fc313c010c4dcb" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aac18da81ebbf05109ab275b157c22a653bb3c12cf884450179942f81bcbf6c3" dependencies = [ - "as-raw-xcb-connection", "bytemuck", - "cfg_aliases 0.2.1", - "cocoa", - "core-graphics", - "drm", - "fastrand 2.3.0", - "foreign-types", "js-sys", - "log", - "memmap2 0.9.9", - "objc", + "ndk", + "objc2", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation", + "objc2-quartz-core", "raw-window-handle", - "redox_syscall 0.5.18", - "rustix 0.38.44", - "tiny-xlib", + "redox_syscall", + "tracing", "wasm-bindgen", - "wayland-backend", - "wayland-client", - "wayland-sys", "web-sys", - "windows-sys 0.52.0", - "x11rb", + "windows-sys 0.61.2", ] [[package]] @@ -5654,7 +3909,7 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47846491253e976bdd07d0f9cc24b7daf24720d11309302ccbbc6e6b6e53550a" dependencies = [ - "skrifa 0.37.0", + "skrifa", "yazi", "zeno", ] @@ -5666,7 +3921,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2", - "quote", "unicode-ident", ] @@ -5749,10 +4003,10 @@ version = "3.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "655da9c7eb6305c55742045d5a8d2037996d61d8de95806335c7c86ce0f82e9c" dependencies = [ - "fastrand 2.3.0", + "fastrand", "getrandom 0.3.4", "once_cell", - "rustix 1.1.3", + "rustix", "windows-sys 0.61.2", ] @@ -5805,20 +4059,6 @@ dependencies = [ "syn 2.0.114", ] -[[package]] -name = "tiff" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af9605de7fee8d9551863fd692cce7637f548dbd9db9180fcc07ccc6d26c336f" -dependencies = [ - "fax", - "flate2", - "half", - "quick-error", - "weezl", - "zune-jpeg 0.4.21", -] - [[package]] name = "tiny-skia" version = "0.11.4" @@ -5830,7 +4070,7 @@ dependencies = [ "bytemuck", "cfg-if", "log", - "png 0.17.16", + "png", "tiny-skia-path", ] @@ -5845,19 +4085,6 @@ dependencies = [ "strict-num", ] -[[package]] -name = "tiny-xlib" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0324504befd01cab6e0c994f34b2ffa257849ee019d3fb3b64fb2c858887d89e" -dependencies = [ - "as-raw-xcb-connection", - "ctor-lite", - "libloading", - "pkg-config", - "tracing", -] - [[package]] name = "tinystr" version = "0.8.2" @@ -5894,7 +4121,7 @@ dependencies = [ "mio", "pin-project-lite", "signal-hook-registry", - "socket2 0.6.2", + "socket2", "tokio-macros", "tracing", "windows-sys 0.61.2", @@ -5941,18 +4168,12 @@ dependencies = [ "indexmap", "serde_core", "serde_spanned", - "toml_datetime 0.7.5+spec-1.1.0", + "toml_datetime", "toml_parser", "toml_writer", - "winnow 0.7.14", + "winnow", ] -[[package]] -name = "toml_datetime" -version = "0.6.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" - [[package]] name = "toml_datetime" version = "0.7.5+spec-1.1.0" @@ -5962,17 +4183,6 @@ dependencies = [ "serde_core", ] -[[package]] -name = "toml_edit" -version = "0.19.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap", - "toml_datetime 0.6.11", - "winnow 0.5.40", -] - [[package]] name = "toml_edit" version = "0.23.10+spec-1.0.0" @@ -5980,9 +4190,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" dependencies = [ "indexmap", - "toml_datetime 0.7.5+spec-1.1.0", + "toml_datetime", "toml_parser", - "winnow 0.7.14", + "winnow", ] [[package]] @@ -5991,7 +4201,7 @@ version = "1.0.6+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" dependencies = [ - "winnow 0.7.14", + "winnow", ] [[package]] @@ -6083,12 +4293,6 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" -[[package]] -name = "ttf-parser" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c591d83f69777866b9126b24c6dd9a18351f177e49d625920d19f989fd31cf8" - [[package]] name = "ttf-parser" version = "0.25.1" @@ -6098,12 +4302,6 @@ dependencies = [ "core_maths", ] -[[package]] -name = "typenum" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" - [[package]] name = "ucd-trie" version = "0.1.7" @@ -6128,7 +4326,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" dependencies = [ - "memoffset 0.9.1", + "memoffset", "tempfile", "winapi", ] @@ -6141,9 +4339,9 @@ checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" [[package]] name = "unicode-bidi-mirroring" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23cb788ffebc92c5948d0e997106233eeb1d8b9512f93f41651f52b6c5f5af86" +checksum = "5dfa6e8c60bb66d49db113e0125ee8711b7647b5579dc7f5f19c42357ed039fe" [[package]] name = "unicode-canonical-combining-class" @@ -6153,9 +4351,9 @@ checksum = "6925586af9268182c711e47c0853ed84131049efaca41776d0ca97f983865c32" [[package]] name = "unicode-ccc" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df77b101bcc4ea3d78dafc5ad7e4f58ceffe0b2b16bf446aeb50b6cb4157656" +checksum = "ce61d488bcdc9bc8b5d1772c404828b17fc481c0a582b5581e95fb233aef503e" [[package]] name = "unicode-general-category" @@ -6205,12 +4403,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1d386ff53b415b7fe27b50bb44679e2cc4660272694b7b6f3326d8480823a94" -[[package]] -name = "unicode-width" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" - [[package]] name = "unicode-width" version = "0.2.2" @@ -6243,14 +4435,14 @@ dependencies = [ [[package]] name = "usvg" -version = "0.42.0" +version = "0.45.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b84ea542ae85c715f07b082438a4231c3760539d902e11d093847a0b22963032" +checksum = "80be9b06fbae3b8b303400ab20778c80bbaf338f563afe567cf3c9eea17b47ef" dependencies = [ "base64", "data-url", "flate2", - "fontdb 0.18.0", + "fontdb", "imagesize", "kurbo 0.11.3", "log", @@ -6285,17 +4477,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "v_frame" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "666b7727c8875d6ab5db9533418d7c764233ac9c0cff1d469aec8fa127597be2" -dependencies = [ - "aligned-vec", - "num-traits", - "wasm-bindgen", -] - [[package]] name = "vcpkg" version = "0.2.15" @@ -6314,12 +4495,6 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" -[[package]] -name = "waker-fn" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" - [[package]] name = "walkdir" version = "2.5.0" @@ -6414,18 +4589,17 @@ dependencies = [ ] [[package]] -name = "wasm-timer" -version = "0.2.5" +name = "wasmtimer" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" +checksum = "1c598d6b99ea013e35844697fc4670d08339d5cda15588f193c6beedd12f644b" dependencies = [ "futures", "js-sys", - "parking_lot 0.11.2", + "parking_lot", "pin-utils", + "slab", "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", ] [[package]] @@ -6436,7 +4610,7 @@ checksum = "fee64194ccd96bf648f42a65a7e589547096dfa702f7cadef84347b66ad164f9" dependencies = [ "cc", "downcast-rs", - "rustix 1.1.3", + "rustix", "scoped-tls", "smallvec", "wayland-sys", @@ -6449,7 +4623,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8e6faa537fbb6c186cb9f1d41f2f811a4120d1b57ec61f50da451a0c5122bec" dependencies = [ "bitflags 2.10.0", - "rustix 1.1.3", + "rustix", "wayland-backend", "wayland-scanner", ] @@ -6471,7 +4645,7 @@ version = "0.31.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5864c4b5b6064b06b1e8b74ead4a98a6c45a285fe7a0e784d24735f011fdb078" dependencies = [ - "rustix 1.1.3", + "rustix", "wayland-client", "xcursor", ] @@ -6486,7 +4660,6 @@ dependencies = [ "wayland-backend", "wayland-client", "wayland-scanner", - "wayland-server", ] [[package]] @@ -6515,19 +4688,6 @@ dependencies = [ "wayland-scanner", ] -[[package]] -name = "wayland-protocols-plasma" -version = "0.3.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa98634619300a535a9a97f338aed9a5ff1e01a461943e8346ff4ae26007306b" -dependencies = [ - "bitflags 2.10.0", - "wayland-backend", - "wayland-client", - "wayland-protocols", - "wayland-scanner", -] - [[package]] name = "wayland-protocols-wlr" version = "0.3.10" @@ -6539,7 +4699,6 @@ dependencies = [ "wayland-client", "wayland-protocols", "wayland-scanner", - "wayland-server", ] [[package]] @@ -6553,19 +4712,6 @@ dependencies = [ "quote", ] -[[package]] -name = "wayland-server" -version = "0.31.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9297ab90f8d1f597711d36455c5b1b2290eca59b8134485e377a296b80b118c9" -dependencies = [ - "bitflags 2.10.0", - "downcast-rs", - "rustix 1.1.3", - "wayland-backend", - "wayland-scanner", -] - [[package]] name = "wayland-sys" version = "0.31.8" @@ -6574,7 +4720,6 @@ checksum = "1e6dbfc3ac5ef974c92a2235805cc0114033018ae1290a72e474aa8b28cbbdfd" dependencies = [ "dlib", "log", - "once_cell", "pkg-config", ] @@ -6615,17 +4760,21 @@ checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88" [[package]] name = "wgpu" -version = "22.1.0" +version = "27.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d1c4ba43f80542cf63a0a6ed3134629ae73e8ab51e4b765a67f3aa062eb433" +checksum = "bfe68bac7cde125de7a731c3400723cadaaf1703795ad3f4805f187459cd7a77" dependencies = [ "arrayvec", - "cfg_aliases 0.1.1", + "bitflags 2.10.0", + "cfg-if", + "cfg_aliases", "document-features", + "hashbrown 0.16.1", "js-sys", "log", "naga", - "parking_lot 0.12.5", + "parking_lot", + "portable-atomic", "profiling", "raw-window-handle", "smallvec", @@ -6640,34 +4789,68 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "22.1.0" +version = "27.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0348c840d1051b8e86c3bcd31206080c5e71e5933dabd79be1ce732b0b2f089a" +checksum = "27a75de515543b1897b26119f93731b385a19aea165a1ec5f0e3acecc229cae7" dependencies = [ "arrayvec", + "bit-set", "bit-vec", "bitflags 2.10.0", - "cfg_aliases 0.1.1", + "bytemuck", + "cfg_aliases", "document-features", + "hashbrown 0.16.1", "indexmap", "log", "naga", "once_cell", - "parking_lot 0.12.5", + "parking_lot", + "portable-atomic", "profiling", "raw-window-handle", "rustc-hash 1.1.0", "smallvec", - "thiserror 1.0.69", + "thiserror 2.0.18", + "wgpu-core-deps-apple", + "wgpu-core-deps-emscripten", + "wgpu-core-deps-windows-linux-android", "wgpu-hal", "wgpu-types", ] +[[package]] +name = "wgpu-core-deps-apple" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0772ae958e9be0c729561d5e3fd9a19679bcdfb945b8b1a1969d9bfe8056d233" +dependencies = [ + "wgpu-hal", +] + +[[package]] +name = "wgpu-core-deps-emscripten" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b06ac3444a95b0813ecfd81ddb2774b66220b264b3e2031152a4a29fda4da6b5" +dependencies = [ + "wgpu-hal", +] + +[[package]] +name = "wgpu-core-deps-windows-linux-android" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71197027d61a71748e4120f05a9242b2ad142e3c01f8c1b47707945a879a03c3" +dependencies = [ + "wgpu-hal", +] + [[package]] name = "wgpu-hal" -version = "22.0.0" +version = "27.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6bbf4b4de8b2a83c0401d9e5ae0080a2792055f25859a02bf9be97952bbed4f" +checksum = "5b21cb61c57ee198bc4aff71aeadff4cbb80b927beb912506af9c780d64313ce" dependencies = [ "android_system_properties", "arrayvec", @@ -6675,15 +4858,16 @@ dependencies = [ "bit-set", "bitflags 2.10.0", "block", - "cfg_aliases 0.1.1", + "bytemuck", + "cfg-if", + "cfg_aliases", "core-graphics-types", - "d3d12", "glow", "glutin_wgl_sys", "gpu-alloc", "gpu-allocator", "gpu-descriptor", - "hassle-rs", + "hashbrown 0.16.1", "js-sys", "khronos-egl", "libc", @@ -6691,40 +4875,40 @@ dependencies = [ "log", "metal", "naga", - "ndk-sys 0.5.0+25.2.9519653", + "ndk-sys", "objc", "once_cell", - "parking_lot 0.12.5", + "ordered-float", + "parking_lot", + "portable-atomic", + "portable-atomic-util", "profiling", "range-alloc", "raw-window-handle", "renderdoc-sys", - "rustc-hash 1.1.0", "smallvec", - "thiserror 1.0.69", + "thiserror 2.0.18", "wasm-bindgen", "web-sys", "wgpu-types", - "winapi", + "windows 0.58.0", + "windows-core 0.58.0", ] [[package]] name = "wgpu-types" -version = "22.0.0" +version = "27.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc9d91f0e2c4b51434dfa6db77846f2793149d8e73f800fa2e41f52b8eac3c5d" +checksum = "afdcf84c395990db737f2dd91628706cb31e86d72e53482320d368e52b5da5eb" dependencies = [ "bitflags 2.10.0", + "bytemuck", "js-sys", + "log", + "thiserror 2.0.18", "web-sys", ] -[[package]] -name = "widestring" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72069c3113ab32ab29e5584db3c6ec55d416895e60715417b5b883a357c3e471" - [[package]] name = "winapi" version = "0.3.9" @@ -6756,40 +4940,23 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "window_clipboard" -version = "0.4.1" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-0.13-2#6b9faab87bea9cebec6ae036906fd67fed254f5f" -dependencies = [ - "clipboard-win", - "clipboard_macos", - "clipboard_wayland", - "clipboard_x11", - "dnd", - "mime", - "raw-window-handle", - "thiserror 1.0.69", -] - [[package]] name = "windows" -version = "0.52.0" +version = "0.54.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" +checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49" dependencies = [ - "windows-core 0.52.0", + "windows-core 0.54.0", "windows-targets 0.52.6", ] [[package]] name = "windows" -version = "0.54.0" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" dependencies = [ - "windows-core 0.54.0", - "windows-implement 0.53.0", - "windows-interface 0.53.0", + "windows-core 0.58.0", "windows-targets 0.52.6", ] @@ -6817,20 +4984,24 @@ dependencies = [ [[package]] name = "windows-core" -version = "0.52.0" +version = "0.54.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65" dependencies = [ + "windows-result 0.1.2", "windows-targets 0.52.6", ] [[package]] name = "windows-core" -version = "0.54.0" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" dependencies = [ - "windows-result 0.1.2", + "windows-implement 0.58.0", + "windows-interface 0.58.0", + "windows-result 0.2.0", + "windows-strings 0.1.0", "windows-targets 0.52.6", ] @@ -6873,9 +5044,9 @@ dependencies = [ [[package]] name = "windows-implement" -version = "0.53.0" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942ac266be9249c84ca862f0a164a39533dc2f6f33dc98ec89c8da99b82ea0bd" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" dependencies = [ "proc-macro2", "quote", @@ -6895,9 +5066,9 @@ dependencies = [ [[package]] name = "windows-interface" -version = "0.53.0" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da33557140a288fae4e1d5f8873aaf9eb6613a9cf82c3e070223ff177f598b60" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" dependencies = [ "proc-macro2", "quote", @@ -6946,6 +5117,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-result" version = "0.3.4" @@ -6964,6 +5144,16 @@ dependencies = [ "windows-link 0.2.1", ] +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result 0.2.0", + "windows-targets 0.52.6", +] + [[package]] name = "windows-strings" version = "0.4.2" @@ -7009,15 +5199,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets 0.52.6", -] - [[package]] name = "windows-sys" version = "0.60.2" @@ -7288,67 +5469,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" -[[package]] -name = "winit" -version = "0.30.5" -source = "git+https://github.com/pop-os/winit.git?tag=iced-xdg-surface-0.13-rc#dd46a1499bcc38f2134ab869e8860a32e091c55b" -dependencies = [ - "ahash 0.8.12", - "android-activity", - "atomic-waker", - "bitflags 2.10.0", - "block2", - "bytemuck", - "calloop 0.13.0", - "cfg_aliases 0.2.1", - "concurrent-queue", - "core-foundation 0.9.4", - "core-graphics", - "cursor-icon", - "dpi", - "js-sys", - "libc", - "libredox", - "memmap2 0.9.9", - "ndk", - "objc2", - "objc2-app-kit", - "objc2-foundation", - "objc2-ui-kit", - "orbclient", - "percent-encoding", - "pin-project", - "raw-window-handle", - "redox_event", - "rustix 0.38.44", - "sctk-adwaita", - "smithay-client-toolkit 0.19.2", - "smol_str 0.2.2", - "tracing", - "unicode-segmentation", - "wasm-bindgen", - "wasm-bindgen-futures", - "wayland-backend", - "wayland-client", - "wayland-protocols", - "wayland-protocols-plasma", - "web-sys", - "web-time", - "windows-sys 0.52.0", - "x11-dl", - "x11rb", - "xkbcommon-dl", -] - -[[package]] -name = "winnow" -version = "0.5.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" -dependencies = [ - "memchr", -] - [[package]] name = "winnow" version = "0.7.14" @@ -7370,39 +5490,6 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" -[[package]] -name = "x11-dl" -version = "2.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" -dependencies = [ - "libc", - "once_cell", - "pkg-config", -] - -[[package]] -name = "x11rb" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9993aa5be5a26815fe2c3eacfc1fde061fc1a1f094bf1ad2a18bf9c495dd7414" -dependencies = [ - "as-raw-xcb-connection", - "gethostname", - "libc", - "libloading", - "once_cell", - "rustix 1.1.3", - "x11rb-protocol", - "xcursor", -] - -[[package]] -name = "x11rb-protocol" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6fc2961e4ef194dcbfe56bb845534d0dc8098940c7e5c012a258bfec6701bd" - [[package]] name = "xcursor" version = "0.3.10" @@ -7415,27 +5502,6 @@ version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "213b7324336b53d2414b2db8537e56544d981803139155afa84f76eeebb7a546" -[[package]] -name = "xdg-home" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec1cdab258fb55c0da61328dc52c8764709b249011b2cad0454c72f0bf10a1f6" -dependencies = [ - "libc", - "windows-sys 0.59.0", -] - -[[package]] -name = "xkbcommon" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13867d259930edc7091a6c41b4ce6eee464328c6ff9659b7e4c668ca20d4c91e" -dependencies = [ - "libc", - "memmap2 0.8.0", - "xkeysym", -] - [[package]] name = "xkbcommon" version = "0.8.0" @@ -7443,20 +5509,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d66ca9352cbd4eecbbc40871d8a11b4ac8107cfc528a6e14d7c19c69d0e1ac9" dependencies = [ "libc", - "memmap2 0.9.9", - "xkeysym", -] - -[[package]] -name = "xkbcommon-dl" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" -dependencies = [ - "bitflags 2.10.0", - "dlib", - "log", - "once_cell", + "memmap2", "xkeysym", ] @@ -7481,12 +5534,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9" -[[package]] -name = "y4m" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5a4b21e1a62b67a2970e6831bc091d7b87e119e7f9791aef9702e3bef04448" - [[package]] name = "yazi" version = "0.2.1" @@ -7516,59 +5563,23 @@ dependencies = [ "synstructure", ] -[[package]] -name = "zbus" -version = "3.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "675d170b632a6ad49804c8cf2105d7c31eddd3312555cffd4b740e08e97c25e6" -dependencies = [ - "async-broadcast 0.5.1", - "async-process", - "async-recursion", - "async-trait", - "byteorder", - "derivative", - "enumflags2", - "event-listener 2.5.3", - "futures-core", - "futures-sink", - "futures-util", - "hex", - "nix 0.26.4", - "once_cell", - "ordered-stream", - "rand 0.8.5", - "serde", - "serde_repr", - "sha1", - "static_assertions", - "tokio", - "tracing", - "uds_windows", - "winapi", - "xdg-home", - "zbus_macros 3.15.2", - "zbus_names 2.6.1", - "zvariant 3.15.2", -] - [[package]] name = "zbus" version = "5.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfeff997a0aaa3eb20c4652baf788d2dfa6d2839a0ead0b3ff69ce2f9c4bdd1" dependencies = [ - "async-broadcast 0.7.2", + "async-broadcast", "async-recursion", "async-trait", "enumflags2", - "event-listener 5.4.1", + "event-listener", "futures-core", - "futures-lite 2.6.1", + "futures-lite", "hex", "libc", "ordered-stream", - "rustix 1.1.3", + "rustix", "serde", "serde_repr", "tokio", @@ -7576,24 +5587,10 @@ dependencies = [ "uds_windows", "uuid", "windows-sys 0.61.2", - "winnow 0.7.14", - "zbus_macros 5.13.2", - "zbus_names 4.3.1", - "zvariant 5.9.2", -] - -[[package]] -name = "zbus_macros" -version = "3.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7131497b0f887e8061b430c530240063d33bf9455fa34438f388a245da69e0a5" -dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "regex", - "syn 1.0.109", - "zvariant_utils 1.0.1", + "winnow", + "zbus_macros", + "zbus_names", + "zvariant", ] [[package]] @@ -7602,24 +5599,13 @@ version = "5.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bbd5a90dbe8feee5b13def448427ae314ccd26a49cac47905cafefb9ff846f1" dependencies = [ - "proc-macro-crate 3.4.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.114", - "zbus_names 4.3.1", - "zvariant 5.9.2", - "zvariant_utils 3.3.0", -] - -[[package]] -name = "zbus_names" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "437d738d3750bed6ca9b8d423ccc7a8eb284f6b1d6d4e225a0e4e6258d864c8d" -dependencies = [ - "serde", - "static_assertions", - "zvariant 3.15.2", + "zbus_names", + "zvariant", + "zvariant_utils", ] [[package]] @@ -7629,8 +5615,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffd8af6d5b78619bab301ff3c560a5bd22426150253db278f164d6cf3b72c50f" dependencies = [ "serde", - "winnow 0.7.14", - "zvariant 5.9.2", + "winnow", + "zvariant", ] [[package]] @@ -7731,51 +5717,13 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a" -[[package]] -name = "zune-core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb8a0807f7c01457d0379ba880ba6322660448ddebc890ce29bb64da71fb40f9" - -[[package]] -name = "zune-inflate" -version = "0.2.54" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02" -dependencies = [ - "simd-adler32", -] - [[package]] name = "zune-jpeg" version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29ce2c8a9384ad323cf564b67da86e21d3cfdff87908bc1223ed5c99bc792713" dependencies = [ - "zune-core 0.4.12", -] - -[[package]] -name = "zune-jpeg" -version = "0.5.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "410e9ecef634c709e3831c2cfdb8d9c32164fae1c67496d5b68fff728eec37fe" -dependencies = [ - "zune-core 0.5.1", -] - -[[package]] -name = "zvariant" -version = "3.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eef2be88ba09b358d3b58aca6e41cd853631d44787f319a1383ca83424fb2db" -dependencies = [ - "byteorder", - "enumflags2", - "libc", - "serde", - "static_assertions", - "zvariant_derive 3.15.2", + "zune-core", ] [[package]] @@ -7787,22 +5735,9 @@ dependencies = [ "endi", "enumflags2", "serde", - "winnow 0.7.14", - "zvariant_derive 5.9.2", - "zvariant_utils 3.3.0", -] - -[[package]] -name = "zvariant_derive" -version = "3.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37c24dc0bed72f5f90d1f8bb5b07228cbf63b3c6e9f82d82559d4bae666e7ed9" -dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 1.0.109", - "zvariant_utils 1.0.1", + "winnow", + "zvariant_derive", + "zvariant_utils", ] [[package]] @@ -7811,22 +5746,11 @@ version = "5.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "484d5d975eb7afb52cc6b929c13d3719a20ad650fea4120e6310de3fc55e415c" dependencies = [ - "proc-macro-crate 3.4.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.114", - "zvariant_utils 3.3.0", -] - -[[package]] -name = "zvariant_utils" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7234f0d811589db492d16893e3f21e8e2fd282e6d01b0cddee310322062cc200" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "zvariant_utils", ] [[package]] @@ -7839,5 +5763,5 @@ dependencies = [ "quote", "serde", "syn 2.0.114", - "winnow 0.7.14", + "winnow", ] diff --git a/Cargo.toml b/Cargo.toml index aa71516a..f15c717a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,13 +28,10 @@ depends = ["libwayland-client0", "libpipewire-0.3-0t64", "libpulse0"] depends = ["libwayland-client", "pipewire-libs", "pulseaudio-libs"] [dependencies] -iced = { git = "https://github.com/MalpenZibo/iced", rev = "ba37674a834b0c9fe67a09a96b80a3a3d0dd75ef", features = [ +iced_layershell = { path = "../iced_layershell", features = [ "tokio", - "multi-window", "advanced", "wgpu", - "winit", - "wayland", "image", "svg", "canvas", @@ -52,8 +49,6 @@ libpulse-binding = { version = "2.28", features = ["pa_v15"] } log = { version = "0.4", features = [] } flexi_logger = "0.31" pipewire = "0.9" -wayland-client = "0.31.12" -wayland-protocols = { version = "0.32.10", features = ["client", "unstable"] } itertools = "0.14" hex_color = { version = "3", features = ["serde"] } anyhow = "1" @@ -86,6 +81,8 @@ signal-hook = "0.4.3" signal-hook-tokio = { version = "0.4", features = ["futures-v0_3"] } libc = "0.2.182" chrono-tz = "0.10.4" +wayland-client = "0.31" +wayland-protocols = { version = "0.32", features = ["client"] } [build-dependencies] allsorts = "0.15" diff --git a/src/app.rs b/src/app.rs index 124cbd31..49023745 100644 --- a/src/app.rs +++ b/src/app.rs @@ -25,21 +25,16 @@ use crate::{ widgets::{ButtonUIRef, Centerbox}, }; use flexi_logger::LoggerHandle; -use iced::{ - Alignment, Color, Element, Gradient, Length, Radians, Subscription, Task, Theme, - daemon::Appearance, - event::{ - listen_with, - wayland::{Event as WaylandEvent, OutputEvent}, - }, +use iced_layershell::{ + Alignment, Color, Element, Gradient, Length, OutputEvent, Radians, Subscription, SurfaceId, + Task, Theme, + event::listen_with, gradient::Linear, - keyboard, + keyboard, set_exclusive_zone, widget::{Row, container, mouse_area}, - window::Id, }; use log::{debug, info, warn}; use std::{collections::HashMap, f32::consts::PI, path::PathBuf}; -use wayland_client::protocol::wl_output::WlOutput; pub struct GeneralConfig { outputs: config::Outputs, @@ -73,8 +68,8 @@ pub struct App { #[derive(Debug, Clone)] pub enum Message { ConfigChanged(Box), - ToggleMenu(MenuType, Id, ButtonUIRef), - CloseMenu(Id), + ToggleMenu(MenuType, SurfaceId, ButtonUIRef), + CloseMenu(SurfaceId), Custom(String, custom_module::Message), Updates(modules::updates::Message), Workspaces(modules::workspaces::Message), @@ -88,7 +83,7 @@ pub enum Message { Privacy(modules::privacy::Message), Settings(modules::settings::Message), MediaPlayer(modules::media_player::Message), - OutputEvent((OutputEvent, WlOutput)), + OutputEvent(OutputEvent), CloseAllMenus, ResumeFromSleep, None, @@ -197,23 +192,11 @@ impl App { )); } - pub fn title(&self, _id: Id) -> String { - String::from("ashell") - } - - pub fn theme(&self, _id: Id) -> Theme { + pub fn theme(&self) -> Theme { self.theme.get_theme().clone() } - pub fn style(&self, theme: &Theme) -> Appearance { - Appearance { - background_color: Color::TRANSPARENT, - text_color: theme.palette().text, - icon_color: theme.palette().text, - } - } - - pub fn scale_factor(&self, _id: Id) -> f64 { + pub fn scale_factor(&self) -> f64 { self.theme.scale_factor } @@ -372,13 +355,10 @@ impl App { ]) } }, - Message::OutputEvent((event, wl_output)) => match event { - iced::event::wayland::OutputEvent::Created(info) => { + Message::OutputEvent(event) => match event { + OutputEvent::Added(info) => { info!("Output created: {info:?}"); - let name = info - .as_ref() - .and_then(|info| info.description.as_deref()) - .unwrap_or(""); + let name = &info.name; self.outputs.add( self.theme.bar_style, @@ -386,21 +366,21 @@ impl App { self.theme.bar_position, self.general_config.layer, name, - wl_output, + info.id, self.theme.scale_factor, ) } - iced::event::wayland::OutputEvent::Removed => { + OutputEvent::Removed(output_id) => { info!("Output destroyed"); self.outputs.remove( self.theme.bar_style, self.theme.bar_position, self.general_config.layer, - wl_output, + output_id, self.theme.scale_factor, ) } - _ => Task::none(), + OutputEvent::InfoChanged(_) => Task::none(), }, Message::MediaPlayer(msg) => match self.media_player.update(msg) { modules::media_player::Action::None => Task::none(), @@ -435,16 +415,21 @@ impl App { 0.0 }; - Task::batch(self.outputs.iter().filter_map(|(_, shell_info, _)| { - shell_info.as_ref().map(|info| { - iced::platform_specific::shell::commands::layer_surface::set_exclusive_zone(info.id, height as i32) - }) - }).collect::>()) + Task::batch( + self.outputs + .iter() + .filter_map(|(_, shell_info, _)| { + shell_info + .as_ref() + .map(|info| set_exclusive_zone(info.id, height as i32)) + }) + .collect::>(), + ) } } } - pub fn view(&'_ self, id: Id) -> Element<'_, Message> { + pub fn view(&'_ self, id: SurfaceId) -> Element<'_, Message> { match self.outputs.has(id) { Some(HasOutput::Main) => { if !self.visible { @@ -465,7 +450,7 @@ impl App { .padding(if self.theme.bar_style == AppearanceStyle::Islands { [self.theme.space.xxs, self.theme.space.xxs] } else { - [0, 0] + [0.0, 0.0] }); let status_bar = container(centerbox).style(|t: &Theme| container::Style { @@ -593,14 +578,12 @@ impl App { crate::services::ServiceEvent::Update(_) => Message::ResumeFromSleep, _ => Message::None, }), + // iced_layershell::output_events().map(Message::OutputEvent), listen_with(move |evt, _, _| match evt { - iced::Event::PlatformSpecific(iced::event::PlatformSpecific::Wayland( - WaylandEvent::Output(event, wl_output), - )) => { - debug!("Wayland event: {event:?}"); - Some(Message::OutputEvent((event, wl_output))) - } - iced::Event::Keyboard(keyboard::Event::KeyPressed { key, .. }) => { + iced_layershell::event::Event::Keyboard(keyboard::Event::KeyPressed { + key, + .. + }) => { debug!("Keyboard event received: {key:?}"); if matches!(key, keyboard::Key::Named(keyboard::key::Named::Escape)) { debug!("ESC key pressed, closing all menus"); @@ -612,14 +595,14 @@ impl App { _ => None, }), Subscription::run(|| { - use iced::futures::StreamExt; + use iced_layershell::futures::StreamExt; signal_hook_tokio::Signals::new([libc::SIGUSR1]) .expect("Failed to create signal stream") .filter_map(|sig| { if sig == libc::SIGUSR1 { - iced::futures::future::ready(Some(Message::ToggleVisibility)) + iced_layershell::futures::future::ready(Some(Message::ToggleVisibility)) } else { - iced::futures::future::ready(None) + iced_layershell::futures::future::ready(None) } }) }), diff --git a/src/components/icons.rs b/src/components/icons.rs index 71586a7d..4dd1aa0a 100644 --- a/src/components/icons.rs +++ b/src/components/icons.rs @@ -1,5 +1,5 @@ use crate::theme::AshellTheme; -use iced::{ +use iced_layershell::{ Color, Element, Font, Length, Theme, widget::{ Text, button as button_fn, diff --git a/src/config.rs b/src/config.rs index d52285a7..01360d52 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,8 +1,8 @@ use crate::app::Message; use crate::services::upower::PeripheralDeviceKind; use hex_color::HexColor; -use iced::futures::StreamExt; -use iced::{Color, Subscription, futures::SinkExt, stream::channel, theme::palette}; +use iced_layershell::futures::StreamExt; +use iced_layershell::{Color, Subscription, futures::SinkExt, stream::channel, theme::palette}; use inotify::EventMask; use inotify::Inotify; use inotify::WatchMask; @@ -13,7 +13,7 @@ use serde_with::DisplayFromStr; use serde_with::serde_as; use std::path::PathBuf; use std::time::Duration; -use std::{any::TypeId, collections::HashMap, error::Error, ops::Deref, path::Path}; +use std::{collections::HashMap, error::Error, ops::Deref, path::Path}; use tokio::time::sleep; pub const DEFAULT_CONFIG_FILE_PATH: &str = "~/.config/ashell/config.toml"; @@ -296,6 +296,20 @@ pub enum WeatherLocation { Coordinates(f32, f32), } +impl std::hash::Hash for WeatherLocation { + fn hash(&self, state: &mut H) { + std::mem::discriminant(self).hash(state); + match self { + WeatherLocation::Current => {} + WeatherLocation::City(city) => city.hash(state), + WeatherLocation::Coordinates(lat, lon) => { + lat.to_bits().hash(state); + lon.to_bits().hash(state); + } + } + } +} + impl Default for TempoModuleConfig { fn default() -> Self { Self { @@ -876,11 +890,10 @@ enum Event { } pub fn subscription(path: &Path) -> Subscription { - let id = TypeId::of::(); let path = path.to_path_buf(); - Subscription::run_with_id( - id, + Subscription::run_with(path, |path| { + let path = path.clone(); channel(100, async move |mut output| { match (path.parent(), path.file_name(), Inotify::init()) { (Some(folder), Some(file_name), Ok(inotify)) => { @@ -980,6 +993,6 @@ pub fn subscription(path: &Path) -> Subscription { error!("Failed to initialize inotify: {e}"); } } - }), - ) + }) + }) } diff --git a/src/main.rs b/src/main.rs index c6670f9e..15ee14b3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,14 +1,15 @@ -use crate::config::get_config; +use crate::config::{get_config, Position}; +use crate::outputs::Outputs; use app::App; use clap::Parser; use flexi_logger::{ Age, Cleanup, Criterion, FileSpec, LogSpecBuilder, LogSpecification, Logger, Naming, }; -use iced::Font; +use iced_layershell::{Anchor, Font, KeyboardInteractivity, Layer, LayerShellSettings}; use log::{debug, error, warn}; use std::panic; use std::path::PathBuf; -use std::{backtrace::Backtrace, borrow::Cow}; +use std::backtrace::Backtrace; mod app; mod components; @@ -51,8 +52,7 @@ fn get_log_spec(log_level: &str) -> LogSpecification { } } -#[tokio::main] -async fn main() -> iced::Result { +fn main() -> iced_layershell::Result { let args = Args::parse(); debug!("args: {args:?}"); @@ -93,14 +93,38 @@ async fn main() -> iced::Result { Font::DEFAULT }; - iced::daemon(App::title, App::update, App::view) - .subscription(App::subscription) - .theme(App::theme) - .style(App::style) - .scale_factor(App::scale_factor) - .font(Cow::from(NERD_FONT)) - .font(Cow::from(NERD_FONT_MONO)) - .font(Cow::from(CUSTOM_FONT)) - .default_font(font) - .run_with(App::new((logger, config, config_path))) + let height = Outputs::get_height(config.appearance.style, config.appearance.scale_factor); + + let iced_layer = match config.layer { + config::Layer::Top => Layer::Top, + config::Layer::Bottom => Layer::Bottom, + config::Layer::Overlay => Layer::Overlay, + }; + + iced_layershell::application( + App::new((logger, config.clone(), config_path)), + App::update, + App::view, + ) + .layer_shell(LayerShellSettings { + anchor: match config.position { + Position::Top => Anchor::TOP, + Position::Bottom => Anchor::BOTTOM, + } | Anchor::LEFT + | Anchor::RIGHT, + layer: iced_layer, + exclusive_zone: height as i32, + size: Some((0, height as u32)), + keyboard_interactivity: KeyboardInteractivity::None, + namespace: "ashell-main-layer".into(), + ..Default::default() + }) + .subscription(App::subscription) + .theme(App::theme) + .scale_factor(App::scale_factor) + .font(NERD_FONT) + .font(NERD_FONT_MONO) + .font(CUSTOM_FONT) + .default_font(font) + .run() } diff --git a/src/menu.rs b/src/menu.rs index 3fa3ca6c..350770ec 100644 --- a/src/menu.rs +++ b/src/menu.rs @@ -2,14 +2,13 @@ use crate::app::{self, App}; use crate::config::{AppearanceStyle, Position}; use crate::theme::backdrop_color; use crate::widgets::{self, ButtonUIRef}; -use iced::alignment::Vertical; -use iced::platform_specific::shell::commands::layer_surface::{ - KeyboardInteractivity, Layer, set_keyboard_interactivity, set_layer, +use iced_layershell::alignment::Vertical; +use iced_layershell::{ + Border, Element, KeyboardInteractivity, Layer, Length, Padding, Pixels, SurfaceId, Task, Theme, + set_keyboard_interactivity, set_layer, + widget::container, }; -use iced::widget::container::Style; -use iced::window::Id; -use iced::{self, Element, Task, Theme, widget::container}; -use iced::{Border, Length, Padding, Pixels}; +use iced_layershell::widget::container::Style; #[derive(Eq, PartialEq, Clone, Debug)] pub enum MenuType { @@ -23,12 +22,12 @@ pub enum MenuType { #[derive(Clone, Debug)] pub struct Menu { - pub id: Id, + pub id: SurfaceId, pub menu_info: Option<(MenuType, ButtonUIRef)>, } impl Menu { - pub fn new(id: Id) -> Self { + pub fn new(id: SurfaceId) -> Self { Self { id, menu_info: None, @@ -145,7 +144,7 @@ impl App { #[allow(clippy::too_many_arguments)] pub fn menu_wrapper<'a>( &'a self, - id: Id, + id: SurfaceId, content: Element<'a, app::Message>, button_ui_ref: ButtonUIRef, ) -> Element<'a, app::Message> { diff --git a/src/modules/clock.rs b/src/modules/clock.rs index c84762ed..64ba8773 100644 --- a/src/modules/clock.rs +++ b/src/modules/clock.rs @@ -1,6 +1,6 @@ use crate::{config::ClockModuleConfig, theme::AshellTheme}; use chrono::{DateTime, Local}; -use iced::{Element, Subscription, time::every, widget::text}; +use iced_layershell::{Element, Subscription, time::every, widget::text}; use log::warn; use std::time::Duration; diff --git a/src/modules/custom_module.rs b/src/modules/custom_module.rs index 5f356ba4..b929f52b 100644 --- a/src/modules/custom_module.rs +++ b/src/modules/custom_module.rs @@ -4,13 +4,13 @@ use crate::{ theme::AshellTheme, utils::launcher::execute_command, }; -use iced::widget::canvas; -use iced::{ +use iced_layershell::widget::canvas; +use iced_layershell::{ Element, Length, Subscription, Theme, stream::channel, widget::{Stack, row, text}, }; -use iced::{ +use iced_layershell::{ mouse::Cursor, widget::{ canvas::{Cache, Geometry, Path, Program}, @@ -19,7 +19,7 @@ use iced::{ }; use log::{error, info}; use serde::Deserialize; -use std::{any::TypeId, process::Stdio}; +use std::process::Stdio; use tokio::{ io::{AsyncBufReadExt, BufReader}, process::Command, @@ -53,9 +53,9 @@ impl Program for AlertIndicator { fn draw( &self, cache: &Self::State, - renderer: &iced::Renderer, + renderer: &iced_layershell::Renderer, theme: &Theme, - bounds: iced::Rectangle, + bounds: iced_layershell::Rectangle, _cursor: Cursor, ) -> Vec { let geometry = cache.draw(renderer, bounds.size(), |frame| { @@ -144,8 +144,8 @@ impl Custom { let alert_indicator_container = container(alert_canvas) .width(Length::Fill) // Take full width of the stack item .height(Length::Fill) // Take full height - .align_x(iced::alignment::Horizontal::Right) - .align_y(iced::alignment::Vertical::Top); + .align_x(iced_layershell::alignment::Horizontal::Right) + .align_y(iced_layershell::alignment::Vertical::Top); Stack::new() .push(padded_icon_container) // Padded icon is the base layer @@ -175,11 +175,10 @@ impl Custom { } pub fn subscription(&self) -> Subscription<(String, Message)> { - let id = TypeId::of::(); let name = self.config.name.clone(); if let Some(listen_cmd) = self.config.listen_cmd.clone() { - Subscription::run_with_id( - (id, name.clone(), listen_cmd.clone()), + Subscription::run_with((name, listen_cmd), |data| { + let (name, listen_cmd) = data.clone(); channel(10, async move |mut output| { let command = Command::new("bash") .arg("-c") @@ -229,8 +228,8 @@ impl Custom { error!("Failed to execute command: {error}"); } } - }), - ) + }) + }) } else { Subscription::none() } diff --git a/src/modules/keyboard_layout.rs b/src/modules/keyboard_layout.rs index 6c0c54d2..bfc13072 100644 --- a/src/modules/keyboard_layout.rs +++ b/src/modules/keyboard_layout.rs @@ -6,7 +6,7 @@ use crate::{ }, theme::AshellTheme, }; -use iced::{Element, Subscription, Task, widget::text}; +use iced_layershell::{Element, Subscription, Task, widget::text}; #[derive(Debug, Clone)] pub enum Message { diff --git a/src/modules/keyboard_submap.rs b/src/modules/keyboard_submap.rs index b748f0a0..dd01a56a 100644 --- a/src/modules/keyboard_submap.rs +++ b/src/modules/keyboard_submap.rs @@ -2,7 +2,7 @@ use crate::{ services::{ReadOnlyService, ServiceEvent, compositor::CompositorService}, theme::AshellTheme, }; -use iced::{Element, Subscription, widget::text}; +use iced_layershell::{Element, Subscription, widget::text}; #[derive(Debug, Clone)] pub enum Message { diff --git a/src/modules/media_player.rs b/src/modules/media_player.rs index 4dd428ef..c5e21f81 100644 --- a/src/modules/media_player.rs +++ b/src/modules/media_player.rs @@ -2,6 +2,7 @@ use crate::{ components::icons::{IconButtonSize, StaticIcon, icon, icon_button}, config::{MediaPlayerFormat, MediaPlayerModuleConfig}, menu::MenuSize, + utils::PushMaybe, services::{ ReadOnlyService, Service, ServiceEvent, mpris::{ @@ -11,10 +12,10 @@ use crate::{ theme::AshellTheme, utils::truncate_text, }; -use iced::{ +use iced_layershell::{ Background, Border, Element, Length, Subscription, Task, Theme, alignment::Vertical, - widget::{column, container, horizontal_rule, horizontal_space, image, row, slider, text}, + widget::{column, container, image, row, rule, slider, space, text}, }; use std::collections::{HashMap, HashSet}; @@ -84,7 +85,7 @@ impl MediaPlayer { None => Into::>::into(text("Not connected to MPRIS service")), Some(service) => column!( text("Players").size(theme.font_size.lg), - horizontal_rule(1), + rule::horizontal(1), column(service.players().iter().map(|d| { const LEFT_COLUMN_WIDTH: Length = Length::FillPortion(3); const RIGHT_COLUMN_WIDTH: Length = Length::FillPortion(2); @@ -180,7 +181,7 @@ impl MediaPlayer { } (None, cover) => { let controls = - row![horizontal_space().width(LEFT_COLUMN_WIDTH), buttons] + row![space::horizontal().width(LEFT_COLUMN_WIDTH), buttons] .spacing(theme.space.md) .align_y(Vertical::Center); column![metadata(description, cover), controls] @@ -211,7 +212,7 @@ impl MediaPlayer { .spacing(theme.space.xs) .into(), }) - .max_width(MenuSize::Large) + .width(MenuSize::Large) .into() } diff --git a/src/modules/mod.rs b/src/modules/mod.rs index 55e0a67c..b0834381 100644 --- a/src/modules/mod.rs +++ b/src/modules/mod.rs @@ -3,12 +3,12 @@ use crate::{ config::{AppearanceStyle, ModuleDef, ModuleName}, menu::MenuType, theme::AshellTheme, + utils::PushMaybe, widgets::position_button, }; -use iced::{ - Alignment, Border, Color, Element, Length, Subscription, +use iced_layershell::{ + Alignment, Border, Color, Element, Length, Subscription, SurfaceId, widget::{Row, container}, - window::Id, }; pub mod clock; @@ -40,7 +40,7 @@ pub enum OnModulePress { impl App { pub fn modules_section<'a>( &'a self, - id: Id, + id: SurfaceId, theme: &'a AshellTheme, ) -> [Element<'a, Message>; 3] { [ @@ -84,7 +84,7 @@ impl App { fn single_module_wrapper<'a>( &'a self, - id: Id, + id: SurfaceId, theme: &'a AshellTheme, module_name: &'a ModuleName, ) -> Option> { @@ -98,7 +98,7 @@ impl App { .height(Length::Fill) .clip(true), ) - .padding([2, self.theme.space.xs]) + .padding([2.0, self.theme.space.xs]) .height(Length::Fill) .style(theme.module_button_style(false)); @@ -134,7 +134,7 @@ impl App { } _ => { let container = container(content) - .padding([2, self.theme.space.xs]) + .padding([2.0, self.theme.space.xs]) .height(Length::Fill) .align_y(Alignment::Center) .clip(true); @@ -165,7 +165,7 @@ impl App { fn group_module_wrapper<'a>( &'a self, - id: Id, + id: SurfaceId, theme: &'a AshellTheme, group: &'a [ModuleName], ) -> Option> { @@ -189,7 +189,7 @@ impl App { .height(Length::Fill) .clip(true), ) - .padding([2, self.theme.space.xs]) + .padding([2.0, self.theme.space.xs]) .height(Length::Fill) .style(theme.module_button_style(true)); @@ -232,7 +232,7 @@ impl App { .into() } _ => container(content) - .padding([2, self.theme.space.xs]) + .padding([2.0, self.theme.space.xs]) .height(Length::Fill) .align_y(Alignment::Center) .clip(true) @@ -267,7 +267,7 @@ impl App { fn get_module_view<'a>( &'a self, - id: Id, + id: SurfaceId, module_name: &'a ModuleName, ) -> Option<(Element<'a, Message>, Option)> { match module_name { diff --git a/src/modules/privacy.rs b/src/modules/privacy.rs index 898651f5..7d672335 100644 --- a/src/modules/privacy.rs +++ b/src/modules/privacy.rs @@ -2,8 +2,9 @@ use crate::{ components::icons::{StaticIcon, icon}, services::{ReadOnlyService, ServiceEvent, privacy::PrivacyService}, theme::AshellTheme, + utils::PushMaybe, }; -use iced::{ +use iced_layershell::{ Alignment, Element, Subscription, widget::{Row, container}, }; diff --git a/src/modules/settings/audio.rs b/src/modules/settings/audio.rs index 57b151ae..4f693878 100644 --- a/src/modules/settings/audio.rs +++ b/src/modules/settings/audio.rs @@ -7,15 +7,13 @@ use crate::{ audio::{AudioCommand, AudioService, DevicePortType, Port}, }, theme::AshellTheme, + utils::PushMaybe, utils::remote_value::{self, Remote}, }; -use iced::{ - Alignment, Element, Length, Subscription, Task, Theme, +use iced_layershell::{ + Alignment, Element, Length, Subscription, SurfaceId, Task, Theme, mouse::ScrollDelta, - widget::{ - Column, MouseArea, Row, Text, button, column, container, horizontal_rule, row, slider, text, - }, - window::Id, + widget::{Column, MouseArea, Row, Text, button, column, container, row, rule, slider, text}, }; use libpulse_binding::volume::Volume; @@ -30,8 +28,8 @@ pub enum Message { SinkVolumeChanged(remote_value::Message), ToggleSourceMute, SourceVolumeChanged(remote_value::Message), - SinksMore(Id), - SourcesMore(Id), + SinksMore(SurfaceId), + SourcesMore(SurfaceId), OpenMore, OpenSourceMore, ToggleSinksMenu, @@ -44,7 +42,7 @@ pub enum Action { Task(Task), ToggleSinksMenu, ToggleSourcesMenu, - CloseMenu(Id), + CloseMenu(SurfaceId), CloseSubMenu, } @@ -353,7 +351,7 @@ impl AudioSettings { pub fn sinks_submenu<'a>( &'a self, - id: Id, + id: SurfaceId, theme: &'a AshellTheme, ) -> Option> { self.service.as_ref().map(|service| { @@ -386,7 +384,7 @@ impl AudioSettings { pub fn sources_submenu<'a>( &'a self, - id: Id, + id: SurfaceId, theme: &'a AshellTheme, ) -> Option> { self.service.as_ref().map(|service| { @@ -573,7 +571,7 @@ impl AudioSettings { match more_msg { Some(more_msg) => column!( entries, - horizontal_rule(1), + rule::horizontal(1), button("More") .on_press(more_msg) .padding([theme.space.xxs, theme.space.sm]) diff --git a/src/modules/settings/bluetooth.rs b/src/modules/settings/bluetooth.rs index 1f257a35..fd5cc890 100644 --- a/src/modules/settings/bluetooth.rs +++ b/src/modules/settings/bluetooth.rs @@ -2,19 +2,19 @@ use super::{SubMenu, quick_setting_button}; use crate::{ components::icons::{IconButtonSize, StaticIcon, icon, icon_button}, config::SettingsFormat, + utils::PushMaybe, services::{ ReadOnlyService, Service, ServiceEvent, bluetooth::{BluetoothCommand, BluetoothDevice, BluetoothService, BluetoothState}, }, theme::AshellTheme, }; -use iced::{ - Element, Length, Subscription, Task, Theme, +use iced_layershell::{ + Element, Length, Padding, Subscription, SurfaceId, Task, Theme, alignment::{Alignment, Horizontal, Vertical}, widget::{ - Column, MouseArea, Row, button, column, container, horizontal_rule, row, scrollable, text, + Column, MouseArea, Row, button, column, container, row, rule, scrollable, text, }, - window::Id, }; use itertools::Itertools; use zbus::zvariant::OwnedObjectPath; @@ -31,14 +31,14 @@ pub enum Message { DisconnectDevice(OwnedObjectPath), RemoveDevice(OwnedObjectPath), OpenMore, - More(Id), + More(SurfaceId), ConfigReloaded(BluetoothSettingsConfig), } pub enum Action { None, ToggleBluetoothMenu, - CloseMenu(Id), + CloseMenu(SurfaceId), CloseSubMenu(Task), Command(Task), } @@ -167,7 +167,7 @@ impl BluetoothSettings { pub fn quick_setting_button<'a>( &'a self, - id: Id, + id: SurfaceId, theme: &'a AshellTheme, sub_menu: Option, ) -> Option<(Element<'a, Message>, Option>)> { @@ -211,7 +211,7 @@ impl BluetoothSettings { fn bluetooth_menu<'a>( &'a self, - id: Id, + id: SurfaceId, theme: &'a AshellTheme, ) -> Option> { self.service.as_ref().map(|service| { @@ -309,12 +309,12 @@ impl BluetoothSettings { .width(Length::Fill) .align_x(Horizontal::Right) ) - .padding([0, theme.space.sm]), - horizontal_rule(1), + .padding([0.0, theme.space.sm]), + rule::horizontal(1), ), container(scrollable( Column::with_children(known_devices.map(known_device_entry),) - .padding([0, theme.space.xs, 0, 0]) + .padding(Padding::default().right(theme.space.xs)) )) .max_height(150), ) @@ -333,8 +333,8 @@ impl BluetoothSettings { .align_x(Horizontal::Right) .size(theme.font_size.xs), ) - .padding([0, theme.space.sm]), - horizontal_rule(1), + .padding([0.0, theme.space.sm]), + rule::horizontal(1), ), container(scrollable( Column::with_children(available_devices.map(|d| { @@ -352,12 +352,7 @@ impl BluetoothSettings { .width(Length::Fill) .into() })) - .padding([ - 0, - theme.space.xs, - 0, - 0 - ]) + .padding(Padding::default().right(theme.space.xs)) )) .max_height(150), ) @@ -371,7 +366,7 @@ impl BluetoothSettings { } else { None }) - .push_maybe(self.config.more_cmd.as_ref().map(|_| horizontal_rule(1))) + .push_maybe(self.config.more_cmd.as_ref().map(|_| rule::horizontal(1))) .push_maybe(self.config.more_cmd.as_ref().map(|_| { button("More") .on_press(Message::More(id)) diff --git a/src/modules/settings/brightness.rs b/src/modules/settings/brightness.rs index bc1cb021..16b6b8b1 100644 --- a/src/modules/settings/brightness.rs +++ b/src/modules/settings/brightness.rs @@ -8,7 +8,7 @@ use crate::{ theme::AshellTheme, utils::remote_value, }; -use iced::{ +use iced_layershell::{ Alignment, Element, Subscription, Task, mouse::ScrollDelta, widget::{MouseArea, Text, container, row, slider, text}, diff --git a/src/modules/settings/mod.rs b/src/modules/settings/mod.rs index 4ff82ca7..120b5187 100644 --- a/src/modules/settings/mod.rs +++ b/src/modules/settings/mod.rs @@ -1,7 +1,7 @@ use std::collections::HashMap; use std::time::Duration; -use iced::futures::future::join_all; +use iced_layershell::futures::future::join_all; use log::{debug, error}; use tokio::process::Command; use tokio::time::timeout; @@ -10,6 +10,7 @@ use crate::{ components::icons::{DynamicIcon, Icon, IconButtonSize, StaticIcon, icon, icon_button}, config::{Position, SettingsCustomButton, SettingsIndicator, SettingsModuleConfig}, menu::MenuSize, + utils::PushMaybe, modules::settings::{ audio::{AudioSettings, AudioSettingsConfig}, bluetooth::{BluetoothSettings, BluetoothSettingsConfig}, @@ -21,10 +22,9 @@ use crate::{ services::idle_inhibitor::IdleInhibitorManager, theme::AshellTheme, }; -use iced::{ - Alignment, Background, Border, Element, Length, Padding, Subscription, Task, Theme, - widget::{Column, MouseArea, Row, Space, button, container, horizontal_space, row, text}, - window::Id, +use iced_layershell::{ + Alignment, Background, Border, Element, Length, Padding, Subscription, SurfaceId, Task, Theme, + widget::{Column, MouseArea, Row, Space, button, container, row, space, text}, }; mod audio; @@ -100,10 +100,10 @@ pub enum Message { pub enum Action { None, Command(Task), - CloseMenu(Id), - RequestKeyboard(Id), - ReleaseKeyboard(Id), - ReleaseKeyboardWithCommand(Id, Task), + CloseMenu(SurfaceId), + RequestKeyboard(SurfaceId), + ReleaseKeyboard(SurfaceId), + ReleaseKeyboardWithCommand(SurfaceId, Task), } #[derive(Debug, PartialEq, Eq, Clone, Copy)] @@ -476,7 +476,7 @@ impl Settings { pub fn menu_view<'a>( &'a self, - id: Id, + id: SurfaceId, theme: &'a AshellTheme, position: Position, ) -> Element<'a, Message> { @@ -516,7 +516,7 @@ impl Settings { let header = Row::with_capacity(3) .push_maybe(battery_data) - .push(Space::with_width(Length::Fill)) + .push(Space::new().width(Length::Fill)) .push(right_buttons) .spacing(theme.space.xs) .width(Length::Fill); @@ -666,7 +666,7 @@ impl Settings { .spacing(theme.space.md) .into() }) - .max_width(MenuSize::Medium) + .width(MenuSize::Medium) .into() } @@ -826,7 +826,7 @@ fn quick_settings_section<'a>( if let Some((before_button, before_menu)) = before.take() { section = section.push( - row![before_button, horizontal_space()] + row![before_button, space::horizontal()] .width(Length::Fill) .spacing(theme.space.xs), ); diff --git a/src/modules/settings/network.rs b/src/modules/settings/network.rs index 387c37b0..3c37a4eb 100644 --- a/src/modules/settings/network.rs +++ b/src/modules/settings/network.rs @@ -12,13 +12,12 @@ use crate::{ theme::AshellTheme, utils::IndicatorState, }; -use iced::{ - Alignment, Element, Length, Subscription, Task, Theme, +use iced_layershell::{ + Alignment, Element, Length, Padding, Subscription, SurfaceId, Task, Theme, widget::{ - Column, MouseArea, button, column, container, horizontal_rule, row, scrollable, text, + Column, MouseArea, button, column, container, row, rule, scrollable, text, toggler, }, - window::Id, }; use log::{info, warn}; @@ -43,7 +42,7 @@ fn get_connectivity_color( connectivity: ConnectivityState, indicator_state: IndicatorState, theme: &Theme, -) -> Option { +) -> Option { match (connectivity, indicator_state) { (ConnectivityState::Full, IndicatorState::Warning) => { Some(theme.extended_palette().danger.weak.color) @@ -109,10 +108,10 @@ pub enum Message { Event(ServiceEvent), ToggleWiFi, ScanNearByWiFi, - WiFiMore(Id), - VpnMore(Id), + WiFiMore(SurfaceId), + VpnMore(SurfaceId), SelectAccessPoint(AccessPoint), - RequestWiFiPassword(Id, String), + RequestWiFiPassword(SurfaceId, String), ConfirmOpenNetwork(String), ToggleVpn(Vpn), ToggleAirplaneMode, @@ -128,13 +127,13 @@ pub enum Message { pub enum Action { None, RequestPasswordForSSID(String), - RequestPassword(Id, String), + RequestPassword(SurfaceId, String), ConfirmOpenNetwork(String), Command(Task), ToggleWifiMenu, ToggleVpnMenu, CloseSubMenu(Task), - CloseMenu(Id), + CloseMenu(SurfaceId), } #[derive(Debug, Clone)] @@ -419,7 +418,7 @@ impl NetworkSettings { pub fn wifi_quick_setting_button<'a>( &'a self, - id: Id, + id: SurfaceId, theme: &'a AshellTheme, sub_menu: Option, ) -> Option<(Element<'a, Message>, Option>)> { @@ -465,7 +464,7 @@ impl NetworkSettings { pub fn vpn_quick_setting_button<'a>( &'a self, - id: Id, + id: SurfaceId, theme: &'a AshellTheme, sub_menu: Option, ) -> Option<(Element<'a, Message>, Option>)> { @@ -566,7 +565,7 @@ impl NetworkSettings { fn wifi_menu<'a>( service: &'a NetworkService, - id: Id, + id: SurfaceId, theme: &'a AshellTheme, active_connection: Option<(&str, u8)>, show_more_button: bool, @@ -585,7 +584,7 @@ impl NetworkSettings { .spacing(theme.space.xs) .width(Length::Fill) .align_y(Alignment::Center), - horizontal_rule(1), + rule::horizontal(1), container(scrollable( Column::with_children({ let (active_networks, inactive_networks): (Vec<_>, Vec<_>) = service @@ -657,7 +656,7 @@ impl NetworkSettings { if show_more_button { column!( main, - horizontal_rule(1), + rule::horizontal(1), button("More") .on_press(Message::WiFiMore(id)) .padding([theme.space.xxs, theme.space.sm]) @@ -673,7 +672,7 @@ impl NetworkSettings { fn vpn_menu<'a>( service: &'a NetworkService, - id: Id, + id: SurfaceId, theme: &'a AshellTheme, show_more_button: bool, ) -> Element<'a, Message> { @@ -716,7 +715,7 @@ impl NetworkSettings { .collect::>>(), ) .spacing(theme.space.xs) - .padding([0, theme.space.md, 0, theme.space.xs]); + .padding(Padding::default().right(theme.space.md).left(theme.space.xs)); let main = container(scrollable(vpn_list)) .height(Length::Shrink) @@ -725,7 +724,7 @@ impl NetworkSettings { if show_more_button { column!( main, - horizontal_rule(1), + rule::horizontal(1), button("More") .on_press(Message::VpnMore(id)) .padding([theme.space.xxs, theme.space.sm]) diff --git a/src/modules/settings/power.rs b/src/modules/settings/power.rs index d06d67ce..9c1eb87a 100644 --- a/src/modules/settings/power.rs +++ b/src/modules/settings/power.rs @@ -3,6 +3,7 @@ use std::convert; use crate::{ components::icons::{StaticIcon, icon}, config::{PeripheralIndicators, SettingsFormat}, + utils::PushMaybe, modules::settings::quick_setting_button, services::{ ReadOnlyService, Service, ServiceEvent, @@ -14,10 +15,10 @@ use crate::{ theme::AshellTheme, utils::{self, IndicatorState, format_duration}, }; -use iced::{ +use iced_layershell::{ Alignment, Element, Length, Subscription, Task, Theme, alignment::Vertical, - widget::{Column, Row, button, column, container, horizontal_rule, row, text}, + widget::{Column, Row, button, column, container, row, rule, text}, }; fn format_time_for_battery(battery: &BatteryData) -> String { @@ -184,7 +185,7 @@ impl PowerSettings { .on_press(Message::Shutdown) .width(Length::Fill) .style(theme.ghost_button_style()), - horizontal_rule(1), + rule::horizontal(1), button(row!(icon(StaticIcon::Logout), text("Logout")).spacing(theme.space.md)) .padding([theme.space.xxs, theme.space.sm]) .on_press(Message::Logout) @@ -407,7 +408,7 @@ impl PowerSettings { if !service.peripherals.is_empty() { button(indicator) - .padding([0, ashell_theme.space.sm]) + .padding([0.0, ashell_theme.space.sm]) .on_press(Message::TogglePeripheralMenu) .style(ashell_theme.settings_button_style()) .into() @@ -425,7 +426,7 @@ impl PowerSettings { Some(if service.peripherals.len() > 1 { button(indicator) - .padding([0, ashell_theme.space.sm]) + .padding([0.0, ashell_theme.space.sm]) .on_press(Message::TogglePeripheralMenu) .style(ashell_theme.settings_button_style()) .into() diff --git a/src/modules/system_info.rs b/src/modules/system_info.rs index 7fb3f3b5..edb178dd 100644 --- a/src/modules/system_info.rs +++ b/src/modules/system_info.rs @@ -3,11 +3,12 @@ use crate::{ config::{SystemInfoIndicator, SystemInfoModuleConfig}, menu::MenuSize, theme::AshellTheme, + utils::PushMaybe, }; -use iced::{ +use iced_layershell::{ Alignment, Element, Length, Subscription, Theme, time::every, - widget::{Column, Row, column, container, horizontal_rule, row, text}, + widget::{Column, Row, column, container, row, rule, text}, }; use itertools::Itertools; use std::time::{Duration, Instant}; @@ -306,7 +307,7 @@ impl SystemInfo { container( column!( text("System Info").size(theme.font_size.lg), - horizontal_rule(1), + rule::horizontal(1), Column::with_capacity(6) .push(Self::info_element( theme, @@ -382,11 +383,11 @@ impl SystemInfo { ]) })) .spacing(theme.space.xxs) - .padding([0, theme.space.xs]) + .padding([0.0, theme.space.xs]) ) .spacing(theme.space.xs), ) - .max_width(MenuSize::Medium) + .width(MenuSize::Medium) .into() } diff --git a/src/modules/tempo.rs b/src/modules/tempo.rs index ccd7cafe..f40e5311 100644 --- a/src/modules/tempo.rs +++ b/src/modules/tempo.rs @@ -3,16 +3,17 @@ use crate::{ config::{TempoModuleConfig, WeatherIndicator, WeatherLocation}, menu::MenuSize, theme::AshellTheme, + utils::PushMaybe, }; use chrono::{ DateTime, Datelike, Days, FixedOffset, Local, Months, NaiveDate, NaiveDateTime, TimeZone, Utc, Weekday, }; use chrono_tz::Tz; -use iced::{ +use iced_layershell::{ Background, Border, Degrees, Element, Length::{self, FillPortion}, - Rotation, Subscription, Theme, + Padding, Rotation, Subscription, Theme, alignment::{Horizontal, Vertical}, core::svg::Handle, futures::SinkExt, @@ -25,7 +26,7 @@ use iced::{ use itertools::izip; use log::{debug, warn}; use serde::{Deserialize, Deserializer}; -use std::{any::TypeId, time::Duration}; +use std::time::Duration; #[derive(Debug, Clone)] pub enum Message { @@ -240,7 +241,7 @@ impl Tempo { .push_maybe(self.weather(theme)) .spacing(theme.space.lg), ) - .max_width(MenuSize::XLarge) + .width(MenuSize::XLarge) .into() } @@ -589,7 +590,7 @@ impl Tempo { }) .collect::>() }) - .padding([0, 0, theme.space.md, 0,]) + .padding(Padding::default().bottom(theme.space.md)) .spacing(theme.space.sm) ) .direction(scrollable::Direction::Horizontal(Scrollbar::new())) @@ -670,28 +671,28 @@ impl Tempo { .scale_alpha(theme.opacity), ) .into(), - border: Border::default().rounded([ - if index == 0 { + border: Border::default().rounded(iced_layershell::border::Radius { + top_left: if index == 0 { theme.radius.lg } else { theme.radius.sm }, - if index == 0 { + top_right: if index == 0 { theme.radius.lg } else { theme.radius.sm }, - if index == data.daily.time.len() - 2 { + bottom_right: if index == data.daily.time.len() - 2 { theme.radius.lg } else { theme.radius.sm }, - if index == data.daily.time.len() - 2 { + bottom_left: if index == data.daily.time.len() - 2 { theme.radius.lg } else { theme.radius.sm }, - ]), + }), ..container::Style::default() }) .into() @@ -726,24 +727,20 @@ impl Tempo { Duration::from_secs(5) }; - let time_sub = Subscription::run_with_id( - TypeId::of::(), - channel(100, move |mut output| async move { + let time_sub = Subscription::run_with(interval, |interval| { + let interval = *interval; + channel(100, async move |mut output: iced_layershell::futures::channel::mpsc::Sender| { let mut interval = tokio::time::interval(interval); loop { interval.tick().await; output.send(Message::Update).await.ok(); } - }), - ); + }) + }); let weather_sub = self.config.weather_location.clone().map(|location| { - Subscription::run_with_id( - ( - TypeId::of::(), - format!("{:?}", self.config.weather_location), - "weather", - ), + Subscription::run_with(location, |location| { + let location = location.clone(); channel(100, async move |mut output| { let mut failed_attempt: u64 = 0; @@ -783,8 +780,8 @@ impl Tempo { failed_attempt += 1; tokio::time::sleep(Duration::from_secs(60 * failed_attempt)).await; } - }), - ) + }) + }) }); if let Some(weather_sub) = weather_sub { diff --git a/src/modules/tray.rs b/src/modules/tray.rs index 685269f2..edab0eaf 100644 --- a/src/modules/tray.rs +++ b/src/modules/tray.rs @@ -1,6 +1,7 @@ use crate::{ components::icons::{StaticIcon, icon}, menu::MenuSize, + utils::PushMaybe, services::{ ReadOnlyService, Service, ServiceEvent, tray::{ @@ -11,17 +12,16 @@ use crate::{ theme::AshellTheme, widgets::{ButtonUIRef, position_button}, }; -use iced::{ - Alignment, Element, Length, Subscription, Task, - widget::{Column, Image, Row, Svg, button, container, horizontal_rule, row, text, toggler}, - window::Id, +use iced_layershell::{ + Alignment, Element, Length, Padding, Subscription, SurfaceId, Task, + widget::{Column, Image, Row, Svg, button, container, row, rule, text, toggler}, }; use log::debug; #[derive(Debug, Clone)] pub enum Message { Event(Box>), - ToggleMenu(String, Id, ButtonUIRef), + ToggleMenu(String, SurfaceId, ButtonUIRef), ToggleSubmenu(i32), MenuSelected(String, i32), MenuOpened(String), @@ -29,7 +29,7 @@ pub enum Message { pub enum Action { None, - ToggleMenu(String, Id, ButtonUIRef), + ToggleMenu(String, SurfaceId, ButtonUIRef), TrayMenuCommand(Task), CloseTrayMenu(String), } @@ -153,7 +153,7 @@ impl TrayModule { .map(|menu| self.menu_voice(theme, name, menu)) .collect::>(), ) - .padding([0, 0, 0, theme.space.md]) + .padding(Padding::default().left(theme.space.md)) .spacing(theme.space.xxs), ) } else { @@ -169,12 +169,12 @@ impl TrayModule { .width(Length::Fill) .padding(theme.space.xs) .into(), - LayoutProps { type_: Some(t), .. } if t == "separator" => horizontal_rule(1).into(), + LayoutProps { type_: Some(t), .. } if t == "separator" => rule::horizontal(1).into(), _ => Row::new().into(), } } - pub fn view<'a>(&'a self, id: Id, theme: &'a AshellTheme) -> Option> { + pub fn view<'a>(&'a self, id: SurfaceId, theme: &'a AshellTheme) -> Option> { self.service .as_ref() .filter(|s| !s.data.is_empty()) @@ -194,7 +194,7 @@ impl TrayModule { Svg::new(handle.clone()) .height(Length::Fixed(theme.font_size.md as f32 + 2.)) .width(Length::Fixed(theme.font_size.md as f32 + 2.)) - .content_fit(iced::ContentFit::Cover), + .content_fit(iced_layershell::ContentFit::Cover), ), _ => icon(StaticIcon::Point).into(), }) @@ -230,7 +230,7 @@ impl TrayModule { _ => Column::new(), }, ) - .max_width(MenuSize::Medium) + .width(MenuSize::Medium) .into() } diff --git a/src/modules/updates.rs b/src/modules/updates.rs index 911c290b..24ee74f8 100644 --- a/src/modules/updates.rs +++ b/src/modules/updates.rs @@ -4,16 +4,15 @@ use crate::{ menu::MenuSize, theme::AshellTheme, }; -use iced::{ - Alignment, Element, Length, Subscription, Task, +use iced_layershell::{ + Alignment, Element, Length, Padding, Subscription, SurfaceId, Task, alignment::Horizontal, stream::channel, - widget::{Column, button, column, container, horizontal_rule, row, scrollable, text}, - window::Id, + widget::{Column, button, column, container, row, rule, scrollable, text}, }; use log::error; use serde::Deserialize; -use std::{any::TypeId, convert, process::Stdio, time::Duration}; +use std::{convert, process::Stdio, time::Duration}; use tokio::{process, time::sleep}; #[derive(Deserialize, Debug, Clone)] @@ -75,13 +74,13 @@ pub enum Message { MenuOpened, ToggleUpdatesList, CheckNow, - Update(Id), + Update(SurfaceId), } pub enum Action { None, CheckForUpdates(Task), - CloseMenu(Id, Task), + CloseMenu(SurfaceId, Task), } #[derive(Debug, Default, Clone, Eq, PartialEq)] @@ -177,10 +176,10 @@ impl Updates { content.into() } - pub fn menu_view<'a>(&'a self, id: Id, theme: &'a AshellTheme) -> Element<'a, Message> { + pub fn menu_view<'a>(&'a self, id: SurfaceId, theme: &'a AshellTheme) -> Element<'a, Message> { column!( if self.updates.is_empty() { - convert::Into::>::into( + convert::Into::>::into( container(text("Up to date ;)")).padding(theme.space.xs), ) } else { @@ -233,22 +232,17 @@ impl Updates { ) .into() }) - .collect::>>(), + .collect::>>(), ) .spacing(theme.space.xs) - .padding([ - 0, - theme.space.md, - 0, - theme.space.xs, - ]), + .padding(Padding::default().right(theme.space.md).left(theme.space.xs)), )) .max_height(300), ); } elements.into() }, - horizontal_rule(1), + rule::horizontal(1), self.update_buttons(id, theme), ) .width(MenuSize::Small) @@ -256,7 +250,7 @@ impl Updates { .into() } - fn update_buttons<'a>(&'a self, id: Id, theme: &'a AshellTheme) -> Element<'a, Message> { + fn update_buttons<'a>(&'a self, id: SurfaceId, theme: &'a AshellTheme) -> Element<'a, Message> { let mut buttons = column!().spacing(theme.space.xs); if !self.updates.is_empty() { @@ -284,11 +278,11 @@ impl Updates { pub fn subscription(&self) -> Subscription { let check_cmd = self.config.check_cmd.clone(); - let interval = Duration::from_secs(self.config.interval.max(60)); - let id = TypeId::of::(); + let interval_secs = self.config.interval.max(60); - Subscription::run_with_id( - (id, check_cmd.clone()), + Subscription::run_with((check_cmd, interval_secs), |data| { + let (check_cmd, interval_secs) = data.clone(); + let interval = Duration::from_secs(interval_secs); channel(10, async move |mut output| { loop { let updates = check_update_now(&check_cmd).await; @@ -297,7 +291,7 @@ impl Updates { sleep(interval).await; } - }), - ) + }) + }) } } diff --git a/src/modules/window_title.rs b/src/modules/window_title.rs index ab807973..eed387a7 100644 --- a/src/modules/window_title.rs +++ b/src/modules/window_title.rs @@ -4,7 +4,7 @@ use crate::{ theme::AshellTheme, utils::truncate_text, }; -use iced::{ +use iced_layershell::{ Element, Subscription, widget::{container, text}, }; diff --git a/src/modules/workspaces.rs b/src/modules/workspaces.rs index 189bcf36..5798cf68 100644 --- a/src/modules/workspaces.rs +++ b/src/modules/workspaces.rs @@ -7,10 +7,9 @@ use crate::{ }, theme::AshellTheme, }; -use iced::{ - Element, Length, Subscription, alignment, +use iced_layershell::{ + Element, Length, Subscription, SurfaceId, alignment, widget::{MouseArea, Row, button, container, text}, - window::Id, }; use itertools::Itertools; use std::collections::HashMap; @@ -250,7 +249,7 @@ impl Workspaces { } } - pub fn update(&mut self, message: Message) -> iced::Task { + pub fn update(&mut self, message: Message) -> iced_layershell::Task { match message { Message::ServiceEvent(event) => { match event { @@ -266,7 +265,7 @@ impl Workspaces { } _ => {} } - iced::Task::none() + iced_layershell::Task::none() } Message::ChangeWorkspace(id) => { if let Some(service) = &mut self.service { @@ -290,7 +289,7 @@ impl Workspaces { } } } - iced::Task::none() + iced_layershell::Task::none() } Message::ToggleSpecialWorkspace(id) => { if let Some(service) = &mut self.service @@ -306,7 +305,7 @@ impl Workspaces { )) .map(Message::ServiceEvent); } - iced::Task::none() + iced_layershell::Task::none() } Message::Scroll(direction) => { self.scroll_accumulator = 0.; @@ -317,14 +316,14 @@ impl Workspaces { .command(CompositorCommand::ScrollWorkspace(direction)) .map(Message::ServiceEvent); } - return iced::Task::none();*/ + return iced_layershell::Task::none();*/ let current_workspace = self .ui_workspaces .iter() .find(|w| w.displayed == Displayed::Active); let Some(current_workspace_id) = current_workspace.map(|w| w.id) else { - return iced::Task::none(); + return iced_layershell::Task::none(); }; let current_monitor = current_workspace @@ -374,12 +373,12 @@ impl Workspaces { if let Some(next) = next_workspace { return self.update(Message::ChangeWorkspace(next.id)); } - iced::Task::none() + iced_layershell::Task::none() } Message::ConfigReloaded(cfg) => { self.config = cfg; self.recalculate_ui_workspaces(); - iced::Task::none() + iced_layershell::Task::none() } Message::ScrollAccumulator(value) => { if value == 0. { @@ -388,7 +387,7 @@ impl Workspaces { self.scroll_accumulator += value; } - iced::Task::none() + iced_layershell::Task::none() } } } @@ -401,7 +400,7 @@ impl Workspaces { pub fn view<'a>( &'a self, - id: Id, + id: SurfaceId, theme: &'a AshellTheme, outputs: &Outputs, ) -> Element<'a, Message> { @@ -455,12 +454,12 @@ impl Workspaces { .style(theme.workspace_button_style(empty, color)) .padding(if w.id < 0 { match w.displayed { - Displayed::Active => [0, theme.space.md], - Displayed::Visible => [0, theme.space.sm], - Displayed::Hidden => [0, theme.space.xs], + Displayed::Active => [0.0, theme.space.md], + Displayed::Visible => [0.0, theme.space.sm], + Displayed::Hidden => [0.0, theme.space.xs], } } else { - [0, 0] + [0.0, 0.0] }) .on_press(if w.id > 0 { Message::ChangeWorkspace(w.id) @@ -485,14 +484,14 @@ impl Workspaces { .spacing(theme.space.xxs), ) .on_scroll(move |direction| match direction { - iced::mouse::ScrollDelta::Lines { y, .. } => { + iced_layershell::mouse::ScrollDelta::Lines { y, .. } => { if y < 0. { Message::Scroll(-1) } else { Message::Scroll(1) } } - iced::mouse::ScrollDelta::Pixels { y, .. } => { + iced_layershell::mouse::ScrollDelta::Pixels { y, .. } => { let sensibility = 3.; if self.scroll_accumulator.abs() < sensibility { diff --git a/src/outputs.rs b/src/outputs.rs index 953e9e49..3d9af9c5 100644 --- a/src/outputs.rs +++ b/src/outputs.rs @@ -1,14 +1,9 @@ -use iced::{ - Task, - platform_specific::shell::commands::layer_surface::{ - Anchor, KeyboardInteractivity, Layer, destroy_layer_surface, get_layer_surface, set_anchor, - set_exclusive_zone, set_keyboard_interactivity, set_size, - }, - runtime::platform_specific::wayland::layer_surface::{IcedOutput, SctkLayerSurfaceSettings}, - window::Id, +use iced_layershell::{ + Anchor, KeyboardInteractivity, Layer, LayerShellSettings, OutputId, SurfaceId, Task, + destroy_layer_surface, new_layer_surface, set_anchor, set_exclusive_zone, + set_keyboard_interactivity, set_size, }; use log::debug; -use wayland_client::protocol::wl_output::WlOutput; use crate::{ HEIGHT, @@ -19,7 +14,7 @@ use crate::{ #[derive(Debug, Clone)] pub struct ShellInfo { - pub id: Id, + pub id: SurfaceId, pub position: Position, pub layer: config::Layer, pub style: AppearanceStyle, @@ -28,7 +23,7 @@ pub struct ShellInfo { } #[derive(Debug, Clone)] -pub struct Outputs(Vec<(String, Option, Option)>); +pub struct Outputs(Vec<(String, Option, Option)>); pub enum HasOutput<'a> { Main, @@ -36,23 +31,31 @@ pub enum HasOutput<'a> { } impl Outputs { - pub fn iter(&self) -> std::slice::Iter<'_, (String, Option, Option)> { + pub fn iter(&self) -> std::slice::Iter<'_, (String, Option, Option)> { self.0.iter() } + pub fn new( style: AppearanceStyle, position: Position, layer: config::Layer, scale_factor: f64, ) -> (Self, Task) { - let (id, menu_id, task) = - Self::create_output_layers(style, None, position, layer, scale_factor); + // The MAIN surface is pre-created by the framework via .layer_shell() in main.rs + // We only need to create the menu overlay surface + let (menu_id, menu_task) = new_layer_surface(LayerShellSettings { + anchor: Anchor::TOP | Anchor::BOTTOM | Anchor::LEFT | Anchor::RIGHT, + layer: Layer::Background, + keyboard_interactivity: KeyboardInteractivity::None, + namespace: "ashell-menu-layer".into(), + ..Default::default() + }); ( Self(vec![( "Fallback".to_string(), Some(ShellInfo { - id, + id: SurfaceId::MAIN, menu: Menu::new(menu_id), position, layer, @@ -61,11 +64,11 @@ impl Outputs { }), None, )]), - task, + menu_task, ) } - fn get_height(style: AppearanceStyle, scale_factor: f64) -> f64 { + pub fn get_height(style: AppearanceStyle, scale_factor: f64) -> f64 { (HEIGHT - match style { AppearanceStyle::Solid | AppearanceStyle::Gradient => 8., @@ -76,12 +79,11 @@ impl Outputs { pub fn create_output_layers( style: AppearanceStyle, - wl_output: Option, + output_id: Option, position: Position, layer: config::Layer, scale_factor: f64, - ) -> (Id, Id, Task) { - let id = Id::unique(); + ) -> (SurfaceId, SurfaceId, Task) { let height = Self::get_height(style, scale_factor); let iced_layer = match layer { @@ -90,16 +92,13 @@ impl Outputs { config::Layer::Overlay => Layer::Overlay, }; - let task = get_layer_surface(SctkLayerSurfaceSettings { - id, + let (id, main_task) = new_layer_surface(LayerShellSettings { namespace: "ashell-main-layer".to_string(), - size: Some((None, Some(height as u32))), + size: Some((0, height as u32)), layer: iced_layer, keyboard_interactivity: KeyboardInteractivity::None, exclusive_zone: height as i32, - output: wl_output.clone().map_or(IcedOutput::Active, |wl_output| { - IcedOutput::Output(wl_output) - }), + output: output_id, anchor: match position { Position::Top => Anchor::TOP, Position::Bottom => Anchor::BOTTOM, @@ -108,21 +107,17 @@ impl Outputs { ..Default::default() }); - let menu_id = Id::unique(); - let menu_task = get_layer_surface(SctkLayerSurfaceSettings { - id: menu_id, - namespace: "ashell-main-layer".to_string(), - size: Some((None, None)), + let (menu_id, menu_task) = new_layer_surface(LayerShellSettings { + namespace: "ashell-menu-layer".to_string(), + size: None, layer: Layer::Background, keyboard_interactivity: KeyboardInteractivity::None, - output: wl_output.map_or(IcedOutput::Active, |wl_output| { - IcedOutput::Output(wl_output) - }), + output: output_id, anchor: Anchor::TOP | Anchor::BOTTOM | Anchor::LEFT | Anchor::RIGHT, ..Default::default() }); - (id, menu_id, Task::batch(vec![task, menu_task])) + (id, menu_id, Task::batch(vec![main_task, menu_task])) } fn name_in_config(name: &str, outputs: &config::Outputs) -> bool { @@ -135,7 +130,7 @@ impl Outputs { } } - pub fn has(&'_ self, id: Id) -> Option> { + pub fn has(&'_ self, id: SurfaceId) -> Option> { self.0.iter().find_map(|(_, info, _)| { info.as_ref().and_then(|info| { if info.id == id { @@ -149,7 +144,7 @@ impl Outputs { }) } - pub fn get_monitor_name(&self, id: Id) -> Option<&str> { + pub fn get_monitor_name(&self, id: SurfaceId) -> Option<&str> { self.0.iter().find_map(|(name, info, _)| { info.as_ref().and_then(|info| { if info.id == id { @@ -175,7 +170,7 @@ impl Outputs { position: Position, layer: config::Layer, name: &str, - wl_output: WlOutput, + output_id: OutputId, scale_factor: f64, ) -> Task { let target = Self::name_in_config(name, request_outputs); @@ -185,7 +180,7 @@ impl Outputs { let (id, menu_id, task) = Self::create_output_layers( style, - Some(wl_output.clone()), + Some(output_id), position, layer, scale_factor, @@ -218,7 +213,7 @@ impl Outputs { style, scale_factor, }), - Some(wl_output), + Some(output_id), )); // remove fallback layer surface @@ -252,7 +247,7 @@ impl Outputs { name, request_outputs ); - self.0.push((name.to_owned(), None, Some(wl_output))); + self.0.push((name.to_owned(), None, Some(output_id))); Task::none() } @@ -263,18 +258,18 @@ impl Outputs { style: AppearanceStyle, position: Position, layer: config::Layer, - wl_output: WlOutput, + output_id: OutputId, scale_factor: f64, ) -> Task { - match self.0.iter().position(|(_, _, assigned_wl_output)| { - assigned_wl_output + match self.0.iter().position(|(_, _, assigned_output_id)| { + assigned_output_id .as_ref() - .is_some_and(|assigned_wl_output| *assigned_wl_output == wl_output) + .is_some_and(|assigned| *assigned == output_id) }) { Some(index_to_remove) => { debug!("Removing layer surface for output"); - let (name, shell_info, wl_output) = self.0.swap_remove(index_to_remove); + let (name, shell_info, output_id) = self.0.swap_remove(index_to_remove); let destroy_task = if let Some(shell_info) = shell_info { let destroy_main_task = destroy_layer_surface(shell_info.id); @@ -285,7 +280,7 @@ impl Outputs { Task::none() }; - self.0.push((name, None, wl_output)); + self.0.push((name, None, output_id)); if self.0.iter().any(|(_, shell_info, _)| shell_info.is_some()) { Task::batch(vec![destroy_task]) @@ -328,23 +323,22 @@ impl Outputs { let to_remove = self .0 .iter() - .filter_map(|(name, shell_info, wl_output)| { + .filter_map(|(name, shell_info, output_id)| { if !Self::name_in_config(name, request_outputs) && shell_info.is_some() { - Some(wl_output.clone()) + *output_id } else { None } }) - .flatten() .collect::>(); debug!("Removing outputs: {to_remove:?}"); let to_add = self .0 .iter() - .filter_map(|(name, shell_info, wl_output)| { + .filter_map(|(name, shell_info, output_id)| { if Self::name_in_config(name, request_outputs) && shell_info.is_none() { - Some((name.clone(), wl_output.clone())) + Some((name.clone(), *output_id)) } else { None } @@ -354,22 +348,22 @@ impl Outputs { let mut tasks = Vec::new(); - for (name, wl_output) in to_add { - if let Some(wl_output) = wl_output { + for (name, output_id) in to_add { + if let Some(output_id) = output_id { tasks.push(self.add( style, request_outputs, position, layer, name.as_str(), - wl_output, + output_id, scale_factor, )); } } - for wl_output in to_remove { - tasks.push(self.remove(style, position, layer, wl_output, scale_factor)); + for output_id in to_remove { + tasks.push(self.remove(style, position, layer, output_id, scale_factor)); } for shell_info in self.0.iter_mut().filter_map(|(_, shell_info, _)| { @@ -397,7 +391,7 @@ impl Outputs { } // Handle layer changes - only recreate surfaces when layer actually changes - for (_name, shell_info, wl_output) in &mut self.0 { + for (_name, shell_info, output_id) in &mut self.0 { if let Some(shell_info) = shell_info && shell_info.layer != layer { @@ -406,7 +400,7 @@ impl Outputs { let (id, menu_id, task) = Self::create_output_layers( style, - wl_output.clone(), + *output_id, position, layer, scale_factor, @@ -444,7 +438,7 @@ impl Outputs { shell_info.scale_factor = scale_factor; let height = Self::get_height(style, scale_factor); tasks.push(Task::batch(vec![ - set_size(shell_info.id, None, Some(height as u32)), + set_size(shell_info.id, (0, height as u32)), set_exclusive_zone(shell_info.id, height as i32), ])); } @@ -463,7 +457,7 @@ impl Outputs { pub fn toggle_menu( &mut self, - id: Id, + id: SurfaceId, menu_type: MenuType, button_ui_ref: ButtonUIRef, request_keyboard: bool, @@ -518,7 +512,7 @@ impl Outputs { pub fn close_menu( &mut self, - id: Id, + id: SurfaceId, esc_button_enabled: bool, ) -> Task { let task = match self.0.iter_mut().find(|(_, shell_info, _)| { @@ -541,7 +535,7 @@ impl Outputs { pub fn close_menu_if( &mut self, - id: Id, + id: SurfaceId, menu_type: MenuType, esc_button_enabled: bool, ) -> Task { @@ -631,7 +625,7 @@ impl Outputs { } } - pub fn request_keyboard(&self, id: Id) -> Task { + pub fn request_keyboard(&self, id: SurfaceId) -> Task { match self.0.iter().find(|(_, shell_info, _)| { shell_info.as_ref().map(|shell_info| shell_info.id) == Some(id) || shell_info.as_ref().map(|shell_info| shell_info.menu.id) == Some(id) @@ -641,7 +635,7 @@ impl Outputs { } } - pub fn release_keyboard(&self, id: Id) -> Task { + pub fn release_keyboard(&self, id: SurfaceId) -> Task { match self.0.iter().find(|(_, shell_info, _)| { shell_info.as_ref().map(|shell_info| shell_info.id) == Some(id) || shell_info.as_ref().map(|shell_info| shell_info.menu.id) == Some(id) diff --git a/src/password_dialog.rs b/src/password_dialog.rs index edd4261d..024cf957 100644 --- a/src/password_dialog.rs +++ b/src/password_dialog.rs @@ -1,24 +1,24 @@ use crate::{ components::icons::{StaticIcon, icon}, theme::AshellTheme, + utils::PushMaybe, }; -use iced::{ - Alignment, Element, Length, +use iced_layershell::{ + Alignment, Element, Length, SurfaceId, alignment::Vertical, - widget::{button, column, container, horizontal_space, row, text, text_input}, - window::Id, + widget::{button, column, container, row, space, text, text_input}, }; #[derive(Debug, Clone)] pub enum Message { PasswordChanged(String), TogglePasswordVisibility, - DialogConfirmed(Id), - DialogCancelled(Id), + DialogConfirmed(SurfaceId), + DialogCancelled(SurfaceId), } pub fn view<'a>( - id: Id, + id: SurfaceId, theme: &'a AshellTheme, wifi_ssid: &str, current_password: &str, @@ -89,7 +89,7 @@ Do you want to connect anyway?", ) .push( row!( - horizontal_space(), + space::horizontal(), button(text("Cancel").align_y(Vertical::Center)) .padding([theme.space.xxs, theme.space.xl]) .style(theme.outline_button_style()) diff --git a/src/services/audio.rs b/src/services/audio.rs index 5ec4a536..8688465a 100644 --- a/src/services/audio.rs +++ b/src/services/audio.rs @@ -1,6 +1,6 @@ use super::{ReadOnlyService, Service, ServiceEvent}; -use crate::{services::throttle::ThrottleExt, utils::remote_value::Remote}; -use iced::{ +use crate::utils::remote_value::Remote; +use iced_layershell::{ Subscription, Task, futures::{SinkExt, StreamExt, channel::mpsc::Sender, stream::pending}, stream::channel, @@ -31,7 +31,6 @@ use std::{ time::Duration, }; use tokio::sync::mpsc::{UnboundedReceiver, UnboundedSender}; -use tokio_stream::wrappers::UnboundedReceiverStream; #[derive(Debug, Clone)] pub struct Device { @@ -131,7 +130,6 @@ impl DerefMut for AudioService { struct PulseAudioServerHandle { _listener: JoinHandle<()>, - _commander: JoinHandle<()>, receiver: UnboundedReceiver, sender: UnboundedSender, } @@ -307,19 +305,16 @@ impl ReadOnlyService for AudioService { } } - fn subscribe() -> iced::Subscription> { - let id = TypeId::of::(); - - Subscription::run_with_id( - id, + fn subscribe() -> iced_layershell::Subscription> { + Subscription::run_with(TypeId::of::(), |_| { channel(100, async |mut output| { let mut state = State::Init; loop { state = AudioService::start_listening(state, &mut output).await; } - }), - ) + }) + }) } } @@ -383,7 +378,7 @@ impl Service for AudioService { } } - iced::Task::none() + iced_layershell::Task::none() } } @@ -457,27 +452,16 @@ impl PulseAudioServer { let (from_server_tx, from_server_rx) = tokio::sync::mpsc::unbounded_channel(); let (to_server_tx, to_server_rx) = tokio::sync::mpsc::unbounded_channel(); - let listener = Self::start_listener(from_server_tx.clone()).await?; - let commander = Self::start_commander(from_server_tx.clone(), to_server_rx).await?; - - Ok(PulseAudioServerHandle { - _listener: listener, - _commander: commander, - receiver: from_server_rx, - sender: to_server_tx, - }) - } - - async fn start_listener( - from_server_tx: UnboundedSender, - ) -> anyhow::Result> { - let (tx, mut rx) = tokio::sync::mpsc::unbounded_channel(); + let (init_tx, mut init_rx) = tokio::sync::mpsc::unbounded_channel(); + // Single thread for both listening and commanding — avoids PulseAudio + // mainloop assertion failures from concurrent connections. let handle = thread::spawn({ let from_server_tx = from_server_tx.clone(); + let mut to_server_rx = to_server_rx; move || match Self::new() { Ok(mut server) => { - let _ = tx.send(true); + let _ = init_tx.send(true); server.context.subscribe( InterestMaskSet::SERVER @@ -570,80 +554,65 @@ impl PulseAudioServer { }, ))); + // Main loop: iterate PulseAudio and process commands on the same thread + let mut cmd_introspector = server.context.introspect(); loop { - let data = server.mainloop.iterate(true); + // Non-blocking iterate to allow processing commands + let data = server.mainloop.iterate(false); if let IterateResult::Quit(_) | IterateResult::Err(_) = data { error!("PulseAudio mainloop error"); + break; } - } - } - Err(e) => { - error!("Failed to start PulseAudio listener thread: {e}"); - let _ = tx.send(false); - } - } - }); - - match rx.recv().await { - Some(true) => Ok(handle), - _ => Err(anyhow::anyhow!( - "Failed to start PulseAudio listener thread" - )), - } - } - async fn start_commander( - from_server_tx: UnboundedSender, - to_server_rx: UnboundedReceiver, - ) -> anyhow::Result> { - let (tx, mut rx) = tokio::sync::mpsc::unbounded_channel(); - - let handle = thread::spawn(move || { - tokio::runtime::Builder::new_current_thread() - .enable_time() - .build() - .unwrap() - .block_on(async move { - match Self::new() { - Ok(mut server) => { - let _ = tx.send(true); - let mut stream = UnboundedReceiverStream::new(to_server_rx) - .throttle(Duration::from_millis(100)); - while let Some(cmd) = stream.next().await { - match cmd { - PulseAudioCommand::SinkMute(name, mute) => { - let _ = server.set_sink_mute(&name, mute); - } - PulseAudioCommand::SourceMute(name, mute) => { - let _ = server.set_source_mute(&name, mute); - } - PulseAudioCommand::SinkVolume(name, volume) => { - let _ = server.set_sink_volume(&name, &volume); - } - PulseAudioCommand::SourceVolume(name, volume) => { - let _ = server.set_source_volume(&name, &volume); - } - PulseAudioCommand::DefaultSink(name, port) => { - let _ = server.set_default_sink(&name, port.as_deref()); + // Process any pending commands + while let Ok(cmd) = to_server_rx.try_recv() { + match cmd { + PulseAudioCommand::SinkMute(name, mute) => { + cmd_introspector.set_sink_mute_by_name(&name, mute, None); + } + PulseAudioCommand::SourceMute(name, mute) => { + cmd_introspector.set_source_mute_by_name(&name, mute, None); + } + PulseAudioCommand::SinkVolume(name, volume) => { + cmd_introspector.set_sink_volume_by_name(&name, &volume, None); + } + PulseAudioCommand::SourceVolume(name, volume) => { + cmd_introspector.set_source_volume_by_name(&name, &volume, None); + } + PulseAudioCommand::DefaultSink(name, port) => { + server.context.set_default_sink(&name, |_| {}); + if let Some(port) = port { + cmd_introspector.set_sink_port_by_name(&name, &port, None); } - PulseAudioCommand::DefaultSource(name, port) => { - let _ = server.set_default_source(&name, port.as_deref()); + } + PulseAudioCommand::DefaultSource(name, port) => { + server.context.set_default_source(&name, |_| {}); + if let Some(port) = port { + cmd_introspector.set_source_port_by_name(&name, &port, None); } } } } - Err(e) => { - error!("Failed to start PulseAudio server: {e}"); - let _ = from_server_tx.send(PulseAudioServerEvent::Error); - } + + // Brief sleep to avoid busy-spinning + std::thread::sleep(Duration::from_millis(10)); } - }) + } + Err(e) => { + error!("Failed to start PulseAudio thread: {e}"); + let _ = init_tx.send(false); + } + } }); - match rx.recv().await { - Some(true) => Ok(handle), + match init_rx.recv().await { + Some(true) => Ok(PulseAudioServerHandle { + _listener: handle, + receiver: from_server_rx, + sender: to_server_tx, + }), _ => Err(anyhow::anyhow!( - "Failed to start PulseAudio commander thread" + "Failed to start PulseAudio thread" )), } } diff --git a/src/services/bluetooth/mod.rs b/src/services/bluetooth/mod.rs index 0e0c78d5..a4504325 100644 --- a/src/services/bluetooth/mod.rs +++ b/src/services/bluetooth/mod.rs @@ -1,6 +1,6 @@ use super::{ReadOnlyService, Service, ServiceEvent}; use dbus::{BatteryProxy, BluetoothDbus, DeviceProxy}; -use iced::{ +use iced_layershell::{ Subscription, Task, futures::{SinkExt, Stream, StreamExt, channel::mpsc::Sender, stream::pending, stream_select}, stream::channel, @@ -145,15 +145,15 @@ impl BluetoothService { } let battery_events = if batteries.is_empty() { - iced::futures::stream::pending().boxed() + iced_layershell::futures::stream::pending().boxed() } else { - iced::futures::stream::select_all(batteries).boxed() + iced_layershell::futures::stream::select_all(batteries).boxed() }; let device_property_events = if device_properties.is_empty() { - iced::futures::stream::pending().boxed() + iced_layershell::futures::stream::pending().boxed() } else { - iced::futures::stream::select_all(device_properties).boxed() + iced_layershell::futures::stream::select_all(device_properties).boxed() }; Box::pin(stream_select!( @@ -292,18 +292,15 @@ impl ReadOnlyService for BluetoothService { } fn subscribe() -> Subscription> { - let id = TypeId::of::(); - - Subscription::run_with_id( - id, + Subscription::run_with(TypeId::of::(), |_| { channel(100, async |mut output| { let mut state = State::Init; loop { state = BluetoothService::start_listening(state, &mut output).await; } - }), - ) + }) + }) } } diff --git a/src/services/brightness.rs b/src/services/brightness.rs index b76b45f7..c9917716 100644 --- a/src/services/brightness.rs +++ b/src/services/brightness.rs @@ -1,6 +1,6 @@ use super::{ReadOnlyService, Service, ServiceEvent}; use crate::{services::throttle::ThrottleExt, utils::remote_value::Remote}; -use iced::{ +use iced_layershell::{ Subscription, Task, futures::{SinkExt, StreamExt, channel::mpsc::Sender, stream::pending}, stream::channel, @@ -276,18 +276,15 @@ impl ReadOnlyService for BrightnessService { } fn subscribe() -> Subscription> { - let id = TypeId::of::(); - - Subscription::run_with_id( - id, + Subscription::run_with(TypeId::of::(), |_| { channel(100, async |mut output| { let mut state = State::Init; loop { state = BrightnessService::start_listening(state, &mut output).await; } - }), - ) + }) + }) } } diff --git a/src/services/compositor/mod.rs b/src/services/compositor/mod.rs index 5ff88014..80d06330 100644 --- a/src/services/compositor/mod.rs +++ b/src/services/compositor/mod.rs @@ -7,8 +7,8 @@ pub use self::types::{ }; use crate::services::{ReadOnlyService, Service, ServiceEvent}; -use iced::futures::SinkExt; -use iced::{Subscription, Task, stream::channel}; +use iced_layershell::futures::SinkExt; +use iced_layershell::{Subscription, Task, stream::channel}; use std::{any::TypeId, ops::Deref, sync::OnceLock}; use tokio::sync::{OnceCell, broadcast}; @@ -86,8 +86,7 @@ impl ReadOnlyService for CompositorService { } fn subscribe() -> Subscription> { - Subscription::run_with_id( - TypeId::of::(), + Subscription::run_with(TypeId::of::(), |_| { channel(10, async move |mut output| { let mut rx = broadcaster_subscribe().await; @@ -121,8 +120,8 @@ impl ReadOnlyService for CompositorService { } } } - }), - ) + }) + }) } } diff --git a/src/services/logind.rs b/src/services/logind.rs index b0881d8f..f4709528 100644 --- a/src/services/logind.rs +++ b/src/services/logind.rs @@ -1,5 +1,5 @@ use super::{ReadOnlyService, ServiceEvent}; -use iced::{ +use iced_layershell::{ Subscription, futures::{SinkExt, StreamExt}, stream::channel, @@ -20,10 +20,7 @@ impl ReadOnlyService for LogindService { fn update(&mut self, _event: Self::UpdateEvent) {} fn subscribe() -> Subscription> { - let id = TypeId::of::(); - - Subscription::run_with_id( - id, + Subscription::run_with(TypeId::of::(), |_| { channel(100, async move |mut output| { let connection = match Connection::system().await { Ok(conn) => conn, @@ -61,8 +58,8 @@ impl ReadOnlyService for LogindService { let _ = output.send(ServiceEvent::Update(ResumeEvent)).await; } } - }), - ) + }) + }) } } diff --git a/src/services/mod.rs b/src/services/mod.rs index d86d9b44..be1be925 100644 --- a/src/services/mod.rs +++ b/src/services/mod.rs @@ -1,4 +1,4 @@ -use iced::{Subscription, Task}; +use iced_layershell::{Subscription, Task}; pub mod audio; pub mod bluetooth; diff --git a/src/services/mpris/mod.rs b/src/services/mpris/mod.rs index 54431b5d..f40f52e8 100644 --- a/src/services/mpris/mod.rs +++ b/src/services/mpris/mod.rs @@ -1,8 +1,8 @@ use super::{ReadOnlyService, Service, ServiceEvent}; use dbus::MprisPlayerProxy; -use iced::{ +use iced_layershell::{ Subscription, - core::image::Bytes, + core::Bytes, futures::{ FutureExt, SinkExt, Stream, StreamExt, channel::mpsc::Sender, @@ -167,18 +167,15 @@ impl ReadOnlyService for MprisPlayerService { } fn subscribe() -> Subscription> { - let id = TypeId::of::(); - - Subscription::run_with_id( - id, + Subscription::run_with(TypeId::of::(), |_| { channel(10, async |mut output| { let mut state = State::Init; loop { - state = Self::start_listening(state, &mut output).await; + state = MprisPlayerService::start_listening(state, &mut output).await; } - }), - ) + }) + }) } } @@ -514,7 +511,7 @@ pub enum PlayerCommand { impl Service for MprisPlayerService { type Command = MprisPlayerCommand; - fn command(&mut self, command: Self::Command) -> iced::Task> { + fn command(&mut self, command: Self::Command) -> iced_layershell::Task> { { let names: Vec = self.data.iter().map(|d| d.service.clone()).collect(); let s = self.data.iter().find(|d| d.service == command.service_name); @@ -522,7 +519,7 @@ impl Service for MprisPlayerService { if let Some(s) = s { let mpris_player_proxy = s.proxy.clone(); let conn = self.conn.clone(); - iced::Task::perform( + iced_layershell::Task::perform( async move { match command.command { PlayerCommand::Prev => { @@ -555,7 +552,7 @@ impl Service for MprisPlayerService { ServiceEvent::Update, ) } else { - iced::Task::none() + iced_layershell::Task::none() } } } diff --git a/src/services/network/dbus.rs b/src/services/network/dbus.rs index 14606b59..3c8c8d53 100644 --- a/src/services/network/dbus.rs +++ b/src/services/network/dbus.rs @@ -4,7 +4,7 @@ use crate::services::{ }; use super::{AccessPoint, ActiveConnectionInfo, KnownConnection, Vpn}; -use iced::futures::{Stream, StreamExt, stream::select_all}; +use iced_layershell::futures::{Stream, StreamExt, stream::select_all}; use itertools::Itertools; use log::{debug, warn}; use std::{collections::HashMap, ops::Deref}; diff --git a/src/services/network/iwd_dbus/mod.rs b/src/services/network/iwd_dbus/mod.rs index 17e93075..22c786f9 100644 --- a/src/services/network/iwd_dbus/mod.rs +++ b/src/services/network/iwd_dbus/mod.rs @@ -25,9 +25,9 @@ use zbus::interface; use super::dbus::DeviceState; use super::{AccessPoint, ActiveConnectionInfo, KnownConnection, NetworkBackend, NetworkEvent}; -use iced::futures::future::join_all; -use iced::futures::stream::select_all; -use iced::futures::{Stream, StreamExt}; +use iced_layershell::futures::future::join_all; +use iced_layershell::futures::stream::select_all; +use iced_layershell::futures::{Stream, StreamExt}; use log::{debug, info, warn}; use std::collections::HashMap; diff --git a/src/services/network/mod.rs b/src/services/network/mod.rs index 2ab6bd0d..84ea3f91 100644 --- a/src/services/network/mod.rs +++ b/src/services/network/mod.rs @@ -2,9 +2,9 @@ use super::{Service, ServiceEvent}; use crate::services::ReadOnlyService; use dbus::ConnectivityState; use dbus::NetworkDbus; -use iced::futures::TryFutureExt; -use iced::futures::stream::pending; -use iced::{ +use iced_layershell::futures::TryFutureExt; +use iced_layershell::futures::stream::pending; +use iced_layershell::{ Subscription, Task, futures::{SinkExt, StreamExt, channel::mpsc::Sender}, stream::channel, @@ -279,18 +279,15 @@ impl ReadOnlyService for NetworkService { } fn subscribe() -> Subscription> { - let id = TypeId::of::(); - - Subscription::run_with_id( - id, + Subscription::run_with(TypeId::of::(), |_| { channel(50, async |mut output| { let mut state = State::Init; loop { state = NetworkService::start_listening(state, &mut output).await; } - }), - ) + }) + }) } } diff --git a/src/services/privacy.rs b/src/services/privacy.rs index f7f22a7e..7c117880 100644 --- a/src/services/privacy.rs +++ b/src/services/privacy.rs @@ -1,5 +1,5 @@ use super::{ReadOnlyService, ServiceEvent}; -use iced::{ +use iced_layershell::{ Subscription, futures::{ FutureExt, SinkExt, Stream, StreamExt, channel::mpsc::Sender, select, stream::pending, @@ -286,18 +286,15 @@ impl ReadOnlyService for PrivacyService { } fn subscribe() -> Subscription> { - let id = TypeId::of::(); - - Subscription::run_with_id( - id, + Subscription::run_with(TypeId::of::(), |_| { channel(100, async |mut output| { let mut state = State::Init; loop { state = PrivacyService::start_listening(state, &mut output).await; } - }), - ) + }) + }) } } diff --git a/src/services/throttle.rs b/src/services/throttle.rs index 3f4ad40c..83871cac 100644 --- a/src/services/throttle.rs +++ b/src/services/throttle.rs @@ -1,4 +1,4 @@ -use iced::futures::{ +use iced_layershell::futures::{ Stream, task::{Context, Poll}, }; diff --git a/src/services/tray/dbus.rs b/src/services/tray/dbus.rs index b0a6a8e2..052423c2 100644 --- a/src/services/tray/dbus.rs +++ b/src/services/tray/dbus.rs @@ -1,4 +1,4 @@ -use iced::futures::StreamExt; +use iced_layershell::futures::StreamExt; use log::{info, warn}; use std::time::Duration; use zbus::{ diff --git a/src/services/tray/mod.rs b/src/services/tray/mod.rs index 90f874bc..6840742d 100644 --- a/src/services/tray/mod.rs +++ b/src/services/tray/mod.rs @@ -4,7 +4,7 @@ use dbus::{ StatusNotifierWatcherProxy, }; use freedesktop_icons::lookup; -use iced::{ +use iced_layershell::{ Subscription, Task, futures::{ SinkExt, Stream, StreamExt, @@ -658,19 +658,16 @@ impl ReadOnlyService for TrayService { } } - fn subscribe() -> iced::Subscription> { - let id = TypeId::of::(); - - Subscription::run_with_id( - id, + fn subscribe() -> iced_layershell::Subscription> { + Subscription::run_with(TypeId::of::(), |_| { channel(100, async |mut output| { let mut state = State::Init; loop { state = TrayService::start_listening(state, &mut output).await; } - }), - ) + }) + }) } } diff --git a/src/services/upower/mod.rs b/src/services/upower/mod.rs index 95df5a20..3c4124b3 100644 --- a/src/services/upower/mod.rs +++ b/src/services/upower/mod.rs @@ -3,7 +3,7 @@ use crate::{ components::icons::StaticIcon, services::throttle::ThrottleExt, utils::IndicatorState, }; use dbus::{DeviceProxy, PowerProfilesProxy, SystemBattery, UPowerDbus, UPowerProxy, UpDeviceKind}; -use iced::{ +use iced_layershell::{ Subscription, futures::{ SinkExt, Stream, StreamExt, @@ -278,18 +278,15 @@ impl ReadOnlyService for UPowerService { } fn subscribe() -> Subscription> { - let id = TypeId::of::(); - - Subscription::run_with_id( - id, + Subscription::run_with(TypeId::of::(), |_| { channel(100, async |mut output| { let mut state = State::Init; loop { state = UPowerService::start_listening(state, &mut output).await; } - }), - ) + }) + }) } } @@ -680,8 +677,8 @@ pub enum PowerProfileCommand { impl Service for UPowerService { type Command = PowerProfileCommand; - fn command(&mut self, command: Self::Command) -> iced::Task> { - iced::Task::perform( + fn command(&mut self, command: Self::Command) -> iced_layershell::Task> { + iced_layershell::Task::perform( { let conn = self.conn.clone(); let power_profile = self.power_profile; diff --git a/src/theme.rs b/src/theme.rs index 2cb6cc15..60294aad 100644 --- a/src/theme.rs +++ b/src/theme.rs @@ -1,5 +1,5 @@ use crate::config::{Appearance, AppearanceColor, AppearanceStyle, MenuAppearance, Position}; -use iced::{ +use iced_layershell::{ Background, Border, Color, Theme, theme::{Palette, palette}, widget::{ @@ -11,25 +11,25 @@ use iced::{ #[allow(unused)] #[derive(Debug, Copy, Clone)] pub struct Space { - pub xxs: u16, - pub xs: u16, - pub sm: u16, - pub md: u16, - pub lg: u16, - pub xl: u16, - pub xxl: u16, + pub xxs: f32, + pub xs: f32, + pub sm: f32, + pub md: f32, + pub lg: f32, + pub xl: f32, + pub xxl: f32, } impl Default for Space { fn default() -> Self { Self { - xxs: 4, - xs: 8, - sm: 12, - md: 16, - lg: 24, - xl: 32, - xxl: 48, + xxs: 4.0, + xs: 8.0, + sm: 12.0, + md: 16.0, + lg: 24.0, + xl: 32.0, + xxl: 48.0, } } } @@ -37,19 +37,19 @@ impl Default for Space { #[allow(unused)] #[derive(Debug, Clone, Copy)] pub struct Radius { - pub sm: u16, - pub md: u16, - pub lg: u16, - pub xl: u16, + pub sm: f32, + pub md: f32, + pub lg: f32, + pub xl: f32, } impl Default for Radius { fn default() -> Self { Self { - sm: 4, - md: 8, - lg: 16, - xl: 32, + sm: 4.0, + md: 8.0, + lg: 16.0, + xl: 32.0, } } } @@ -57,30 +57,30 @@ impl Default for Radius { #[allow(unused)] #[derive(Debug, Copy, Clone)] pub struct FontSize { - pub xxs: u16, - pub xs: u16, - pub sm: u16, - pub md: u16, - pub lg: u16, - pub xl: u16, - pub xxl: u16, + pub xxs: f32, + pub xs: f32, + pub sm: f32, + pub md: f32, + pub lg: f32, + pub xl: f32, + pub xxl: f32, } impl Default for FontSize { fn default() -> Self { Self { - xxs: 8, - xs: 10, - sm: 12, - md: 16, - lg: 20, - xl: 22, - xxl: 32, + xxs: 8.0, + xs: 10.0, + sm: 12.0, + md: 16.0, + lg: 20.0, + xl: 22.0, + xxl: 32.0, } } } -#[derive(Debug, Default, Clone)] +#[derive(Debug, Clone)] pub struct AshellTheme { pub iced_theme: Theme, pub space: Space, @@ -115,6 +115,7 @@ impl AshellTheme { text: appearance.text_color.get_base(), primary: appearance.primary_color.get_base(), success: appearance.success_color.get_base(), + warning: appearance.success_color.get_base(), danger: appearance.danger_color.get_base(), }, |palette| { @@ -149,17 +150,28 @@ impl AshellTheme { appearance.danger_color.get_text().unwrap_or(palette.text), ); + let default_warning = palette::Warning::generate( + palette.warning, + palette.background, + palette.text, + ); + palette::Extended { background: palette::Background { base: default_bg.base, + weakest: default_bg.weakest, + weaker: default_bg.weaker, weak: appearance .background_color .get_weak_pair(palette.text) .unwrap_or(default_bg.weak), + neutral: default_bg.neutral, strong: appearance .background_color .get_strong_pair(palette.text) .unwrap_or(default_bg.strong), + stronger: default_bg.stronger, + strongest: default_bg.strongest, }, primary: palette::Primary { base: default_primary.base, @@ -205,6 +217,7 @@ impl AshellTheme { .get_strong_pair(palette.text) .unwrap_or(default_danger.strong), }, + warning: default_warning, is_dark: true, } }, @@ -524,7 +537,7 @@ impl AshellTheme { }; match status { text_input::Status::Active => base, - text_input::Status::Focused | text_input::Status::Hovered => { + text_input::Status::Focused { .. } | text_input::Status::Hovered => { base.border.color = theme.extended_palette().background.strong.color; base } diff --git a/src/utils/mod.rs b/src/utils/mod.rs index d9dad1ec..d377613e 100644 --- a/src/utils/mod.rs +++ b/src/utils/mod.rs @@ -3,6 +3,47 @@ use std::time::Duration; pub mod launcher; pub mod remote_value; +/// Extension trait to add `push_maybe` to `Row` and `Column` in iced 0.14, +/// which removed the built-in method. +pub trait PushMaybe<'a, Message, Theme, Renderer> { + fn push_maybe( + self, + child: Option>>, + ) -> Self; +} + +impl<'a, Message, Theme, Renderer> PushMaybe<'a, Message, Theme, Renderer> + for iced_layershell::widget::Row<'a, Message, Theme, Renderer> +where + Renderer: iced_layershell::core::Renderer, +{ + fn push_maybe( + self, + child: Option>>, + ) -> Self { + match child { + Some(child) => self.push(child), + None => self, + } + } +} + +impl<'a, Message, Theme, Renderer> PushMaybe<'a, Message, Theme, Renderer> + for iced_layershell::widget::Column<'a, Message, Theme, Renderer> +where + Renderer: iced_layershell::core::Renderer, +{ + fn push_maybe( + self, + child: Option>>, + ) -> Self { + match child { + Some(child) => self.push(child), + None => self, + } + } +} + #[derive(Debug, Clone, Copy)] pub enum IndicatorState { Normal, diff --git a/src/utils/remote_value.rs b/src/utils/remote_value.rs index ac655ca1..684b8d05 100644 --- a/src/utils/remote_value.rs +++ b/src/utils/remote_value.rs @@ -10,7 +10,7 @@ pub struct Remote { /// Source of truth. Displayed shortly after the end of the user interaction received: Value, /// A handle for aborting the timeout task - timeout: Option, + timeout: Option, } impl Remote { @@ -34,14 +34,14 @@ where self.requested.unwrap_or(self.received) } - pub fn update(&mut self, message: Message) -> iced::Task> { + pub fn update(&mut self, message: Message) -> iced_layershell::Task> { if let Some(handle) = self.timeout.take() { handle.abort(); } match message { Message::Request(value) => { self.requested = Some(value); - iced::Task::none() + iced_layershell::Task::none() } Message::Timeout => self.start_timeout(), Message::RequestAndTimeout(value) => { @@ -50,13 +50,13 @@ where } Message::ShowReceived => { self.requested = None; - iced::Task::none() + iced_layershell::Task::none() } } } - fn start_timeout(&mut self) -> iced::Task> { - let (task, handle) = iced::Task::perform( + fn start_timeout(&mut self) -> iced_layershell::Task> { + let (task, handle) = iced_layershell::Task::perform( async { sleep(Duration::from_secs(1)).await; }, diff --git a/src/widgets/centerbox.rs b/src/widgets/centerbox.rs index 67062b55..36160503 100644 --- a/src/widgets/centerbox.rs +++ b/src/widgets/centerbox.rs @@ -1,16 +1,19 @@ //! Distribute content horizontally. -use iced::advanced::layout::{self, Layout, Limits, Node}; -use iced::advanced::overlay; -use iced::advanced::renderer; -use iced::advanced::widget::{Operation, Tree}; -use iced::advanced::{Clipboard, Shell, Widget, mouse}; -use iced::{ - Alignment, Element, Event, Length, Padding, Pixels, Point, Rectangle, Size, Vector, event, +use iced_layershell::advanced::layout::{self, Layout, Limits, Node}; +use iced_layershell::advanced::overlay; +use iced_layershell::advanced::renderer; +use iced_layershell::advanced::widget::{Operation, Tree}; +use iced_layershell::advanced::{Clipboard, Shell, Widget, mouse}; +use iced_layershell::{ + Alignment, Length, Padding, Pixels, Point, Rectangle, Size, Vector, event, }; +type Element<'a, Message, Theme, Renderer> = + iced_layershell::core::Element<'a, Message, Theme, Renderer>; + /// A container that distributes its contents horizontally. #[allow(missing_debug_implementations)] -pub struct Centerbox<'a, Message, Theme = iced::Theme, Renderer = iced::Renderer> { +pub struct Centerbox<'a, Message, Theme = iced_layershell::Theme, Renderer = iced_layershell::Renderer> { spacing: f32, padding: Padding, width: Length, @@ -21,7 +24,7 @@ pub struct Centerbox<'a, Message, Theme = iced::Theme, Renderer = iced::Renderer impl<'a, Message, Theme, Renderer> Centerbox<'a, Message, Theme, Renderer> where - Renderer: iced::advanced::Renderer, + Renderer: iced_layershell::advanced::Renderer, { /// Creates an empty [`Centerbox`]. pub fn new(children: [Element<'a, Message, Theme, Renderer>; 3]) -> Self { @@ -73,14 +76,14 @@ where impl<'a, Message, Theme, Renderer> Widget for Centerbox<'a, Message, Theme, Renderer> where - Renderer: iced::advanced::Renderer, + Renderer: iced_layershell::advanced::Renderer, { fn children(&self) -> Vec { self.children.iter().map(Tree::new).collect() } - fn diff(&mut self, tree: &mut Tree) { - tree.diff_children(&mut self.children) + fn diff(&self, tree: &mut Tree) { + tree.diff_children(&self.children) } fn size(&self) -> Size { @@ -91,7 +94,7 @@ where } fn layout( - &self, + &mut self, tree: &mut Tree, renderer: &Renderer, limits: &layout::Limits, @@ -119,7 +122,7 @@ where }; let mut calculate_edge_layout = - |i: usize, (child, tree): (&Element<'a, Message, Theme, Renderer>, &mut Tree)| { + |i: usize, (child, tree): (&mut Element<'a, Message, Theme, Renderer>, &mut Tree)| { let fill_cross_factor = { let size = child.as_widget().size(); @@ -137,7 +140,7 @@ where let child_limits = Limits::new(Size::ZERO, Size::new(max_width, max_height)); - let layout = child.as_widget().layout(tree, renderer, &child_limits); + let layout = child.as_widget_mut().layout(tree, renderer, &child_limits); let size = layout.size(); remaining -= size.width; @@ -146,9 +149,9 @@ where nodes[i] = layout; }; - calculate_edge_layout(0, (&self.children[0], &mut tree.children[0])); - calculate_edge_layout(2, (&self.children[2], &mut tree.children[2])); - calculate_edge_layout(1, (&self.children[1], &mut tree.children[1])); + calculate_edge_layout(0, (&mut self.children[0], &mut tree.children[0])); + calculate_edge_layout(2, (&mut self.children[2], &mut tree.children[2])); + calculate_edge_layout(1, (&mut self.children[1], &mut tree.children[1])); nodes[0].move_to_mut(Point::new(self.padding.left, self.padding.top)); nodes[0].align_mut(Alignment::Start, self.align_items, Size::new(0.0, cross)); @@ -173,7 +176,7 @@ where )); } else { nodes[1].move_to_mut(Point::new( - limits.max().width / 2. + self.padding.horizontal() / 2.0, + limits.max().width / 2. + (self.padding.left + self.padding.right) / 2.0, self.padding.top, )); } @@ -193,53 +196,54 @@ where } fn operate( - &self, + &mut self, tree: &mut Tree, layout: Layout<'_>, renderer: &Renderer, operation: &mut dyn Operation, ) { - operation.container(None, layout.bounds(), &mut |operation| { + operation.container(None, layout.bounds()); + operation.traverse(&mut |operation| { self.children - .iter() + .iter_mut() .zip(&mut tree.children) .zip(layout.children()) .for_each(|((child, state), layout)| { child - .as_widget() + .as_widget_mut() .operate(state, layout, renderer, operation); }); }); } - fn on_event( + fn update( &mut self, tree: &mut Tree, - event: Event, + event: &event::Event, layout: Layout<'_>, cursor: mouse::Cursor, renderer: &Renderer, clipboard: &mut dyn Clipboard, shell: &mut Shell<'_, Message>, viewport: &Rectangle, - ) -> event::Status { - self.children + ) { + for ((child, state), layout) in self + .children .iter_mut() .zip(&mut tree.children) .zip(layout.children()) - .map(|((child, state), layout)| { - child.as_widget_mut().on_event( - state, - event.clone(), - layout, - cursor, - renderer, - clipboard, - shell, - viewport, - ) - }) - .fold(event::Status::Ignored, event::Status::merge) + { + child.as_widget_mut().update( + state, + event, + layout, + cursor, + renderer, + clipboard, + shell, + viewport, + ); + } } fn mouse_interaction( @@ -290,11 +294,12 @@ where fn overlay<'b>( &'b mut self, tree: &'b mut Tree, - layout: Layout<'_>, + layout: Layout<'b>, renderer: &Renderer, + viewport: &Rectangle, translation: Vector, ) -> Option> { - overlay::from_children(&mut self.children, tree, layout, renderer, translation) + overlay::from_children(&mut self.children, tree, layout, renderer, viewport, translation) } } @@ -303,7 +308,7 @@ impl<'a, Message, Theme, Renderer> From> where Message: 'a, Theme: 'a, - Renderer: iced::advanced::Renderer + 'a, + Renderer: iced_layershell::advanced::Renderer + 'a, { #[inline] fn from(row: Centerbox<'a, Message, Theme, Renderer>) -> Self { diff --git a/src/widgets/menu_wrapper.rs b/src/widgets/menu_wrapper.rs index 0edd635d..ca4a2034 100644 --- a/src/widgets/menu_wrapper.rs +++ b/src/widgets/menu_wrapper.rs @@ -1,17 +1,18 @@ -use iced::advanced::layout::{self, Layout}; -use iced::advanced::renderer; -use iced::advanced::widget::{Operation, Tree}; -use iced::advanced::{Clipboard, Shell, Widget, mouse}; -use iced::core::widget::tree; -use iced::id::Id; -use iced::{ - Background, Border, Color, Element, Event, Length, Padding, Point, Rectangle, Shadow, Size, +use iced_layershell::advanced::layout::{self, Layout}; +use iced_layershell::advanced::renderer; +use iced_layershell::advanced::widget::{Operation, Tree}; +use iced_layershell::advanced::{Clipboard, Shell, Widget, mouse}; +use iced_layershell::core::widget::tree; +use iced_layershell::{ + Background, Border, Color, Length, Padding, Point, Rectangle, Shadow, Size, Vector, alignment, event, overlay, touch, }; +type Element<'a, Message, Theme, Renderer> = + iced_layershell::core::Element<'a, Message, Theme, Renderer>; + #[allow(missing_debug_implementations)] -pub struct MenuWrapper<'a, Message, Theme = iced::Theme, Renderer = iced::Renderer> { - id: Id, +pub struct MenuWrapper<'a, Message, Theme = iced_layershell::Theme, Renderer = iced_layershell::Renderer> { x: f32, content: Element<'a, Message, Theme, Renderer>, on_click_outside: Option, @@ -22,11 +23,10 @@ pub struct MenuWrapper<'a, Message, Theme = iced::Theme, Renderer = iced::Render impl<'a, Message, Theme, Renderer> MenuWrapper<'a, Message, Theme, Renderer> where - Renderer: iced::advanced::Renderer, + Renderer: iced_layershell::advanced::Renderer, { pub fn new(x: f32, content: Element<'a, Message, Theme, Renderer>) -> Self { MenuWrapper { - id: Id::unique(), x, content, on_click_outside: None, @@ -61,7 +61,7 @@ impl<'a, Message, Theme, Renderer> Widget for MenuWrapper<'a, Message, Theme, Renderer> where Message: Clone, - Renderer: iced::advanced::Renderer, + Renderer: iced_layershell::advanced::Renderer, { fn tag(&self) -> tree::Tag { tree::Tag::of::<()>() @@ -75,8 +75,8 @@ where vec![Tree::new(&self.content)] } - fn diff(&mut self, tree: &mut Tree) { - tree.diff_children(std::slice::from_mut(&mut self.content)); + fn diff(&self, tree: &mut Tree) { + tree.diff_children(std::slice::from_ref(&self.content)); } fn size(&self) -> Size { @@ -87,7 +87,7 @@ where } fn layout( - &self, + &mut self, tree: &mut Tree, renderer: &Renderer, limits: &layout::Limits, @@ -99,7 +99,7 @@ where self.padding, |limits| { self.content - .as_widget() + .as_widget_mut() .layout(&mut tree.children[0], renderer, limits) }, |node, size| { @@ -109,7 +109,7 @@ where size.width - content_size.width - 8., ); let node = node.align( - iced::Alignment::Center, + iced_layershell::Alignment::Center, self.vertical_alignment.into(), size, ); @@ -120,14 +120,15 @@ where } fn operate( - &self, + &mut self, tree: &mut Tree, layout: Layout<'_>, renderer: &Renderer, operation: &mut dyn Operation, ) { - operation.container(None, layout.bounds(), &mut |operation| { - self.content.as_widget().operate( + operation.container(None, layout.bounds()); + operation.traverse(&mut |operation| { + self.content.as_widget_mut().operate( &mut tree.children[0], layout.children().next().unwrap(), renderer, @@ -136,44 +137,38 @@ where }); } - fn on_event( + fn update( &mut self, tree: &mut Tree, - event: Event, + event: &event::Event, layout: Layout<'_>, cursor: mouse::Cursor, renderer: &Renderer, clipboard: &mut dyn Clipboard, shell: &mut Shell<'_, Message>, viewport: &Rectangle, - ) -> event::Status { - if let event::Status::Captured = self.content.as_widget_mut().on_event( + ) { + self.content.as_widget_mut().update( &mut tree.children[0], - event.clone(), + event, layout.children().next().unwrap(), cursor, renderer, clipboard, shell, viewport, - ) { - return event::Status::Captured; - } + ); if let Some(on_click_outside) = &self.on_click_outside - && let Event::Mouse(mouse::Event::ButtonReleased(mouse::Button::Left)) - | Event::Touch(touch::Event::FingerLifted { .. }) = event + && let event::Event::Mouse(mouse::Event::ButtonReleased(mouse::Button::Left)) + | event::Event::Touch(touch::Event::FingerLifted { .. }) = event { let bounds = layout.children().next().unwrap().bounds(); let cursor_over_scrollable = cursor.is_over(bounds); if !cursor_over_scrollable { shell.publish(on_click_outside.clone()); - - return event::Status::Captured; } } - - event::Status::Ignored } fn mouse_interaction( @@ -203,6 +198,7 @@ where bounds: layout.bounds(), border: Border::default(), shadow: Shadow::default(), + snap: true, }, Background::Color(backdrop), ); @@ -223,25 +219,19 @@ where fn overlay<'b>( &'b mut self, tree: &'b mut Tree, - layout: Layout<'_>, + layout: Layout<'b>, renderer: &Renderer, + viewport: &Rectangle, translation: Vector, ) -> Option> { self.content.as_widget_mut().overlay( &mut tree.children[0], layout.children().next().unwrap(), renderer, + viewport, translation, ) } - - fn id(&self) -> Option { - Some(self.id.clone()) - } - - fn set_id(&mut self, id: Id) { - self.id = id; - } } impl<'a, Message, Theme, Renderer> From> @@ -249,7 +239,7 @@ impl<'a, Message, Theme, Renderer> From) -> Self { Self::new(menu_wrapper) diff --git a/src/widgets/position_button.rs b/src/widgets/position_button.rs index 3736508b..8c649e80 100644 --- a/src/widgets/position_button.rs +++ b/src/widgets/position_button.rs @@ -1,15 +1,16 @@ -use iced::{ - Background, Color, Element, Length, Padding, Point, Rectangle, Size, Vector, +use iced_layershell::{ + Background, Color, Length, Padding, Point, Rectangle, Size, Vector, core::{ Clipboard, Layout, Shell, Widget, - event::{self, Event}, - keyboard, layout, mouse, overlay, renderer, touch, + event, keyboard, layout, mouse, overlay, renderer, touch, widget::{Operation, Tree, tree}, }, - id::Id, widget::button::{Catalog, Status, Style, StyleFn}, }; +type Element<'a, Message, Theme, Renderer> = + iced_layershell::core::Element<'a, Message, Theme, Renderer>; + #[derive(Debug, Clone, Copy)] pub struct ButtonUIRef { pub position: Point, @@ -21,9 +22,9 @@ enum OnPress<'a, Message> { MessageWithPosition(Box Message + 'a>), } -pub struct PositionButton<'a, Message, Theme = iced::Theme, Renderer = iced::Renderer> +pub struct PositionButton<'a, Message, Theme = iced_layershell::Theme, Renderer = iced_layershell::Renderer> where - Renderer: iced::core::Renderer, + Renderer: iced_layershell::core::Renderer, Theme: Catalog, { content: Element<'a, Message, Theme, Renderer>, @@ -31,7 +32,6 @@ where on_right_press: Option>, on_scroll_up: Option>, on_scroll_down: Option>, - id: Id, width: Length, height: Length, padding: Padding, @@ -41,7 +41,7 @@ where impl<'a, Message, Theme, Renderer> PositionButton<'a, Message, Theme, Renderer> where - Renderer: iced::core::Renderer, + Renderer: iced_layershell::core::Renderer, Theme: Catalog, { pub fn new(content: impl Into>) -> Self { @@ -50,7 +50,6 @@ where PositionButton { content, - id: Id::unique(), on_press: None, on_right_press: None, on_scroll_up: None, @@ -129,26 +128,18 @@ where self } - /// Sets the [`Id`] of the [`Button`]. - pub fn id(mut self, id: Id) -> Self { - self.id = id; - self - } - fn publish_on_press( &self, on_press: &OnPress<'a, Message>, layout: Layout<'_>, viewport: &Rectangle, shell: &mut Shell<'_, Message>, - ) -> event::Status - where + ) where Message: Clone, { match on_press { OnPress::Message(message) => { shell.publish(message.clone()); - event::Status::Captured } OnPress::MessageWithPosition(on_press_with_position) => { let ui_data = ButtonUIRef { @@ -159,7 +150,6 @@ where viewport: (viewport.width, viewport.height), }; shell.publish(on_press_with_position(ui_data)); - event::Status::Captured } } } @@ -177,7 +167,7 @@ impl<'a, Message, Theme, Renderer> Widget for PositionButton<'a, Message, Theme, Renderer> where Message: 'a + Clone, - Renderer: 'a + iced::core::Renderer, + Renderer: 'a + iced_layershell::core::Renderer, Theme: Catalog, { fn tag(&self) -> tree::Tag { @@ -192,8 +182,8 @@ where vec![Tree::new(&self.content)] } - fn diff(&mut self, tree: &mut Tree) { - tree.diff_children(std::slice::from_mut(&mut self.content)); + fn diff(&self, tree: &mut Tree) { + tree.diff_children(std::slice::from_ref(&self.content)); } fn size(&self) -> Size { @@ -204,27 +194,28 @@ where } fn layout( - &self, + &mut self, tree: &mut Tree, renderer: &Renderer, limits: &layout::Limits, ) -> layout::Node { layout::padded(limits, self.width, self.height, self.padding, |limits| { self.content - .as_widget() + .as_widget_mut() .layout(&mut tree.children[0], renderer, limits) }) } fn operate( - &self, + &mut self, tree: &mut Tree, layout: Layout<'_>, renderer: &Renderer, operation: &mut dyn Operation, ) { - operation.container(None, layout.bounds(), &mut |operation| { - self.content.as_widget().operate( + operation.container(None, layout.bounds()); + operation.traverse(&mut |operation| { + self.content.as_widget_mut().operate( &mut tree.children[0], layout.children().next().unwrap(), renderer, @@ -233,33 +224,35 @@ where }); } - fn on_event( + fn update( &mut self, tree: &mut Tree, - event: Event, + event: &event::Event, layout: Layout<'_>, cursor: mouse::Cursor, renderer: &Renderer, clipboard: &mut dyn Clipboard, shell: &mut Shell<'_, Message>, viewport: &Rectangle, - ) -> event::Status { - if let event::Status::Captured = self.content.as_widget_mut().on_event( + ) { + self.content.as_widget_mut().update( &mut tree.children[0], - event.clone(), + event, layout.children().next().unwrap(), cursor, renderer, clipboard, shell, viewport, - ) { - return event::Status::Captured; + ); + + if shell.is_event_captured() { + return; } match event { - Event::Mouse(mouse::Event::ButtonPressed(mouse::Button::Left)) - | Event::Touch(touch::Event::FingerPressed { .. }) + event::Event::Mouse(mouse::Event::ButtonPressed(mouse::Button::Left)) + | event::Event::Touch(touch::Event::FingerPressed { .. }) if self.on_press.is_some() => { let bounds = layout.bounds(); @@ -269,10 +262,11 @@ where state.is_pressed = true; - return event::Status::Captured; + shell.capture_event(); + return; } } - Event::Mouse(mouse::Event::ButtonPressed(mouse::Button::Right)) + event::Event::Mouse(mouse::Event::ButtonPressed(mouse::Button::Right)) if self.on_right_press.is_some() => { let bounds = layout.bounds(); @@ -280,11 +274,12 @@ where if cursor.is_over(bounds) { let state = tree.state.downcast_mut::(); state.is_right_pressed = true; - return event::Status::Captured; + shell.capture_event(); + return; } } - Event::Mouse(mouse::Event::ButtonReleased(mouse::Button::Left)) - | Event::Touch(touch::Event::FingerLifted { .. }) => { + event::Event::Mouse(mouse::Event::ButtonReleased(mouse::Button::Left)) + | event::Event::Touch(touch::Event::FingerLifted { .. }) => { if let Some(on_press) = self.on_press.as_ref() { let state = tree.state.downcast_mut::(); @@ -294,14 +289,15 @@ where let bounds = layout.bounds(); if cursor.is_over(bounds) { - return self.publish_on_press(on_press, layout, viewport, shell); + self.publish_on_press(on_press, layout, viewport, shell); } - return event::Status::Captured; + shell.capture_event(); + return; } } } - Event::Mouse(mouse::Event::ButtonReleased(mouse::Button::Right)) => { + event::Event::Mouse(mouse::Event::ButtonReleased(mouse::Button::Right)) => { if let Some(on_right_press) = self.on_right_press.as_ref() { let state = tree.state.downcast_mut::(); @@ -311,32 +307,35 @@ where let bounds = layout.bounds(); if cursor.is_over(bounds) { - return self.publish_on_press(on_right_press, layout, viewport, shell); + self.publish_on_press(on_right_press, layout, viewport, shell); } - return event::Status::Captured; + shell.capture_event(); + return; } } } - Event::Mouse(mouse::Event::WheelScrolled { delta }) => { + event::Event::Mouse(mouse::Event::WheelScrolled { delta }) => { let bounds = layout.bounds(); if cursor.is_over(bounds) && let mouse::ScrollDelta::Lines { y, .. } = delta { - let target = if y > 0.0 { + let target = if *y > 0.0 { self.on_scroll_up.as_ref() - } else if y < 0.0 { + } else if *y < 0.0 { self.on_scroll_down.as_ref() } else { None }; if let Some(on_scroll) = target { - return self.publish_on_press(on_scroll, layout, viewport, shell); + self.publish_on_press(on_scroll, layout, viewport, shell); + shell.capture_event(); + return; } } } - Event::Keyboard(keyboard::Event::KeyPressed { key, .. }) => { + event::Event::Keyboard(keyboard::Event::KeyPressed { key, .. }) => { if let Some(on_press) = self.on_press.as_ref() { let state = tree.state.downcast_mut::(); if state.is_focused @@ -358,12 +357,13 @@ where shell.publish(on_press(ui_data)); } } - return event::Status::Captured; + shell.capture_event(); + return; } } } - Event::Touch(touch::Event::FingerLost { .. }) - | Event::Mouse(mouse::Event::CursorLeft) => { + event::Event::Touch(touch::Event::FingerLost { .. }) + | event::Event::Mouse(mouse::Event::CursorLeft) => { let state = tree.state.downcast_mut::(); state.is_hovered = false; state.is_pressed = false; @@ -371,7 +371,13 @@ where _ => {} } - event::Status::Ignored + // Reactive rendering: track hover state and request redraw on change + let state = tree.state.downcast_mut::(); + let is_hovered = self.on_press.is_some() && cursor.is_over(layout.bounds()); + if is_hovered != state.is_hovered { + state.is_hovered = is_hovered; + shell.request_redraw(); + } } fn draw( @@ -379,20 +385,18 @@ where tree: &Tree, renderer: &mut Renderer, theme: &Theme, - renderer_style: &renderer::Style, + _renderer_style: &renderer::Style, layout: Layout<'_>, cursor: mouse::Cursor, viewport: &Rectangle, ) { let bounds = layout.bounds(); let content_layout = layout.children().next().unwrap(); - let is_mouse_over = cursor.is_over(bounds); + let state = tree.state.downcast_ref::(); let status = if self.on_press.is_none() { Status::Disabled - } else if is_mouse_over { - let state = tree.state.downcast_ref::(); - + } else if state.is_hovered { if state.is_pressed { Status::Pressed } else { @@ -410,6 +414,7 @@ where bounds, border: style.border, shadow: style.shadow, + snap: true, }, style .background @@ -429,8 +434,6 @@ where theme, &renderer::Style { text_color: style.text_color, - icon_color: style.icon_color.unwrap_or(renderer_style.icon_color), - scale_factor: renderer_style.scale_factor, }, content_layout, cursor, @@ -458,25 +461,19 @@ where fn overlay<'b>( &'b mut self, tree: &'b mut Tree, - layout: Layout<'_>, + layout: Layout<'b>, renderer: &Renderer, + viewport: &Rectangle, translation: Vector, ) -> Option> { self.content.as_widget_mut().overlay( &mut tree.children[0], layout.children().next()?, renderer, + viewport, translation, ) } - - fn id(&self) -> Option { - Some(self.id.clone()) - } - - fn set_id(&mut self, id: Id) { - self.id = id; - } } impl<'a, Message, Theme, Renderer> From> @@ -484,7 +481,7 @@ impl<'a, Message, Theme, Renderer> From) -> Self { @@ -497,7 +494,7 @@ pub fn position_button<'a, Message, Theme, Renderer>( ) -> PositionButton<'a, Message, Theme, Renderer> where Theme: Catalog + 'a, - Renderer: iced::core::Renderer, + Renderer: iced_layershell::core::Renderer, { PositionButton::new(content) } From 1839b96693e85cf0d1c619b722a32f0d6bb84c19 Mon Sep 17 00:00:00 2001 From: Simone Camito Date: Tue, 31 Mar 2026 20:33:32 +0200 Subject: [PATCH 02/14] Adapt scroll handlers to corrected scroll convention - Flip workspace scroll direction mapping for negated axis values - Handle both Lines and Pixels scroll deltas in position_button - Adjust default md font size to 14px --- src/modules/workspaces.rs | 6 +++--- src/theme.rs | 2 +- src/widgets/position_button.rs | 12 +++++++----- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/modules/workspaces.rs b/src/modules/workspaces.rs index 5798cf68..ad693e66 100644 --- a/src/modules/workspaces.rs +++ b/src/modules/workspaces.rs @@ -485,7 +485,7 @@ impl Workspaces { ) .on_scroll(move |direction| match direction { iced_layershell::mouse::ScrollDelta::Lines { y, .. } => { - if y < 0. { + if y > 0. { Message::Scroll(-1) } else { Message::Scroll(1) @@ -497,9 +497,9 @@ impl Workspaces { if self.scroll_accumulator.abs() < sensibility { Message::ScrollAccumulator(y) } else if self.scroll_accumulator.is_sign_positive() { - Message::Scroll(-1) - } else { Message::Scroll(1) + } else { + Message::Scroll(-1) } } }) diff --git a/src/theme.rs b/src/theme.rs index 60294aad..f367011e 100644 --- a/src/theme.rs +++ b/src/theme.rs @@ -72,7 +72,7 @@ impl Default for FontSize { xxs: 8.0, xs: 10.0, sm: 12.0, - md: 16.0, + md: 14.0, lg: 20.0, xl: 22.0, xxl: 32.0, diff --git a/src/widgets/position_button.rs b/src/widgets/position_button.rs index 8c649e80..9badb007 100644 --- a/src/widgets/position_button.rs +++ b/src/widgets/position_button.rs @@ -317,12 +317,14 @@ where } event::Event::Mouse(mouse::Event::WheelScrolled { delta }) => { let bounds = layout.bounds(); - if cursor.is_over(bounds) - && let mouse::ScrollDelta::Lines { y, .. } = delta - { - let target = if *y > 0.0 { + let y = match delta { + mouse::ScrollDelta::Lines { y, .. } => Some(*y), + mouse::ScrollDelta::Pixels { y, .. } => Some(*y), + }; + if cursor.is_over(bounds) && let Some(y) = y { + let target = if y > 0.0 { self.on_scroll_up.as_ref() - } else if *y < 0.0 { + } else if y < 0.0 { self.on_scroll_down.as_ref() } else { None From 1ccccf23682e5dab14d1891a513f35c3b3ab6474 Mon Sep 17 00:00:00 2001 From: Simone Camito Date: Tue, 31 Mar 2026 20:33:57 +0200 Subject: [PATCH 03/14] revert --- src/theme.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/theme.rs b/src/theme.rs index f367011e..60294aad 100644 --- a/src/theme.rs +++ b/src/theme.rs @@ -72,7 +72,7 @@ impl Default for FontSize { xxs: 8.0, xs: 10.0, sm: 12.0, - md: 14.0, + md: 16.0, lg: 20.0, xl: 22.0, xxl: 32.0, From ae42cf60adc6c07c2eec194470b303948a4b7846 Mon Sep 17 00:00:00 2001 From: Simone Camito Date: Tue, 31 Mar 2026 22:38:03 +0200 Subject: [PATCH 04/14] fix --- src/modules/tempo.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/tempo.rs b/src/modules/tempo.rs index f40e5311..3f006ebc 100644 --- a/src/modules/tempo.rs +++ b/src/modules/tempo.rs @@ -241,7 +241,7 @@ impl Tempo { .push_maybe(self.weather(theme)) .spacing(theme.space.lg), ) - .width(MenuSize::XLarge) + .max_width(MenuSize::XLarge) .into() } From 0a450d8256710b7aeeeeceaa460e3b10d0eb537e Mon Sep 17 00:00:00 2001 From: Simone Camito Date: Wed, 1 Apr 2026 09:48:07 +0200 Subject: [PATCH 05/14] =?UTF-8?q?Update=20futures=200.3.31=20=E2=86=92=200?= =?UTF-8?q?.3.32=20(needed=20for=20try=5Frecv)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3e368dfe..98e646c0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1142,9 +1142,9 @@ checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" [[package]] name = "futures" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d" dependencies = [ "futures-channel", "futures-core", @@ -1157,9 +1157,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" dependencies = [ "futures-core", "futures-sink", @@ -1167,15 +1167,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" +checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" [[package]] name = "futures-executor" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d" dependencies = [ "futures-core", "futures-task", @@ -1184,9 +1184,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" +checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" [[package]] name = "futures-lite" @@ -1203,9 +1203,9 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" dependencies = [ "proc-macro2", "quote", @@ -1214,21 +1214,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" +checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" [[package]] name = "futures-task" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" +checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" [[package]] name = "futures-util" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" dependencies = [ "futures-channel", "futures-core", @@ -1238,7 +1238,6 @@ dependencies = [ "futures-task", "memchr", "pin-project-lite", - "pin-utils", "slab", ] From d01999da2319192c08bf8b2cb3e15da706e60a03 Mon Sep 17 00:00:00 2001 From: Simone Camito Date: Wed, 1 Apr 2026 11:59:36 +0200 Subject: [PATCH 06/14] switch iced_layershell dependency from local path to git --- Cargo.lock | 1 + Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 98e646c0..7827644e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1709,6 +1709,7 @@ dependencies = [ [[package]] name = "iced_layershell" version = "0.1.0" +source = "git+https://github.com/MalpenZibo/iced_layershell?branch=main#672b61ab487a359816d259406abf2fafbf118e18" dependencies = [ "calloop", "calloop-wayland-source", diff --git a/Cargo.toml b/Cargo.toml index f15c717a..3342c6ec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ depends = ["libwayland-client0", "libpipewire-0.3-0t64", "libpulse0"] depends = ["libwayland-client", "pipewire-libs", "pulseaudio-libs"] [dependencies] -iced_layershell = { path = "../iced_layershell", features = [ +iced_layershell = { git = "https://github.com/MalpenZibo/iced_layershell", branch = "main", features = [ "tokio", "advanced", "wgpu", From 7e18e2b509ade7b26c2b273745f2cbb94978cf20 Mon Sep 17 00:00:00 2001 From: Simone Camito Date: Wed, 1 Apr 2026 12:40:07 +0200 Subject: [PATCH 07/14] fix formatting --- src/main.rs | 4 +- src/menu.rs | 5 +-- src/modules/media_player.rs | 2 +- src/modules/settings/bluetooth.rs | 6 +-- src/modules/settings/mod.rs | 2 +- src/modules/settings/network.rs | 11 +++--- src/modules/settings/power.rs | 2 +- src/modules/tempo.rs | 63 +++++++++++++++++-------------- src/modules/tray.rs | 8 +++- src/modules/updates.rs | 6 ++- src/outputs.rs | 18 ++------- src/services/audio.rs | 10 ++--- src/widgets/centerbox.rs | 29 +++++++------- src/widgets/menu_wrapper.rs | 11 ++++-- src/widgets/position_button.rs | 15 +++++--- 15 files changed, 104 insertions(+), 88 deletions(-) diff --git a/src/main.rs b/src/main.rs index 15ee14b3..291ec7f7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,4 @@ -use crate::config::{get_config, Position}; +use crate::config::{Position, get_config}; use crate::outputs::Outputs; use app::App; use clap::Parser; @@ -7,9 +7,9 @@ use flexi_logger::{ }; use iced_layershell::{Anchor, Font, KeyboardInteractivity, Layer, LayerShellSettings}; use log::{debug, error, warn}; +use std::backtrace::Backtrace; use std::panic; use std::path::PathBuf; -use std::backtrace::Backtrace; mod app; mod components; diff --git a/src/menu.rs b/src/menu.rs index 350770ec..729adac7 100644 --- a/src/menu.rs +++ b/src/menu.rs @@ -3,12 +3,11 @@ use crate::config::{AppearanceStyle, Position}; use crate::theme::backdrop_color; use crate::widgets::{self, ButtonUIRef}; use iced_layershell::alignment::Vertical; +use iced_layershell::widget::container::Style; use iced_layershell::{ Border, Element, KeyboardInteractivity, Layer, Length, Padding, Pixels, SurfaceId, Task, Theme, - set_keyboard_interactivity, set_layer, - widget::container, + set_keyboard_interactivity, set_layer, widget::container, }; -use iced_layershell::widget::container::Style; #[derive(Eq, PartialEq, Clone, Debug)] pub enum MenuType { diff --git a/src/modules/media_player.rs b/src/modules/media_player.rs index c5e21f81..bad55a00 100644 --- a/src/modules/media_player.rs +++ b/src/modules/media_player.rs @@ -2,7 +2,6 @@ use crate::{ components::icons::{IconButtonSize, StaticIcon, icon, icon_button}, config::{MediaPlayerFormat, MediaPlayerModuleConfig}, menu::MenuSize, - utils::PushMaybe, services::{ ReadOnlyService, Service, ServiceEvent, mpris::{ @@ -10,6 +9,7 @@ use crate::{ }, }, theme::AshellTheme, + utils::PushMaybe, utils::truncate_text, }; use iced_layershell::{ diff --git a/src/modules/settings/bluetooth.rs b/src/modules/settings/bluetooth.rs index fd5cc890..80df52ac 100644 --- a/src/modules/settings/bluetooth.rs +++ b/src/modules/settings/bluetooth.rs @@ -2,19 +2,17 @@ use super::{SubMenu, quick_setting_button}; use crate::{ components::icons::{IconButtonSize, StaticIcon, icon, icon_button}, config::SettingsFormat, - utils::PushMaybe, services::{ ReadOnlyService, Service, ServiceEvent, bluetooth::{BluetoothCommand, BluetoothDevice, BluetoothService, BluetoothState}, }, theme::AshellTheme, + utils::PushMaybe, }; use iced_layershell::{ Element, Length, Padding, Subscription, SurfaceId, Task, Theme, alignment::{Alignment, Horizontal, Vertical}, - widget::{ - Column, MouseArea, Row, button, column, container, row, rule, scrollable, text, - }, + widget::{Column, MouseArea, Row, button, column, container, row, rule, scrollable, text}, }; use itertools::Itertools; use zbus::zvariant::OwnedObjectPath; diff --git a/src/modules/settings/mod.rs b/src/modules/settings/mod.rs index 120b5187..0177c9cd 100644 --- a/src/modules/settings/mod.rs +++ b/src/modules/settings/mod.rs @@ -10,7 +10,6 @@ use crate::{ components::icons::{DynamicIcon, Icon, IconButtonSize, StaticIcon, icon, icon_button}, config::{Position, SettingsCustomButton, SettingsIndicator, SettingsModuleConfig}, menu::MenuSize, - utils::PushMaybe, modules::settings::{ audio::{AudioSettings, AudioSettingsConfig}, bluetooth::{BluetoothSettings, BluetoothSettingsConfig}, @@ -21,6 +20,7 @@ use crate::{ password_dialog, services::idle_inhibitor::IdleInhibitorManager, theme::AshellTheme, + utils::PushMaybe, }; use iced_layershell::{ Alignment, Background, Border, Element, Length, Padding, Subscription, SurfaceId, Task, Theme, diff --git a/src/modules/settings/network.rs b/src/modules/settings/network.rs index 3c37a4eb..d1d562d8 100644 --- a/src/modules/settings/network.rs +++ b/src/modules/settings/network.rs @@ -14,10 +14,7 @@ use crate::{ }; use iced_layershell::{ Alignment, Element, Length, Padding, Subscription, SurfaceId, Task, Theme, - widget::{ - Column, MouseArea, button, column, container, row, rule, scrollable, text, - toggler, - }, + widget::{Column, MouseArea, button, column, container, row, rule, scrollable, text, toggler}, }; use log::{info, warn}; @@ -715,7 +712,11 @@ impl NetworkSettings { .collect::>>(), ) .spacing(theme.space.xs) - .padding(Padding::default().right(theme.space.md).left(theme.space.xs)); + .padding( + Padding::default() + .right(theme.space.md) + .left(theme.space.xs), + ); let main = container(scrollable(vpn_list)) .height(Length::Shrink) diff --git a/src/modules/settings/power.rs b/src/modules/settings/power.rs index 9c1eb87a..85915639 100644 --- a/src/modules/settings/power.rs +++ b/src/modules/settings/power.rs @@ -3,7 +3,6 @@ use std::convert; use crate::{ components::icons::{StaticIcon, icon}, config::{PeripheralIndicators, SettingsFormat}, - utils::PushMaybe, modules::settings::quick_setting_button, services::{ ReadOnlyService, Service, ServiceEvent, @@ -13,6 +12,7 @@ use crate::{ }, }, theme::AshellTheme, + utils::PushMaybe, utils::{self, IndicatorState, format_duration}, }; use iced_layershell::{ diff --git a/src/modules/tempo.rs b/src/modules/tempo.rs index 3f006ebc..6196afc9 100644 --- a/src/modules/tempo.rs +++ b/src/modules/tempo.rs @@ -671,28 +671,30 @@ impl Tempo { .scale_alpha(theme.opacity), ) .into(), - border: Border::default().rounded(iced_layershell::border::Radius { - top_left: if index == 0 { - theme.radius.lg - } else { - theme.radius.sm - }, - top_right: if index == 0 { - theme.radius.lg - } else { - theme.radius.sm - }, - bottom_right: if index == data.daily.time.len() - 2 { - theme.radius.lg - } else { - theme.radius.sm - }, - bottom_left: if index == data.daily.time.len() - 2 { - theme.radius.lg - } else { - theme.radius.sm + border: Border::default().rounded( + iced_layershell::border::Radius { + top_left: if index == 0 { + theme.radius.lg + } else { + theme.radius.sm + }, + top_right: if index == 0 { + theme.radius.lg + } else { + theme.radius.sm + }, + bottom_right: if index == data.daily.time.len() - 2 { + theme.radius.lg + } else { + theme.radius.sm + }, + bottom_left: if index == data.daily.time.len() - 2 { + theme.radius.lg + } else { + theme.radius.sm + }, }, - }), + ), ..container::Style::default() }) .into() @@ -729,13 +731,18 @@ impl Tempo { let time_sub = Subscription::run_with(interval, |interval| { let interval = *interval; - channel(100, async move |mut output: iced_layershell::futures::channel::mpsc::Sender| { - let mut interval = tokio::time::interval(interval); - loop { - interval.tick().await; - output.send(Message::Update).await.ok(); - } - }) + channel( + 100, + async move |mut output: iced_layershell::futures::channel::mpsc::Sender< + Message, + >| { + let mut interval = tokio::time::interval(interval); + loop { + interval.tick().await; + output.send(Message::Update).await.ok(); + } + }, + ) }); let weather_sub = self.config.weather_location.clone().map(|location| { diff --git a/src/modules/tray.rs b/src/modules/tray.rs index edab0eaf..d9be8e6b 100644 --- a/src/modules/tray.rs +++ b/src/modules/tray.rs @@ -1,7 +1,6 @@ use crate::{ components::icons::{StaticIcon, icon}, menu::MenuSize, - utils::PushMaybe, services::{ ReadOnlyService, Service, ServiceEvent, tray::{ @@ -10,6 +9,7 @@ use crate::{ }, }, theme::AshellTheme, + utils::PushMaybe, widgets::{ButtonUIRef, position_button}, }; use iced_layershell::{ @@ -174,7 +174,11 @@ impl TrayModule { } } - pub fn view<'a>(&'a self, id: SurfaceId, theme: &'a AshellTheme) -> Option> { + pub fn view<'a>( + &'a self, + id: SurfaceId, + theme: &'a AshellTheme, + ) -> Option> { self.service .as_ref() .filter(|s| !s.data.is_empty()) diff --git a/src/modules/updates.rs b/src/modules/updates.rs index 24ee74f8..5fe9d6c6 100644 --- a/src/modules/updates.rs +++ b/src/modules/updates.rs @@ -235,7 +235,11 @@ impl Updates { .collect::>>(), ) .spacing(theme.space.xs) - .padding(Padding::default().right(theme.space.md).left(theme.space.xs)), + .padding( + Padding::default() + .right(theme.space.md) + .left(theme.space.xs), + ), )) .max_height(300), ); diff --git a/src/outputs.rs b/src/outputs.rs index 3d9af9c5..4740441a 100644 --- a/src/outputs.rs +++ b/src/outputs.rs @@ -178,13 +178,8 @@ impl Outputs { if target { debug!("Found target output, creating a new layer surface"); - let (id, menu_id, task) = Self::create_output_layers( - style, - Some(output_id), - position, - layer, - scale_factor, - ); + let (id, menu_id, task) = + Self::create_output_layers(style, Some(output_id), position, layer, scale_factor); let destroy_task = match self.0.iter().position(|(key, _, _)| key.as_str() == name) { Some(index) => { @@ -398,13 +393,8 @@ impl Outputs { let destroy_main_task = destroy_layer_surface(shell_info.id); let destroy_menu_task = destroy_layer_surface(shell_info.menu.id); - let (id, menu_id, task) = Self::create_output_layers( - style, - *output_id, - position, - layer, - scale_factor, - ); + let (id, menu_id, task) = + Self::create_output_layers(style, *output_id, position, layer, scale_factor); shell_info.id = id; shell_info.menu = Menu::new(menu_id); diff --git a/src/services/audio.rs b/src/services/audio.rs index 8688465a..b0d9ff9e 100644 --- a/src/services/audio.rs +++ b/src/services/audio.rs @@ -577,7 +577,8 @@ impl PulseAudioServer { cmd_introspector.set_sink_volume_by_name(&name, &volume, None); } PulseAudioCommand::SourceVolume(name, volume) => { - cmd_introspector.set_source_volume_by_name(&name, &volume, None); + cmd_introspector + .set_source_volume_by_name(&name, &volume, None); } PulseAudioCommand::DefaultSink(name, port) => { server.context.set_default_sink(&name, |_| {}); @@ -588,7 +589,8 @@ impl PulseAudioServer { PulseAudioCommand::DefaultSource(name, port) => { server.context.set_default_source(&name, |_| {}); if let Some(port) = port { - cmd_introspector.set_source_port_by_name(&name, &port, None); + cmd_introspector + .set_source_port_by_name(&name, &port, None); } } } @@ -611,9 +613,7 @@ impl PulseAudioServer { receiver: from_server_rx, sender: to_server_tx, }), - _ => Err(anyhow::anyhow!( - "Failed to start PulseAudio thread" - )), + _ => Err(anyhow::anyhow!("Failed to start PulseAudio thread")), } } diff --git a/src/widgets/centerbox.rs b/src/widgets/centerbox.rs index 36160503..0be4e661 100644 --- a/src/widgets/centerbox.rs +++ b/src/widgets/centerbox.rs @@ -4,16 +4,19 @@ use iced_layershell::advanced::overlay; use iced_layershell::advanced::renderer; use iced_layershell::advanced::widget::{Operation, Tree}; use iced_layershell::advanced::{Clipboard, Shell, Widget, mouse}; -use iced_layershell::{ - Alignment, Length, Padding, Pixels, Point, Rectangle, Size, Vector, event, -}; +use iced_layershell::{Alignment, Length, Padding, Pixels, Point, Rectangle, Size, Vector, event}; type Element<'a, Message, Theme, Renderer> = iced_layershell::core::Element<'a, Message, Theme, Renderer>; /// A container that distributes its contents horizontally. #[allow(missing_debug_implementations)] -pub struct Centerbox<'a, Message, Theme = iced_layershell::Theme, Renderer = iced_layershell::Renderer> { +pub struct Centerbox< + 'a, + Message, + Theme = iced_layershell::Theme, + Renderer = iced_layershell::Renderer, +> { spacing: f32, padding: Padding, width: Length, @@ -234,14 +237,7 @@ where .zip(layout.children()) { child.as_widget_mut().update( - state, - event, - layout, - cursor, - renderer, - clipboard, - shell, - viewport, + state, event, layout, cursor, renderer, clipboard, shell, viewport, ); } } @@ -299,7 +295,14 @@ where viewport: &Rectangle, translation: Vector, ) -> Option> { - overlay::from_children(&mut self.children, tree, layout, renderer, viewport, translation) + overlay::from_children( + &mut self.children, + tree, + layout, + renderer, + viewport, + translation, + ) } } diff --git a/src/widgets/menu_wrapper.rs b/src/widgets/menu_wrapper.rs index ca4a2034..1c554ea8 100644 --- a/src/widgets/menu_wrapper.rs +++ b/src/widgets/menu_wrapper.rs @@ -4,15 +4,20 @@ use iced_layershell::advanced::widget::{Operation, Tree}; use iced_layershell::advanced::{Clipboard, Shell, Widget, mouse}; use iced_layershell::core::widget::tree; use iced_layershell::{ - Background, Border, Color, Length, Padding, Point, Rectangle, Shadow, Size, - Vector, alignment, event, overlay, touch, + Background, Border, Color, Length, Padding, Point, Rectangle, Shadow, Size, Vector, alignment, + event, overlay, touch, }; type Element<'a, Message, Theme, Renderer> = iced_layershell::core::Element<'a, Message, Theme, Renderer>; #[allow(missing_debug_implementations)] -pub struct MenuWrapper<'a, Message, Theme = iced_layershell::Theme, Renderer = iced_layershell::Renderer> { +pub struct MenuWrapper< + 'a, + Message, + Theme = iced_layershell::Theme, + Renderer = iced_layershell::Renderer, +> { x: f32, content: Element<'a, Message, Theme, Renderer>, on_click_outside: Option, diff --git a/src/widgets/position_button.rs b/src/widgets/position_button.rs index 9badb007..45ef2a95 100644 --- a/src/widgets/position_button.rs +++ b/src/widgets/position_button.rs @@ -1,8 +1,7 @@ use iced_layershell::{ Background, Color, Length, Padding, Point, Rectangle, Size, Vector, core::{ - Clipboard, Layout, Shell, Widget, - event, keyboard, layout, mouse, overlay, renderer, touch, + Clipboard, Layout, Shell, Widget, event, keyboard, layout, mouse, overlay, renderer, touch, widget::{Operation, Tree, tree}, }, widget::button::{Catalog, Status, Style, StyleFn}, @@ -22,8 +21,12 @@ enum OnPress<'a, Message> { MessageWithPosition(Box Message + 'a>), } -pub struct PositionButton<'a, Message, Theme = iced_layershell::Theme, Renderer = iced_layershell::Renderer> -where +pub struct PositionButton< + 'a, + Message, + Theme = iced_layershell::Theme, + Renderer = iced_layershell::Renderer, +> where Renderer: iced_layershell::core::Renderer, Theme: Catalog, { @@ -321,7 +324,9 @@ where mouse::ScrollDelta::Lines { y, .. } => Some(*y), mouse::ScrollDelta::Pixels { y, .. } => Some(*y), }; - if cursor.is_over(bounds) && let Some(y) = y { + if cursor.is_over(bounds) + && let Some(y) = y + { let target = if y > 0.0 { self.on_scroll_up.as_ref() } else if y < 0.0 { From 544c3d9f33acc2afadfda4d995f40752937fa9a0 Mon Sep 17 00:00:00 2001 From: Simone Camito Date: Wed, 1 Apr 2026 12:54:18 +0200 Subject: [PATCH 08/14] fix clippy warnings and re-enable output_events subscription --- src/app.rs | 2 +- src/modules/custom_module.rs | 4 +-- src/modules/system_info.rs | 2 +- src/modules/tempo.rs | 2 +- src/modules/tray.rs | 6 ++--- src/modules/workspaces.rs | 6 ++--- src/services/audio.rs | 52 ------------------------------------ 7 files changed, 11 insertions(+), 63 deletions(-) diff --git a/src/app.rs b/src/app.rs index 49023745..ffc17327 100644 --- a/src/app.rs +++ b/src/app.rs @@ -578,7 +578,7 @@ impl App { crate::services::ServiceEvent::Update(_) => Message::ResumeFromSleep, _ => Message::None, }), - // iced_layershell::output_events().map(Message::OutputEvent), + iced_layershell::output_events().map(Message::OutputEvent), listen_with(move |evt, _, _| match evt { iced_layershell::event::Event::Keyboard(keyboard::Event::KeyPressed { key, diff --git a/src/modules/custom_module.rs b/src/modules/custom_module.rs index b929f52b..edc34944 100644 --- a/src/modules/custom_module.rs +++ b/src/modules/custom_module.rs @@ -137,8 +137,8 @@ impl Custom { let icon_with_alert = if show_alert { let alert_canvas = canvas(AlertIndicator) - .width(Length::Fixed(theme.space.xs as f32)) // Size of the dot - .height(Length::Fixed(theme.space.xs as f32)); + .width(Length::Fixed(theme.space.xs)) // Size of the dot + .height(Length::Fixed(theme.space.xs)); // Container to position the dot at the top-right let alert_indicator_container = container(alert_canvas) diff --git a/src/modules/system_info.rs b/src/modules/system_info.rs index edb178dd..0f629218 100644 --- a/src/modules/system_info.rs +++ b/src/modules/system_info.rs @@ -256,7 +256,7 @@ impl SystemInfo { ) -> Element<'a, Message> { row!( container(icon(info_icon).size(theme.font_size.xl)) - .center_x(Length::Fixed(theme.space.xl as f32)), + .center_x(Length::Fixed(theme.space.xl)), text(label).width(Length::Fill), text(value) ) diff --git a/src/modules/tempo.rs b/src/modules/tempo.rs index 6196afc9..b57ae0ed 100644 --- a/src/modules/tempo.rs +++ b/src/modules/tempo.rs @@ -218,7 +218,7 @@ impl Tempo { Row::new() .push( weather_icon(data.current.weather_code, data.current.is_day > 0) - .width(Length::Fixed(theme.font_size.sm as f32)), + .width(Length::Fixed(theme.font_size.sm)), ) .push_maybe( (self.config.weather_indicator == WeatherIndicator::IconAndTemperature) diff --git a/src/modules/tray.rs b/src/modules/tray.rs index d9be8e6b..89711f28 100644 --- a/src/modules/tray.rs +++ b/src/modules/tray.rs @@ -192,12 +192,12 @@ impl TrayModule { position_button(match &item.icon { Some(TrayIcon::Image(handle)) => Into::>::into( Image::new(handle.clone()) - .height(Length::Fixed(theme.font_size.md as f32 - 2.0)), + .height(Length::Fixed(theme.font_size.md - 2.0)), ), Some(TrayIcon::Svg(handle)) => Into::>::into( Svg::new(handle.clone()) - .height(Length::Fixed(theme.font_size.md as f32 + 2.)) - .width(Length::Fixed(theme.font_size.md as f32 + 2.)) + .height(Length::Fixed(theme.font_size.md + 2.)) + .width(Length::Fixed(theme.font_size.md + 2.)) .content_fit(iced_layershell::ContentFit::Cover), ), _ => icon(StaticIcon::Point).into(), diff --git a/src/modules/workspaces.rs b/src/modules/workspaces.rs index ad693e66..4e5e96b1 100644 --- a/src/modules/workspaces.rs +++ b/src/modules/workspaces.rs @@ -468,9 +468,9 @@ impl Workspaces { }) .width(match (w.id < 0, &w.displayed) { (true, _) => Length::Shrink, - (_, Displayed::Active) => Length::Fixed(theme.space.xl as f32), - (_, Displayed::Visible) => Length::Fixed(theme.space.lg as f32), - (_, Displayed::Hidden) => Length::Fixed(theme.space.md as f32), + (_, Displayed::Active) => Length::Fixed(theme.space.xl), + (_, Displayed::Visible) => Length::Fixed(theme.space.lg), + (_, Displayed::Hidden) => Length::Fixed(theme.space.md), }) .height(theme.space.md) .into(), diff --git a/src/services/audio.rs b/src/services/audio.rs index b0d9ff9e..4c7c1213 100644 --- a/src/services/audio.rs +++ b/src/services/audio.rs @@ -695,58 +695,6 @@ impl PulseAudioServer { ListResult::Error => error!("Error during sources list population"), } } - - fn set_sink_mute(&mut self, name: &str, mute: bool) -> anyhow::Result<()> { - let op = self.introspector.set_sink_mute_by_name(name, mute, None); - - self.wait_for_response(op) - } - - fn set_source_mute(&mut self, name: &str, mute: bool) -> anyhow::Result<()> { - let op = self.introspector.set_source_mute_by_name(name, mute, None); - - self.wait_for_response(op) - } - - fn set_sink_volume(&mut self, name: &str, volume: &ChannelVolumes) -> anyhow::Result<()> { - let op = self - .introspector - .set_sink_volume_by_name(name, volume, None); - - self.wait_for_response(op) - } - - fn set_source_volume(&mut self, name: &str, volume: &ChannelVolumes) -> anyhow::Result<()> { - let op = self - .introspector - .set_source_volume_by_name(name, volume, None); - - self.wait_for_response(op) - } - - fn set_default_sink(&mut self, name: &str, port: Option<&str>) -> anyhow::Result<()> { - let op = self.context.set_default_sink(name, |_| {}); - self.wait_for_response(op)?; - - if let Some(port) = port { - let op = self.introspector.set_sink_port_by_name(name, port, None); - self.wait_for_response(op) - } else { - Ok(()) - } - } - - fn set_default_source(&mut self, name: &str, port: Option<&str>) -> anyhow::Result<()> { - let op = self.context.set_default_source(name, |_| {}); - self.wait_for_response(op)?; - - if let Some(port) = port { - let op = self.introspector.set_source_port_by_name(name, port, None); - self.wait_for_response(op) - } else { - Ok(()) - } - } } impl<'a> From<&'a libpulse_binding::context::introspect::ServerInfo<'a>> for ServerInfo { From 5d5231f4033a9f9f5778a4ebef24e96e8524523d Mon Sep 17 00:00:00 2001 From: Simone Camito Date: Wed, 1 Apr 2026 13:07:09 +0200 Subject: [PATCH 09/14] use pipe-based wakeup for PulseAudio mainloop to avoid busy-spinning Replace iterate(false) + sleep(10ms) polling loop with iterate(true) blocking on a registered pipe fd. Commands wake the mainloop via the pipe, restoring zero-idle-CPU behavior. --- src/services/audio.rs | 129 +++++++++++++++++++++++++++++++----------- 1 file changed, 96 insertions(+), 33 deletions(-) diff --git a/src/services/audio.rs b/src/services/audio.rs index 4c7c1213..161c0499 100644 --- a/src/services/audio.rs +++ b/src/services/audio.rs @@ -15,7 +15,11 @@ use libpulse_binding::{ subscribe::InterestMaskSet, }, def::PortAvailable, - mainloop::standard::{IterateResult, Mainloop}, + mainloop::{ + api::Mainloop as MainloopTrait, + events::io::FlagSet as IoFlagSet, + standard::{IterateResult, Mainloop}, + }, operation::{self, Operation}, proplist::{Proplist, properties::APPLICATION_NAME}, volume::{ChannelVolumes, Volume}, @@ -26,9 +30,10 @@ use std::{ cell::RefCell, fmt, ops::{Deref, DerefMut}, + os::fd::{AsRawFd, FromRawFd, OwnedFd}, rc::Rc, + sync::Arc, thread::{self, JoinHandle}, - time::Duration, }; use tokio::sync::mpsc::{UnboundedReceiver, UnboundedSender}; @@ -108,10 +113,32 @@ pub struct AudioData { pub source_slider: Remote, } +/// Write end of a pipe used to wake the PulseAudio mainloop when commands arrive. +#[derive(Clone)] +struct WakePipe(Arc); + +impl fmt::Debug for WakePipe { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_tuple("WakePipe") + .field(&self.0.as_raw_fd()) + .finish() + } +} + +impl WakePipe { + fn wake(&self) { + // Write a single byte to unblock the mainloop's poll(). + // Safe to ignore errors — if the pipe is full, the mainloop is already awake. + let fd = self.0.as_raw_fd(); + unsafe { libc::write(fd, [1u8].as_ptr() as *const _, 1) }; + } +} + #[derive(Debug, Clone)] pub struct AudioService { data: AudioData, commander: UnboundedSender, + wake: WakePipe, } impl Deref for AudioService { @@ -132,6 +159,7 @@ struct PulseAudioServerHandle { _listener: JoinHandle<()>, receiver: UnboundedReceiver, sender: UnboundedSender, + wake: WakePipe, } impl AudioService { @@ -147,6 +175,7 @@ impl AudioService { .send(ServiceEvent::Init(AudioService { data: AudioData::default(), commander: handle.sender.clone(), + wake: handle.wake.clone(), })) .await; State::Active(handle) @@ -331,51 +360,65 @@ impl Service for AudioService { type Command = AudioCommand; fn command(&mut self, command: Self::Command) -> Task> { - match command { + let sent = match command { AudioCommand::ToggleSinkMute => { if let Some(sink) = self.active_sink() { - let _ = self.commander.send(PulseAudioCommand::SinkMute( - sink.name.clone(), - !sink.is_mute, - )); + self.commander + .send(PulseAudioCommand::SinkMute( + sink.name.clone(), + !sink.is_mute, + )) + .is_ok() + } else { + false } } AudioCommand::ToggleSourceMute => { if let Some(source) = self.active_source() { - let _ = self.commander.send(PulseAudioCommand::SourceMute( - source.name.clone(), - !source.is_mute, - )); + self.commander + .send(PulseAudioCommand::SourceMute( + source.name.clone(), + !source.is_mute, + )) + .is_ok() + } else { + false } } AudioCommand::SinkVolume(volume) => { if let Some(sink) = self.active_sink() && let Some(volume) = sink.volume.scaled(volume) { - let _ = self - .commander - .send(PulseAudioCommand::SinkVolume(sink.name.clone(), volume)); + self.commander + .send(PulseAudioCommand::SinkVolume(sink.name.clone(), volume)) + .is_ok() + } else { + false } } AudioCommand::SourceVolume(volume) => { if let Some(source) = self.active_source() && let Some(volume) = source.volume.scaled(volume) { - let _ = self - .commander - .send(PulseAudioCommand::SourceVolume(source.name.clone(), volume)); + self.commander + .send(PulseAudioCommand::SourceVolume(source.name.clone(), volume)) + .is_ok() + } else { + false } } - AudioCommand::DefaultSink(name, port) => { - let _ = self - .commander - .send(PulseAudioCommand::DefaultSink(name, port)); - } - AudioCommand::DefaultSource(name, port) => { - let _ = self - .commander - .send(PulseAudioCommand::DefaultSource(name, port)); - } + AudioCommand::DefaultSink(name, port) => self + .commander + .send(PulseAudioCommand::DefaultSink(name, port)) + .is_ok(), + AudioCommand::DefaultSource(name, port) => self + .commander + .send(PulseAudioCommand::DefaultSource(name, port)) + .is_ok(), + }; + + if sent { + self.wake.wake(); } iced_layershell::Task::none() @@ -454,6 +497,16 @@ impl PulseAudioServer { let (init_tx, mut init_rx) = tokio::sync::mpsc::unbounded_channel(); + // Create a pipe to wake the PulseAudio mainloop when commands arrive. + let (wake_read, wake_write) = { + let mut fds = [0i32; 2]; + if unsafe { libc::pipe2(fds.as_mut_ptr(), libc::O_CLOEXEC | libc::O_NONBLOCK) } != 0 { + return Err(anyhow::anyhow!("failed to create wake pipe")); + } + unsafe { (OwnedFd::from_raw_fd(fds[0]), OwnedFd::from_raw_fd(fds[1])) } + }; + let wake = WakePipe(Arc::new(wake_write)); + // Single thread for both listening and commanding — avoids PulseAudio // mainloop assertion failures from concurrent connections. let handle = thread::spawn({ @@ -554,11 +607,23 @@ impl PulseAudioServer { }, ))); - // Main loop: iterate PulseAudio and process commands on the same thread + // Register the wake pipe on the mainloop so that iterate(true) + // unblocks when a command is sent from another thread. + let wake_fd = wake_read.as_raw_fd(); + let _wake_io = server.mainloop.new_io_event( + wake_fd, + IoFlagSet::INPUT, + Box::new(move |_event, _fd, _flags| { + // Drain the pipe so it doesn't keep firing + let mut buf = [0u8; 64]; + unsafe { libc::read(wake_fd, buf.as_mut_ptr() as *mut _, buf.len()) }; + }), + ); + + // Main loop: blocks until PulseAudio events OR wake pipe signal let mut cmd_introspector = server.context.introspect(); loop { - // Non-blocking iterate to allow processing commands - let data = server.mainloop.iterate(false); + let data = server.mainloop.iterate(true); if let IterateResult::Quit(_) | IterateResult::Err(_) = data { error!("PulseAudio mainloop error"); break; @@ -595,9 +660,6 @@ impl PulseAudioServer { } } } - - // Brief sleep to avoid busy-spinning - std::thread::sleep(Duration::from_millis(10)); } } Err(e) => { @@ -612,6 +674,7 @@ impl PulseAudioServer { _listener: handle, receiver: from_server_rx, sender: to_server_tx, + wake, }), _ => Err(anyhow::anyhow!("Failed to start PulseAudio thread")), } From 15d49b8f5f9cf9903136694cceecff9fc0ee77f2 Mon Sep 17 00:00:00 2001 From: Simone Camito Date: Wed, 1 Apr 2026 13:41:19 +0200 Subject: [PATCH 10/14] rename iced_layershell dependency to iced to minimize import changes --- Cargo.toml | 2 +- src/app.rs | 12 ++++++------ src/components/icons.rs | 2 +- src/config.rs | 4 ++-- src/main.rs | 6 +++--- src/menu.rs | 6 +++--- src/modules/clock.rs | 2 +- src/modules/custom_module.rs | 14 +++++++------- src/modules/keyboard_layout.rs | 2 +- src/modules/keyboard_submap.rs | 2 +- src/modules/media_player.rs | 2 +- src/modules/mod.rs | 2 +- src/modules/privacy.rs | 2 +- src/modules/settings/audio.rs | 2 +- src/modules/settings/bluetooth.rs | 2 +- src/modules/settings/brightness.rs | 2 +- src/modules/settings/mod.rs | 4 ++-- src/modules/settings/network.rs | 4 ++-- src/modules/settings/power.rs | 2 +- src/modules/system_info.rs | 2 +- src/modules/tempo.rs | 6 +++--- src/modules/tray.rs | 4 ++-- src/modules/updates.rs | 2 +- src/modules/window_title.rs | 2 +- src/modules/workspaces.rs | 24 ++++++++++++------------ src/outputs.rs | 2 +- src/password_dialog.rs | 2 +- src/services/audio.rs | 6 +++--- src/services/bluetooth/mod.rs | 10 +++++----- src/services/brightness.rs | 2 +- src/services/compositor/mod.rs | 4 ++-- src/services/logind.rs | 2 +- src/services/mod.rs | 2 +- src/services/mpris/mod.rs | 8 ++++---- src/services/network/dbus.rs | 2 +- src/services/network/iwd_dbus/mod.rs | 6 +++--- src/services/network/mod.rs | 6 +++--- src/services/privacy.rs | 2 +- src/services/throttle.rs | 2 +- src/services/tray/dbus.rs | 2 +- src/services/tray/mod.rs | 4 ++-- src/services/upower/mod.rs | 6 +++--- src/theme.rs | 2 +- src/utils/mod.rs | 14 +++++++------- src/utils/remote_value.rs | 12 ++++++------ src/widgets/centerbox.rs | 24 ++++++++++++------------ src/widgets/menu_wrapper.rs | 26 +++++++++++++------------- src/widgets/position_button.rs | 18 +++++++++--------- 48 files changed, 139 insertions(+), 139 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3342c6ec..095b36e8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ depends = ["libwayland-client0", "libpipewire-0.3-0t64", "libpulse0"] depends = ["libwayland-client", "pipewire-libs", "pulseaudio-libs"] [dependencies] -iced_layershell = { git = "https://github.com/MalpenZibo/iced_layershell", branch = "main", features = [ +iced = { package = "iced_layershell", git = "https://github.com/MalpenZibo/iced_layershell", branch = "main", features = [ "tokio", "advanced", "wgpu", diff --git a/src/app.rs b/src/app.rs index ffc17327..188b82e8 100644 --- a/src/app.rs +++ b/src/app.rs @@ -25,7 +25,7 @@ use crate::{ widgets::{ButtonUIRef, Centerbox}, }; use flexi_logger::LoggerHandle; -use iced_layershell::{ +use iced::{ Alignment, Color, Element, Gradient, Length, OutputEvent, Radians, Subscription, SurfaceId, Task, Theme, event::listen_with, @@ -578,9 +578,9 @@ impl App { crate::services::ServiceEvent::Update(_) => Message::ResumeFromSleep, _ => Message::None, }), - iced_layershell::output_events().map(Message::OutputEvent), + iced::output_events().map(Message::OutputEvent), listen_with(move |evt, _, _| match evt { - iced_layershell::event::Event::Keyboard(keyboard::Event::KeyPressed { + iced::event::Event::Keyboard(keyboard::Event::KeyPressed { key, .. }) => { @@ -595,14 +595,14 @@ impl App { _ => None, }), Subscription::run(|| { - use iced_layershell::futures::StreamExt; + use iced::futures::StreamExt; signal_hook_tokio::Signals::new([libc::SIGUSR1]) .expect("Failed to create signal stream") .filter_map(|sig| { if sig == libc::SIGUSR1 { - iced_layershell::futures::future::ready(Some(Message::ToggleVisibility)) + iced::futures::future::ready(Some(Message::ToggleVisibility)) } else { - iced_layershell::futures::future::ready(None) + iced::futures::future::ready(None) } }) }), diff --git a/src/components/icons.rs b/src/components/icons.rs index 4dd1aa0a..71586a7d 100644 --- a/src/components/icons.rs +++ b/src/components/icons.rs @@ -1,5 +1,5 @@ use crate::theme::AshellTheme; -use iced_layershell::{ +use iced::{ Color, Element, Font, Length, Theme, widget::{ Text, button as button_fn, diff --git a/src/config.rs b/src/config.rs index 01360d52..3d7277b1 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,8 +1,8 @@ use crate::app::Message; use crate::services::upower::PeripheralDeviceKind; use hex_color::HexColor; -use iced_layershell::futures::StreamExt; -use iced_layershell::{Color, Subscription, futures::SinkExt, stream::channel, theme::palette}; +use iced::futures::StreamExt; +use iced::{Color, Subscription, futures::SinkExt, stream::channel, theme::palette}; use inotify::EventMask; use inotify::Inotify; use inotify::WatchMask; diff --git a/src/main.rs b/src/main.rs index 291ec7f7..e54fead1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,7 +5,7 @@ use clap::Parser; use flexi_logger::{ Age, Cleanup, Criterion, FileSpec, LogSpecBuilder, LogSpecification, Logger, Naming, }; -use iced_layershell::{Anchor, Font, KeyboardInteractivity, Layer, LayerShellSettings}; +use iced::{Anchor, Font, KeyboardInteractivity, Layer, LayerShellSettings}; use log::{debug, error, warn}; use std::backtrace::Backtrace; use std::panic; @@ -52,7 +52,7 @@ fn get_log_spec(log_level: &str) -> LogSpecification { } } -fn main() -> iced_layershell::Result { +fn main() -> iced::Result { let args = Args::parse(); debug!("args: {args:?}"); @@ -101,7 +101,7 @@ fn main() -> iced_layershell::Result { config::Layer::Overlay => Layer::Overlay, }; - iced_layershell::application( + iced::application( App::new((logger, config.clone(), config_path)), App::update, App::view, diff --git a/src/menu.rs b/src/menu.rs index 729adac7..6cb4edeb 100644 --- a/src/menu.rs +++ b/src/menu.rs @@ -2,9 +2,9 @@ use crate::app::{self, App}; use crate::config::{AppearanceStyle, Position}; use crate::theme::backdrop_color; use crate::widgets::{self, ButtonUIRef}; -use iced_layershell::alignment::Vertical; -use iced_layershell::widget::container::Style; -use iced_layershell::{ +use iced::alignment::Vertical; +use iced::widget::container::Style; +use iced::{ Border, Element, KeyboardInteractivity, Layer, Length, Padding, Pixels, SurfaceId, Task, Theme, set_keyboard_interactivity, set_layer, widget::container, }; diff --git a/src/modules/clock.rs b/src/modules/clock.rs index 64ba8773..c84762ed 100644 --- a/src/modules/clock.rs +++ b/src/modules/clock.rs @@ -1,6 +1,6 @@ use crate::{config::ClockModuleConfig, theme::AshellTheme}; use chrono::{DateTime, Local}; -use iced_layershell::{Element, Subscription, time::every, widget::text}; +use iced::{Element, Subscription, time::every, widget::text}; use log::warn; use std::time::Duration; diff --git a/src/modules/custom_module.rs b/src/modules/custom_module.rs index edc34944..b5b58d11 100644 --- a/src/modules/custom_module.rs +++ b/src/modules/custom_module.rs @@ -4,13 +4,13 @@ use crate::{ theme::AshellTheme, utils::launcher::execute_command, }; -use iced_layershell::widget::canvas; -use iced_layershell::{ +use iced::widget::canvas; +use iced::{ Element, Length, Subscription, Theme, stream::channel, widget::{Stack, row, text}, }; -use iced_layershell::{ +use iced::{ mouse::Cursor, widget::{ canvas::{Cache, Geometry, Path, Program}, @@ -53,9 +53,9 @@ impl Program for AlertIndicator { fn draw( &self, cache: &Self::State, - renderer: &iced_layershell::Renderer, + renderer: &iced::Renderer, theme: &Theme, - bounds: iced_layershell::Rectangle, + bounds: iced::Rectangle, _cursor: Cursor, ) -> Vec { let geometry = cache.draw(renderer, bounds.size(), |frame| { @@ -144,8 +144,8 @@ impl Custom { let alert_indicator_container = container(alert_canvas) .width(Length::Fill) // Take full width of the stack item .height(Length::Fill) // Take full height - .align_x(iced_layershell::alignment::Horizontal::Right) - .align_y(iced_layershell::alignment::Vertical::Top); + .align_x(iced::alignment::Horizontal::Right) + .align_y(iced::alignment::Vertical::Top); Stack::new() .push(padded_icon_container) // Padded icon is the base layer diff --git a/src/modules/keyboard_layout.rs b/src/modules/keyboard_layout.rs index bfc13072..6c0c54d2 100644 --- a/src/modules/keyboard_layout.rs +++ b/src/modules/keyboard_layout.rs @@ -6,7 +6,7 @@ use crate::{ }, theme::AshellTheme, }; -use iced_layershell::{Element, Subscription, Task, widget::text}; +use iced::{Element, Subscription, Task, widget::text}; #[derive(Debug, Clone)] pub enum Message { diff --git a/src/modules/keyboard_submap.rs b/src/modules/keyboard_submap.rs index dd01a56a..b748f0a0 100644 --- a/src/modules/keyboard_submap.rs +++ b/src/modules/keyboard_submap.rs @@ -2,7 +2,7 @@ use crate::{ services::{ReadOnlyService, ServiceEvent, compositor::CompositorService}, theme::AshellTheme, }; -use iced_layershell::{Element, Subscription, widget::text}; +use iced::{Element, Subscription, widget::text}; #[derive(Debug, Clone)] pub enum Message { diff --git a/src/modules/media_player.rs b/src/modules/media_player.rs index bad55a00..536fc22f 100644 --- a/src/modules/media_player.rs +++ b/src/modules/media_player.rs @@ -12,7 +12,7 @@ use crate::{ utils::PushMaybe, utils::truncate_text, }; -use iced_layershell::{ +use iced::{ Background, Border, Element, Length, Subscription, Task, Theme, alignment::Vertical, widget::{column, container, image, row, rule, slider, space, text}, diff --git a/src/modules/mod.rs b/src/modules/mod.rs index b0834381..567cf17d 100644 --- a/src/modules/mod.rs +++ b/src/modules/mod.rs @@ -6,7 +6,7 @@ use crate::{ utils::PushMaybe, widgets::position_button, }; -use iced_layershell::{ +use iced::{ Alignment, Border, Color, Element, Length, Subscription, SurfaceId, widget::{Row, container}, }; diff --git a/src/modules/privacy.rs b/src/modules/privacy.rs index 7d672335..f82a0699 100644 --- a/src/modules/privacy.rs +++ b/src/modules/privacy.rs @@ -4,7 +4,7 @@ use crate::{ theme::AshellTheme, utils::PushMaybe, }; -use iced_layershell::{ +use iced::{ Alignment, Element, Subscription, widget::{Row, container}, }; diff --git a/src/modules/settings/audio.rs b/src/modules/settings/audio.rs index 4f693878..c02a0f69 100644 --- a/src/modules/settings/audio.rs +++ b/src/modules/settings/audio.rs @@ -10,7 +10,7 @@ use crate::{ utils::PushMaybe, utils::remote_value::{self, Remote}, }; -use iced_layershell::{ +use iced::{ Alignment, Element, Length, Subscription, SurfaceId, Task, Theme, mouse::ScrollDelta, widget::{Column, MouseArea, Row, Text, button, column, container, row, rule, slider, text}, diff --git a/src/modules/settings/bluetooth.rs b/src/modules/settings/bluetooth.rs index 80df52ac..d3389bcd 100644 --- a/src/modules/settings/bluetooth.rs +++ b/src/modules/settings/bluetooth.rs @@ -9,7 +9,7 @@ use crate::{ theme::AshellTheme, utils::PushMaybe, }; -use iced_layershell::{ +use iced::{ Element, Length, Padding, Subscription, SurfaceId, Task, Theme, alignment::{Alignment, Horizontal, Vertical}, widget::{Column, MouseArea, Row, button, column, container, row, rule, scrollable, text}, diff --git a/src/modules/settings/brightness.rs b/src/modules/settings/brightness.rs index 16b6b8b1..bc1cb021 100644 --- a/src/modules/settings/brightness.rs +++ b/src/modules/settings/brightness.rs @@ -8,7 +8,7 @@ use crate::{ theme::AshellTheme, utils::remote_value, }; -use iced_layershell::{ +use iced::{ Alignment, Element, Subscription, Task, mouse::ScrollDelta, widget::{MouseArea, Text, container, row, slider, text}, diff --git a/src/modules/settings/mod.rs b/src/modules/settings/mod.rs index 0177c9cd..83265708 100644 --- a/src/modules/settings/mod.rs +++ b/src/modules/settings/mod.rs @@ -1,7 +1,7 @@ use std::collections::HashMap; use std::time::Duration; -use iced_layershell::futures::future::join_all; +use iced::futures::future::join_all; use log::{debug, error}; use tokio::process::Command; use tokio::time::timeout; @@ -22,7 +22,7 @@ use crate::{ theme::AshellTheme, utils::PushMaybe, }; -use iced_layershell::{ +use iced::{ Alignment, Background, Border, Element, Length, Padding, Subscription, SurfaceId, Task, Theme, widget::{Column, MouseArea, Row, Space, button, container, row, space, text}, }; diff --git a/src/modules/settings/network.rs b/src/modules/settings/network.rs index d1d562d8..82fac894 100644 --- a/src/modules/settings/network.rs +++ b/src/modules/settings/network.rs @@ -12,7 +12,7 @@ use crate::{ theme::AshellTheme, utils::IndicatorState, }; -use iced_layershell::{ +use iced::{ Alignment, Element, Length, Padding, Subscription, SurfaceId, Task, Theme, widget::{Column, MouseArea, button, column, container, row, rule, scrollable, text, toggler}, }; @@ -39,7 +39,7 @@ fn get_connectivity_color( connectivity: ConnectivityState, indicator_state: IndicatorState, theme: &Theme, -) -> Option { +) -> Option { match (connectivity, indicator_state) { (ConnectivityState::Full, IndicatorState::Warning) => { Some(theme.extended_palette().danger.weak.color) diff --git a/src/modules/settings/power.rs b/src/modules/settings/power.rs index 85915639..a319b487 100644 --- a/src/modules/settings/power.rs +++ b/src/modules/settings/power.rs @@ -15,7 +15,7 @@ use crate::{ utils::PushMaybe, utils::{self, IndicatorState, format_duration}, }; -use iced_layershell::{ +use iced::{ Alignment, Element, Length, Subscription, Task, Theme, alignment::Vertical, widget::{Column, Row, button, column, container, row, rule, text}, diff --git a/src/modules/system_info.rs b/src/modules/system_info.rs index 0f629218..f8cf4790 100644 --- a/src/modules/system_info.rs +++ b/src/modules/system_info.rs @@ -5,7 +5,7 @@ use crate::{ theme::AshellTheme, utils::PushMaybe, }; -use iced_layershell::{ +use iced::{ Alignment, Element, Length, Subscription, Theme, time::every, widget::{Column, Row, column, container, row, rule, text}, diff --git a/src/modules/tempo.rs b/src/modules/tempo.rs index b57ae0ed..9918ca1a 100644 --- a/src/modules/tempo.rs +++ b/src/modules/tempo.rs @@ -10,7 +10,7 @@ use chrono::{ Weekday, }; use chrono_tz::Tz; -use iced_layershell::{ +use iced::{ Background, Border, Degrees, Element, Length::{self, FillPortion}, Padding, Rotation, Subscription, Theme, @@ -672,7 +672,7 @@ impl Tempo { ) .into(), border: Border::default().rounded( - iced_layershell::border::Radius { + iced::border::Radius { top_left: if index == 0 { theme.radius.lg } else { @@ -733,7 +733,7 @@ impl Tempo { let interval = *interval; channel( 100, - async move |mut output: iced_layershell::futures::channel::mpsc::Sender< + async move |mut output: iced::futures::channel::mpsc::Sender< Message, >| { let mut interval = tokio::time::interval(interval); diff --git a/src/modules/tray.rs b/src/modules/tray.rs index 89711f28..c406011a 100644 --- a/src/modules/tray.rs +++ b/src/modules/tray.rs @@ -12,7 +12,7 @@ use crate::{ utils::PushMaybe, widgets::{ButtonUIRef, position_button}, }; -use iced_layershell::{ +use iced::{ Alignment, Element, Length, Padding, Subscription, SurfaceId, Task, widget::{Column, Image, Row, Svg, button, container, row, rule, text, toggler}, }; @@ -198,7 +198,7 @@ impl TrayModule { Svg::new(handle.clone()) .height(Length::Fixed(theme.font_size.md + 2.)) .width(Length::Fixed(theme.font_size.md + 2.)) - .content_fit(iced_layershell::ContentFit::Cover), + .content_fit(iced::ContentFit::Cover), ), _ => icon(StaticIcon::Point).into(), }) diff --git a/src/modules/updates.rs b/src/modules/updates.rs index 5fe9d6c6..45781ea8 100644 --- a/src/modules/updates.rs +++ b/src/modules/updates.rs @@ -4,7 +4,7 @@ use crate::{ menu::MenuSize, theme::AshellTheme, }; -use iced_layershell::{ +use iced::{ Alignment, Element, Length, Padding, Subscription, SurfaceId, Task, alignment::Horizontal, stream::channel, diff --git a/src/modules/window_title.rs b/src/modules/window_title.rs index eed387a7..ab807973 100644 --- a/src/modules/window_title.rs +++ b/src/modules/window_title.rs @@ -4,7 +4,7 @@ use crate::{ theme::AshellTheme, utils::truncate_text, }; -use iced_layershell::{ +use iced::{ Element, Subscription, widget::{container, text}, }; diff --git a/src/modules/workspaces.rs b/src/modules/workspaces.rs index 4e5e96b1..c73c0754 100644 --- a/src/modules/workspaces.rs +++ b/src/modules/workspaces.rs @@ -7,7 +7,7 @@ use crate::{ }, theme::AshellTheme, }; -use iced_layershell::{ +use iced::{ Element, Length, Subscription, SurfaceId, alignment, widget::{MouseArea, Row, button, container, text}, }; @@ -249,7 +249,7 @@ impl Workspaces { } } - pub fn update(&mut self, message: Message) -> iced_layershell::Task { + pub fn update(&mut self, message: Message) -> iced::Task { match message { Message::ServiceEvent(event) => { match event { @@ -265,7 +265,7 @@ impl Workspaces { } _ => {} } - iced_layershell::Task::none() + iced::Task::none() } Message::ChangeWorkspace(id) => { if let Some(service) = &mut self.service { @@ -289,7 +289,7 @@ impl Workspaces { } } } - iced_layershell::Task::none() + iced::Task::none() } Message::ToggleSpecialWorkspace(id) => { if let Some(service) = &mut self.service @@ -305,7 +305,7 @@ impl Workspaces { )) .map(Message::ServiceEvent); } - iced_layershell::Task::none() + iced::Task::none() } Message::Scroll(direction) => { self.scroll_accumulator = 0.; @@ -316,14 +316,14 @@ impl Workspaces { .command(CompositorCommand::ScrollWorkspace(direction)) .map(Message::ServiceEvent); } - return iced_layershell::Task::none();*/ + return iced::Task::none();*/ let current_workspace = self .ui_workspaces .iter() .find(|w| w.displayed == Displayed::Active); let Some(current_workspace_id) = current_workspace.map(|w| w.id) else { - return iced_layershell::Task::none(); + return iced::Task::none(); }; let current_monitor = current_workspace @@ -373,12 +373,12 @@ impl Workspaces { if let Some(next) = next_workspace { return self.update(Message::ChangeWorkspace(next.id)); } - iced_layershell::Task::none() + iced::Task::none() } Message::ConfigReloaded(cfg) => { self.config = cfg; self.recalculate_ui_workspaces(); - iced_layershell::Task::none() + iced::Task::none() } Message::ScrollAccumulator(value) => { if value == 0. { @@ -387,7 +387,7 @@ impl Workspaces { self.scroll_accumulator += value; } - iced_layershell::Task::none() + iced::Task::none() } } } @@ -484,14 +484,14 @@ impl Workspaces { .spacing(theme.space.xxs), ) .on_scroll(move |direction| match direction { - iced_layershell::mouse::ScrollDelta::Lines { y, .. } => { + iced::mouse::ScrollDelta::Lines { y, .. } => { if y > 0. { Message::Scroll(-1) } else { Message::Scroll(1) } } - iced_layershell::mouse::ScrollDelta::Pixels { y, .. } => { + iced::mouse::ScrollDelta::Pixels { y, .. } => { let sensibility = 3.; if self.scroll_accumulator.abs() < sensibility { diff --git a/src/outputs.rs b/src/outputs.rs index 4740441a..d536a80d 100644 --- a/src/outputs.rs +++ b/src/outputs.rs @@ -1,4 +1,4 @@ -use iced_layershell::{ +use iced::{ Anchor, KeyboardInteractivity, Layer, LayerShellSettings, OutputId, SurfaceId, Task, destroy_layer_surface, new_layer_surface, set_anchor, set_exclusive_zone, set_keyboard_interactivity, set_size, diff --git a/src/password_dialog.rs b/src/password_dialog.rs index 024cf957..d8b86bf6 100644 --- a/src/password_dialog.rs +++ b/src/password_dialog.rs @@ -3,7 +3,7 @@ use crate::{ theme::AshellTheme, utils::PushMaybe, }; -use iced_layershell::{ +use iced::{ Alignment, Element, Length, SurfaceId, alignment::Vertical, widget::{button, column, container, row, space, text, text_input}, diff --git a/src/services/audio.rs b/src/services/audio.rs index 161c0499..b727e337 100644 --- a/src/services/audio.rs +++ b/src/services/audio.rs @@ -1,6 +1,6 @@ use super::{ReadOnlyService, Service, ServiceEvent}; use crate::utils::remote_value::Remote; -use iced_layershell::{ +use iced::{ Subscription, Task, futures::{SinkExt, StreamExt, channel::mpsc::Sender, stream::pending}, stream::channel, @@ -334,7 +334,7 @@ impl ReadOnlyService for AudioService { } } - fn subscribe() -> iced_layershell::Subscription> { + fn subscribe() -> iced::Subscription> { Subscription::run_with(TypeId::of::(), |_| { channel(100, async |mut output| { let mut state = State::Init; @@ -421,7 +421,7 @@ impl Service for AudioService { self.wake.wake(); } - iced_layershell::Task::none() + iced::Task::none() } } diff --git a/src/services/bluetooth/mod.rs b/src/services/bluetooth/mod.rs index a4504325..fbd632cc 100644 --- a/src/services/bluetooth/mod.rs +++ b/src/services/bluetooth/mod.rs @@ -1,6 +1,6 @@ use super::{ReadOnlyService, Service, ServiceEvent}; use dbus::{BatteryProxy, BluetoothDbus, DeviceProxy}; -use iced_layershell::{ +use iced::{ Subscription, Task, futures::{SinkExt, Stream, StreamExt, channel::mpsc::Sender, stream::pending, stream_select}, stream::channel, @@ -145,15 +145,15 @@ impl BluetoothService { } let battery_events = if batteries.is_empty() { - iced_layershell::futures::stream::pending().boxed() + iced::futures::stream::pending().boxed() } else { - iced_layershell::futures::stream::select_all(batteries).boxed() + iced::futures::stream::select_all(batteries).boxed() }; let device_property_events = if device_properties.is_empty() { - iced_layershell::futures::stream::pending().boxed() + iced::futures::stream::pending().boxed() } else { - iced_layershell::futures::stream::select_all(device_properties).boxed() + iced::futures::stream::select_all(device_properties).boxed() }; Box::pin(stream_select!( diff --git a/src/services/brightness.rs b/src/services/brightness.rs index c9917716..ace822d8 100644 --- a/src/services/brightness.rs +++ b/src/services/brightness.rs @@ -1,6 +1,6 @@ use super::{ReadOnlyService, Service, ServiceEvent}; use crate::{services::throttle::ThrottleExt, utils::remote_value::Remote}; -use iced_layershell::{ +use iced::{ Subscription, Task, futures::{SinkExt, StreamExt, channel::mpsc::Sender, stream::pending}, stream::channel, diff --git a/src/services/compositor/mod.rs b/src/services/compositor/mod.rs index 80d06330..28c14307 100644 --- a/src/services/compositor/mod.rs +++ b/src/services/compositor/mod.rs @@ -7,8 +7,8 @@ pub use self::types::{ }; use crate::services::{ReadOnlyService, Service, ServiceEvent}; -use iced_layershell::futures::SinkExt; -use iced_layershell::{Subscription, Task, stream::channel}; +use iced::futures::SinkExt; +use iced::{Subscription, Task, stream::channel}; use std::{any::TypeId, ops::Deref, sync::OnceLock}; use tokio::sync::{OnceCell, broadcast}; diff --git a/src/services/logind.rs b/src/services/logind.rs index f4709528..f06edb5e 100644 --- a/src/services/logind.rs +++ b/src/services/logind.rs @@ -1,5 +1,5 @@ use super::{ReadOnlyService, ServiceEvent}; -use iced_layershell::{ +use iced::{ Subscription, futures::{SinkExt, StreamExt}, stream::channel, diff --git a/src/services/mod.rs b/src/services/mod.rs index be1be925..d86d9b44 100644 --- a/src/services/mod.rs +++ b/src/services/mod.rs @@ -1,4 +1,4 @@ -use iced_layershell::{Subscription, Task}; +use iced::{Subscription, Task}; pub mod audio; pub mod bluetooth; diff --git a/src/services/mpris/mod.rs b/src/services/mpris/mod.rs index f40f52e8..25154cab 100644 --- a/src/services/mpris/mod.rs +++ b/src/services/mpris/mod.rs @@ -1,6 +1,6 @@ use super::{ReadOnlyService, Service, ServiceEvent}; use dbus::MprisPlayerProxy; -use iced_layershell::{ +use iced::{ Subscription, core::Bytes, futures::{ @@ -511,7 +511,7 @@ pub enum PlayerCommand { impl Service for MprisPlayerService { type Command = MprisPlayerCommand; - fn command(&mut self, command: Self::Command) -> iced_layershell::Task> { + fn command(&mut self, command: Self::Command) -> iced::Task> { { let names: Vec = self.data.iter().map(|d| d.service.clone()).collect(); let s = self.data.iter().find(|d| d.service == command.service_name); @@ -519,7 +519,7 @@ impl Service for MprisPlayerService { if let Some(s) = s { let mpris_player_proxy = s.proxy.clone(); let conn = self.conn.clone(); - iced_layershell::Task::perform( + iced::Task::perform( async move { match command.command { PlayerCommand::Prev => { @@ -552,7 +552,7 @@ impl Service for MprisPlayerService { ServiceEvent::Update, ) } else { - iced_layershell::Task::none() + iced::Task::none() } } } diff --git a/src/services/network/dbus.rs b/src/services/network/dbus.rs index 3c8c8d53..14606b59 100644 --- a/src/services/network/dbus.rs +++ b/src/services/network/dbus.rs @@ -4,7 +4,7 @@ use crate::services::{ }; use super::{AccessPoint, ActiveConnectionInfo, KnownConnection, Vpn}; -use iced_layershell::futures::{Stream, StreamExt, stream::select_all}; +use iced::futures::{Stream, StreamExt, stream::select_all}; use itertools::Itertools; use log::{debug, warn}; use std::{collections::HashMap, ops::Deref}; diff --git a/src/services/network/iwd_dbus/mod.rs b/src/services/network/iwd_dbus/mod.rs index 22c786f9..17e93075 100644 --- a/src/services/network/iwd_dbus/mod.rs +++ b/src/services/network/iwd_dbus/mod.rs @@ -25,9 +25,9 @@ use zbus::interface; use super::dbus::DeviceState; use super::{AccessPoint, ActiveConnectionInfo, KnownConnection, NetworkBackend, NetworkEvent}; -use iced_layershell::futures::future::join_all; -use iced_layershell::futures::stream::select_all; -use iced_layershell::futures::{Stream, StreamExt}; +use iced::futures::future::join_all; +use iced::futures::stream::select_all; +use iced::futures::{Stream, StreamExt}; use log::{debug, info, warn}; use std::collections::HashMap; diff --git a/src/services/network/mod.rs b/src/services/network/mod.rs index 84ea3f91..e827eb4e 100644 --- a/src/services/network/mod.rs +++ b/src/services/network/mod.rs @@ -2,9 +2,9 @@ use super::{Service, ServiceEvent}; use crate::services::ReadOnlyService; use dbus::ConnectivityState; use dbus::NetworkDbus; -use iced_layershell::futures::TryFutureExt; -use iced_layershell::futures::stream::pending; -use iced_layershell::{ +use iced::futures::TryFutureExt; +use iced::futures::stream::pending; +use iced::{ Subscription, Task, futures::{SinkExt, StreamExt, channel::mpsc::Sender}, stream::channel, diff --git a/src/services/privacy.rs b/src/services/privacy.rs index 7c117880..b763dc36 100644 --- a/src/services/privacy.rs +++ b/src/services/privacy.rs @@ -1,5 +1,5 @@ use super::{ReadOnlyService, ServiceEvent}; -use iced_layershell::{ +use iced::{ Subscription, futures::{ FutureExt, SinkExt, Stream, StreamExt, channel::mpsc::Sender, select, stream::pending, diff --git a/src/services/throttle.rs b/src/services/throttle.rs index 83871cac..3f4ad40c 100644 --- a/src/services/throttle.rs +++ b/src/services/throttle.rs @@ -1,4 +1,4 @@ -use iced_layershell::futures::{ +use iced::futures::{ Stream, task::{Context, Poll}, }; diff --git a/src/services/tray/dbus.rs b/src/services/tray/dbus.rs index 052423c2..b0a6a8e2 100644 --- a/src/services/tray/dbus.rs +++ b/src/services/tray/dbus.rs @@ -1,4 +1,4 @@ -use iced_layershell::futures::StreamExt; +use iced::futures::StreamExt; use log::{info, warn}; use std::time::Duration; use zbus::{ diff --git a/src/services/tray/mod.rs b/src/services/tray/mod.rs index 6840742d..3ea52e7a 100644 --- a/src/services/tray/mod.rs +++ b/src/services/tray/mod.rs @@ -4,7 +4,7 @@ use dbus::{ StatusNotifierWatcherProxy, }; use freedesktop_icons::lookup; -use iced_layershell::{ +use iced::{ Subscription, Task, futures::{ SinkExt, Stream, StreamExt, @@ -658,7 +658,7 @@ impl ReadOnlyService for TrayService { } } - fn subscribe() -> iced_layershell::Subscription> { + fn subscribe() -> iced::Subscription> { Subscription::run_with(TypeId::of::(), |_| { channel(100, async |mut output| { let mut state = State::Init; diff --git a/src/services/upower/mod.rs b/src/services/upower/mod.rs index 3c4124b3..99554f3a 100644 --- a/src/services/upower/mod.rs +++ b/src/services/upower/mod.rs @@ -3,7 +3,7 @@ use crate::{ components::icons::StaticIcon, services::throttle::ThrottleExt, utils::IndicatorState, }; use dbus::{DeviceProxy, PowerProfilesProxy, SystemBattery, UPowerDbus, UPowerProxy, UpDeviceKind}; -use iced_layershell::{ +use iced::{ Subscription, futures::{ SinkExt, Stream, StreamExt, @@ -677,8 +677,8 @@ pub enum PowerProfileCommand { impl Service for UPowerService { type Command = PowerProfileCommand; - fn command(&mut self, command: Self::Command) -> iced_layershell::Task> { - iced_layershell::Task::perform( + fn command(&mut self, command: Self::Command) -> iced::Task> { + iced::Task::perform( { let conn = self.conn.clone(); let power_profile = self.power_profile; diff --git a/src/theme.rs b/src/theme.rs index 60294aad..71413edc 100644 --- a/src/theme.rs +++ b/src/theme.rs @@ -1,5 +1,5 @@ use crate::config::{Appearance, AppearanceColor, AppearanceStyle, MenuAppearance, Position}; -use iced_layershell::{ +use iced::{ Background, Border, Color, Theme, theme::{Palette, palette}, widget::{ diff --git a/src/utils/mod.rs b/src/utils/mod.rs index d377613e..e6856e2c 100644 --- a/src/utils/mod.rs +++ b/src/utils/mod.rs @@ -8,18 +8,18 @@ pub mod remote_value; pub trait PushMaybe<'a, Message, Theme, Renderer> { fn push_maybe( self, - child: Option>>, + child: Option>>, ) -> Self; } impl<'a, Message, Theme, Renderer> PushMaybe<'a, Message, Theme, Renderer> - for iced_layershell::widget::Row<'a, Message, Theme, Renderer> + for iced::widget::Row<'a, Message, Theme, Renderer> where - Renderer: iced_layershell::core::Renderer, + Renderer: iced::core::Renderer, { fn push_maybe( self, - child: Option>>, + child: Option>>, ) -> Self { match child { Some(child) => self.push(child), @@ -29,13 +29,13 @@ where } impl<'a, Message, Theme, Renderer> PushMaybe<'a, Message, Theme, Renderer> - for iced_layershell::widget::Column<'a, Message, Theme, Renderer> + for iced::widget::Column<'a, Message, Theme, Renderer> where - Renderer: iced_layershell::core::Renderer, + Renderer: iced::core::Renderer, { fn push_maybe( self, - child: Option>>, + child: Option>>, ) -> Self { match child { Some(child) => self.push(child), diff --git a/src/utils/remote_value.rs b/src/utils/remote_value.rs index 684b8d05..ac655ca1 100644 --- a/src/utils/remote_value.rs +++ b/src/utils/remote_value.rs @@ -10,7 +10,7 @@ pub struct Remote { /// Source of truth. Displayed shortly after the end of the user interaction received: Value, /// A handle for aborting the timeout task - timeout: Option, + timeout: Option, } impl Remote { @@ -34,14 +34,14 @@ where self.requested.unwrap_or(self.received) } - pub fn update(&mut self, message: Message) -> iced_layershell::Task> { + pub fn update(&mut self, message: Message) -> iced::Task> { if let Some(handle) = self.timeout.take() { handle.abort(); } match message { Message::Request(value) => { self.requested = Some(value); - iced_layershell::Task::none() + iced::Task::none() } Message::Timeout => self.start_timeout(), Message::RequestAndTimeout(value) => { @@ -50,13 +50,13 @@ where } Message::ShowReceived => { self.requested = None; - iced_layershell::Task::none() + iced::Task::none() } } } - fn start_timeout(&mut self) -> iced_layershell::Task> { - let (task, handle) = iced_layershell::Task::perform( + fn start_timeout(&mut self) -> iced::Task> { + let (task, handle) = iced::Task::perform( async { sleep(Duration::from_secs(1)).await; }, diff --git a/src/widgets/centerbox.rs b/src/widgets/centerbox.rs index 0be4e661..651e21f0 100644 --- a/src/widgets/centerbox.rs +++ b/src/widgets/centerbox.rs @@ -1,21 +1,21 @@ //! Distribute content horizontally. -use iced_layershell::advanced::layout::{self, Layout, Limits, Node}; -use iced_layershell::advanced::overlay; -use iced_layershell::advanced::renderer; -use iced_layershell::advanced::widget::{Operation, Tree}; -use iced_layershell::advanced::{Clipboard, Shell, Widget, mouse}; -use iced_layershell::{Alignment, Length, Padding, Pixels, Point, Rectangle, Size, Vector, event}; +use iced::advanced::layout::{self, Layout, Limits, Node}; +use iced::advanced::overlay; +use iced::advanced::renderer; +use iced::advanced::widget::{Operation, Tree}; +use iced::advanced::{Clipboard, Shell, Widget, mouse}; +use iced::{Alignment, Length, Padding, Pixels, Point, Rectangle, Size, Vector, event}; type Element<'a, Message, Theme, Renderer> = - iced_layershell::core::Element<'a, Message, Theme, Renderer>; + iced::core::Element<'a, Message, Theme, Renderer>; /// A container that distributes its contents horizontally. #[allow(missing_debug_implementations)] pub struct Centerbox< 'a, Message, - Theme = iced_layershell::Theme, - Renderer = iced_layershell::Renderer, + Theme = iced::Theme, + Renderer = iced::Renderer, > { spacing: f32, padding: Padding, @@ -27,7 +27,7 @@ pub struct Centerbox< impl<'a, Message, Theme, Renderer> Centerbox<'a, Message, Theme, Renderer> where - Renderer: iced_layershell::advanced::Renderer, + Renderer: iced::advanced::Renderer, { /// Creates an empty [`Centerbox`]. pub fn new(children: [Element<'a, Message, Theme, Renderer>; 3]) -> Self { @@ -79,7 +79,7 @@ where impl<'a, Message, Theme, Renderer> Widget for Centerbox<'a, Message, Theme, Renderer> where - Renderer: iced_layershell::advanced::Renderer, + Renderer: iced::advanced::Renderer, { fn children(&self) -> Vec { self.children.iter().map(Tree::new).collect() @@ -311,7 +311,7 @@ impl<'a, Message, Theme, Renderer> From> where Message: 'a, Theme: 'a, - Renderer: iced_layershell::advanced::Renderer + 'a, + Renderer: iced::advanced::Renderer + 'a, { #[inline] fn from(row: Centerbox<'a, Message, Theme, Renderer>) -> Self { diff --git a/src/widgets/menu_wrapper.rs b/src/widgets/menu_wrapper.rs index 1c554ea8..74ebb7d6 100644 --- a/src/widgets/menu_wrapper.rs +++ b/src/widgets/menu_wrapper.rs @@ -1,22 +1,22 @@ -use iced_layershell::advanced::layout::{self, Layout}; -use iced_layershell::advanced::renderer; -use iced_layershell::advanced::widget::{Operation, Tree}; -use iced_layershell::advanced::{Clipboard, Shell, Widget, mouse}; -use iced_layershell::core::widget::tree; -use iced_layershell::{ +use iced::advanced::layout::{self, Layout}; +use iced::advanced::renderer; +use iced::advanced::widget::{Operation, Tree}; +use iced::advanced::{Clipboard, Shell, Widget, mouse}; +use iced::core::widget::tree; +use iced::{ Background, Border, Color, Length, Padding, Point, Rectangle, Shadow, Size, Vector, alignment, event, overlay, touch, }; type Element<'a, Message, Theme, Renderer> = - iced_layershell::core::Element<'a, Message, Theme, Renderer>; + iced::core::Element<'a, Message, Theme, Renderer>; #[allow(missing_debug_implementations)] pub struct MenuWrapper< 'a, Message, - Theme = iced_layershell::Theme, - Renderer = iced_layershell::Renderer, + Theme = iced::Theme, + Renderer = iced::Renderer, > { x: f32, content: Element<'a, Message, Theme, Renderer>, @@ -28,7 +28,7 @@ pub struct MenuWrapper< impl<'a, Message, Theme, Renderer> MenuWrapper<'a, Message, Theme, Renderer> where - Renderer: iced_layershell::advanced::Renderer, + Renderer: iced::advanced::Renderer, { pub fn new(x: f32, content: Element<'a, Message, Theme, Renderer>) -> Self { MenuWrapper { @@ -66,7 +66,7 @@ impl<'a, Message, Theme, Renderer> Widget for MenuWrapper<'a, Message, Theme, Renderer> where Message: Clone, - Renderer: iced_layershell::advanced::Renderer, + Renderer: iced::advanced::Renderer, { fn tag(&self) -> tree::Tag { tree::Tag::of::<()>() @@ -114,7 +114,7 @@ where size.width - content_size.width - 8., ); let node = node.align( - iced_layershell::Alignment::Center, + iced::Alignment::Center, self.vertical_alignment.into(), size, ); @@ -244,7 +244,7 @@ impl<'a, Message, Theme, Renderer> From) -> Self { Self::new(menu_wrapper) diff --git a/src/widgets/position_button.rs b/src/widgets/position_button.rs index 45ef2a95..1fb55730 100644 --- a/src/widgets/position_button.rs +++ b/src/widgets/position_button.rs @@ -1,4 +1,4 @@ -use iced_layershell::{ +use iced::{ Background, Color, Length, Padding, Point, Rectangle, Size, Vector, core::{ Clipboard, Layout, Shell, Widget, event, keyboard, layout, mouse, overlay, renderer, touch, @@ -8,7 +8,7 @@ use iced_layershell::{ }; type Element<'a, Message, Theme, Renderer> = - iced_layershell::core::Element<'a, Message, Theme, Renderer>; + iced::core::Element<'a, Message, Theme, Renderer>; #[derive(Debug, Clone, Copy)] pub struct ButtonUIRef { @@ -24,10 +24,10 @@ enum OnPress<'a, Message> { pub struct PositionButton< 'a, Message, - Theme = iced_layershell::Theme, - Renderer = iced_layershell::Renderer, + Theme = iced::Theme, + Renderer = iced::Renderer, > where - Renderer: iced_layershell::core::Renderer, + Renderer: iced::core::Renderer, Theme: Catalog, { content: Element<'a, Message, Theme, Renderer>, @@ -44,7 +44,7 @@ pub struct PositionButton< impl<'a, Message, Theme, Renderer> PositionButton<'a, Message, Theme, Renderer> where - Renderer: iced_layershell::core::Renderer, + Renderer: iced::core::Renderer, Theme: Catalog, { pub fn new(content: impl Into>) -> Self { @@ -170,7 +170,7 @@ impl<'a, Message, Theme, Renderer> Widget for PositionButton<'a, Message, Theme, Renderer> where Message: 'a + Clone, - Renderer: 'a + iced_layershell::core::Renderer, + Renderer: 'a + iced::core::Renderer, Theme: Catalog, { fn tag(&self) -> tree::Tag { @@ -488,7 +488,7 @@ impl<'a, Message, Theme, Renderer> From) -> Self { @@ -501,7 +501,7 @@ pub fn position_button<'a, Message, Theme, Renderer>( ) -> PositionButton<'a, Message, Theme, Renderer> where Theme: Catalog + 'a, - Renderer: iced_layershell::core::Renderer, + Renderer: iced::core::Renderer, { PositionButton::new(content) } From dc7a8998d19138e05fd05bc82747ea55f802daed Mon Sep 17 00:00:00 2001 From: Simone Camito Date: Thu, 2 Apr 2026 10:48:34 +0200 Subject: [PATCH 11/14] remove custom PushMaybe trait now that iced natively handles Option in push() --- src/modules/media_player.rs | 5 ++-- src/modules/mod.rs | 3 +-- src/modules/privacy.rs | 7 +++--- src/modules/settings/audio.rs | 3 +-- src/modules/settings/bluetooth.rs | 13 +++++----- src/modules/settings/mod.rs | 27 ++++++++++---------- src/modules/settings/power.rs | 5 ++-- src/modules/system_info.rs | 5 ++-- src/modules/tempo.rs | 7 +++--- src/modules/tray.rs | 3 +-- src/password_dialog.rs | 3 +-- src/utils/mod.rs | 41 ------------------------------- 12 files changed, 35 insertions(+), 87 deletions(-) diff --git a/src/modules/media_player.rs b/src/modules/media_player.rs index 536fc22f..c4638fa8 100644 --- a/src/modules/media_player.rs +++ b/src/modules/media_player.rs @@ -9,7 +9,6 @@ use crate::{ }, }, theme::AshellTheme, - utils::PushMaybe, utils::truncate_text, }; use iced::{ @@ -161,7 +160,7 @@ impl MediaPlayer { }); let metadata = |description, cover| -> Element<'_, _> { row![description] - .push_maybe(cover) + .push(cover) .spacing(theme.space.md) .align_y(Vertical::Center) .into() @@ -249,7 +248,7 @@ impl MediaPlayer { }); row![icon(StaticIcon::MusicNote)] - .push_maybe(title) + .push(title) .align_y(Vertical::Center) .spacing(theme.space.xs) .into() diff --git a/src/modules/mod.rs b/src/modules/mod.rs index 567cf17d..9f3bdef5 100644 --- a/src/modules/mod.rs +++ b/src/modules/mod.rs @@ -3,7 +3,6 @@ use crate::{ config::{AppearanceStyle, ModuleDef, ModuleName}, menu::MenuType, theme::AshellTheme, - utils::PushMaybe, widgets::position_button, }; use iced::{ @@ -55,7 +54,7 @@ impl App { .spacing(self.theme.space.xxs); for module_def in modules_def { - row = row.push_maybe(match module_def { + row = row.push(match module_def { // life parsing of string to module ModuleDef::Single(module) => self.single_module_wrapper(id, theme, module), ModuleDef::Group(group) => self.group_module_wrapper(id, theme, group), diff --git a/src/modules/privacy.rs b/src/modules/privacy.rs index f82a0699..4b283ba1 100644 --- a/src/modules/privacy.rs +++ b/src/modules/privacy.rs @@ -2,7 +2,6 @@ use crate::{ components::icons::{StaticIcon, icon}, services::{ReadOnlyService, ServiceEvent, privacy::PrivacyService}, theme::AshellTheme, - utils::PushMaybe, }; use iced::{ Alignment, Element, Subscription, @@ -43,13 +42,13 @@ impl Privacy { Some( container( Row::with_capacity(3) - .push_maybe( + .push( service .screenshare_access() .then(|| icon(StaticIcon::ScreenShare)), ) - .push_maybe(service.webcam_access().then(|| icon(StaticIcon::Webcam))) - .push_maybe(service.microphone_access().then(|| icon(StaticIcon::Mic1))) + .push(service.webcam_access().then(|| icon(StaticIcon::Webcam))) + .push(service.microphone_access().then(|| icon(StaticIcon::Mic1))) .align_y(Alignment::Center) .spacing(theme.space.xs), ) diff --git a/src/modules/settings/audio.rs b/src/modules/settings/audio.rs index c02a0f69..db6d5634 100644 --- a/src/modules/settings/audio.rs +++ b/src/modules/settings/audio.rs @@ -7,7 +7,6 @@ use crate::{ audio::{AudioCommand, AudioService, DevicePortType, Port}, }, theme::AshellTheme, - utils::PushMaybe, utils::remote_value::{self, Remote}, }; use iced::{ @@ -490,7 +489,7 @@ impl AudioSettings { ) .on_scroll(Self::on_scroll(volume.value(), volume_changed)), ) - .push_maybe(with_submenu.map(|(submenu, msg)| { + .push(with_submenu.map(|(submenu, msg)| { icon_button( theme, match (slider_type, submenu) { diff --git a/src/modules/settings/bluetooth.rs b/src/modules/settings/bluetooth.rs index d3389bcd..c77d978a 100644 --- a/src/modules/settings/bluetooth.rs +++ b/src/modules/settings/bluetooth.rs @@ -7,7 +7,6 @@ use crate::{ bluetooth::{BluetoothCommand, BluetoothDevice, BluetoothService, BluetoothState}, }, theme::AshellTheme, - utils::PushMaybe, }; use iced::{ Element, Length, Padding, Subscription, SurfaceId, Task, Theme, @@ -262,7 +261,7 @@ impl BluetoothSettings { .spacing(theme.space.xs) .width(Length::Fill), ) - .push_maybe(if some_known { + .push(if some_known { let known_device_entry = |d: &BluetoothDevice| { button( Row::with_capacity(3) @@ -275,7 +274,7 @@ impl BluetoothSettings { }) .width(Length::Fill), ) - .push_maybe( + .push( d.battery.map(|battery| Self::battery_level(theme, battery)), ) .push( @@ -321,7 +320,7 @@ impl BluetoothSettings { } else { None }) - .push_maybe(if some_available { + .push(if some_available { Some( column!( column!( @@ -359,13 +358,13 @@ impl BluetoothSettings { } else { None }) - .push_maybe(if !some_known && !some_available { + .push(if !some_known && !some_available { Some(text("No devices found")) } else { None }) - .push_maybe(self.config.more_cmd.as_ref().map(|_| rule::horizontal(1))) - .push_maybe(self.config.more_cmd.as_ref().map(|_| { + .push(self.config.more_cmd.as_ref().map(|_| rule::horizontal(1))) + .push(self.config.more_cmd.as_ref().map(|_| { button("More") .on_press(Message::More(id)) .padding([theme.space.xxs, theme.space.sm]) diff --git a/src/modules/settings/mod.rs b/src/modules/settings/mod.rs index 83265708..9fa00948 100644 --- a/src/modules/settings/mod.rs +++ b/src/modules/settings/mod.rs @@ -20,7 +20,6 @@ use crate::{ password_dialog, services::idle_inhibitor::IdleInhibitorManager, theme::AshellTheme, - utils::PushMaybe, }; use iced::{ Alignment, Background, Border, Element, Length, Padding, Subscription, SurfaceId, Task, Theme, @@ -496,7 +495,7 @@ impl Settings { .battery_menu_indicator(theme) .map(|e| e.map(Message::Power)); let right_buttons = Row::with_capacity(2) - .push_maybe( + .push( self.lock_cmd .as_ref() .map(|_| icon_button(theme, StaticIcon::Lock).on_press(Message::Lock)), @@ -515,7 +514,7 @@ impl Settings { .spacing(theme.space.xs); let header = Row::with_capacity(3) - .push_maybe(battery_data) + .push(battery_data) .push(Space::new().width(Length::Fill)) .push(right_buttons) .spacing(theme.space.xs) @@ -619,7 +618,7 @@ impl Settings { Column::with_capacity(11) .push(header) - .push_maybe( + .push( self.sub_menu .filter(|menu_type| *menu_type == SubMenu::PeripheralMenu) .and_then(|_| { @@ -628,15 +627,15 @@ impl Settings { .map(|e| sub_menu_wrapper(theme, e.map(Message::Power))) }), ) - .push_maybe( + .push( self.sub_menu .filter(|menu_type| *menu_type == SubMenu::Power) .map(|_| { sub_menu_wrapper(theme, self.power.menu(theme).map(Message::Power)) }), ) - .push_maybe(top_sink_slider) - .push_maybe( + .push(top_sink_slider) + .push( self.sub_menu .filter(|menu_type| *menu_type == SubMenu::Sinks) .and_then(|_| { @@ -645,9 +644,9 @@ impl Settings { .map(|submenu| sub_menu_wrapper(theme, submenu.map(Message::Audio))) }), ) - .push_maybe(bottom_sink_slider) - .push_maybe(top_source_slider) - .push_maybe( + .push(bottom_sink_slider) + .push(top_source_slider) + .push( self.sub_menu .filter(|menu_type| *menu_type == SubMenu::Sources) .and_then(|_| { @@ -656,8 +655,8 @@ impl Settings { .map(|submenu| sub_menu_wrapper(theme, submenu.map(Message::Audio))) }), ) - .push_maybe(bottom_source_slider) - .push_maybe( + .push(bottom_source_slider) + .push( self.brightness .slider(theme) .map(|e| e.map(Message::Brightness)), @@ -878,7 +877,7 @@ fn quick_setting_button<'a, Msg: Clone + 'static, I: Icon>( container( Column::with_capacity(2) .push(text(title).size(theme.font_size.sm)) - .push_maybe(subtitle.map(|s| { + .push(subtitle.map(|s| { text(s) .wrapping(text::Wrapping::None) .size(theme.font_size.xs) @@ -895,7 +894,7 @@ fn quick_setting_button<'a, Msg: Clone + 'static, I: Icon>( let btn = button( Row::with_capacity(2) .push(main_content) - .push_maybe(with_submenu.map(|(menu_type, submenu, msg)| { + .push(with_submenu.map(|(menu_type, submenu, msg)| { icon_button( theme, if Some(menu_type) == submenu { diff --git a/src/modules/settings/power.rs b/src/modules/settings/power.rs index a319b487..6b00cc62 100644 --- a/src/modules/settings/power.rs +++ b/src/modules/settings/power.rs @@ -12,7 +12,6 @@ use crate::{ }, }, theme::AshellTheme, - utils::PushMaybe, utils::{self, IndicatorState, format_duration}, }; use iced::{ @@ -243,7 +242,7 @@ impl PowerSettings { .align_y(Alignment::Center); for p in service.peripherals.iter() { - row = row.push_maybe({ + row = row.push({ if kinds.as_ref().is_none_or(|kinds| kinds.contains(&p.kind)) { let state = p.data.get_indicator_state(); @@ -360,7 +359,7 @@ impl PowerSettings { container({ let battery_info = container( Row::with_capacity(3) - .push_maybe(peripheral_icon.map(icon)) + .push(peripheral_icon.map(icon)) .push(icon(battery.get_icon())) .push(text(format!("{}%", battery.capacity))) .spacing(ashell_theme.space.xxs), diff --git a/src/modules/system_info.rs b/src/modules/system_info.rs index f8cf4790..21bcc855 100644 --- a/src/modules/system_info.rs +++ b/src/modules/system_info.rs @@ -3,7 +3,6 @@ use crate::{ config::{SystemInfoIndicator, SystemInfoModuleConfig}, menu::MenuSize, theme::AshellTheme, - utils::PushMaybe, }; use iced::{ Alignment, Element, Length, Subscription, Theme, @@ -327,7 +326,7 @@ impl SystemInfo { "Swap memory Usage".to_string(), format!("{}%", self.data.memory_swap_usage), )) - .push_maybe(self.data.temperature.map(|temp| { + .push(self.data.temperature.map(|temp| { Self::info_element( theme, StaticIcon::Temp, @@ -352,7 +351,7 @@ impl SystemInfo { ) .spacing(theme.space.xxs), ) - .push_maybe(self.data.network.as_ref().map(|network| { + .push(self.data.network.as_ref().map(|network| { Column::with_children(vec![ Self::info_element( theme, diff --git a/src/modules/tempo.rs b/src/modules/tempo.rs index 9918ca1a..fe3b18ae 100644 --- a/src/modules/tempo.rs +++ b/src/modules/tempo.rs @@ -3,7 +3,6 @@ use crate::{ config::{TempoModuleConfig, WeatherIndicator, WeatherLocation}, menu::MenuSize, theme::AshellTheme, - utils::PushMaybe, }; use chrono::{ DateTime, Datelike, Days, FixedOffset, Local, Months, NaiveDate, NaiveDateTime, TimeZone, Utc, @@ -167,7 +166,7 @@ impl Tempo { let display_text = self.time_str(self.current_format(), self.current_timezone_index); Row::with_capacity(2) - .push_maybe(self.weather_indicator(theme)) + .push(self.weather_indicator(theme)) .push(text(display_text)) .align_y(Vertical::Center) .spacing(theme.space.sm) @@ -220,7 +219,7 @@ impl Tempo { weather_icon(data.current.weather_code, data.current.is_day > 0) .width(Length::Fixed(theme.font_size.sm)), ) - .push_maybe( + .push( (self.config.weather_indicator == WeatherIndicator::IconAndTemperature) .then(|| { text(format!("{}°C", data.current.temperature_2m)) @@ -238,7 +237,7 @@ impl Tempo { container( Row::with_capacity(2) .push(self.calendar(theme)) - .push_maybe(self.weather(theme)) + .push(self.weather(theme)) .spacing(theme.space.lg), ) .max_width(MenuSize::XLarge) diff --git a/src/modules/tray.rs b/src/modules/tray.rs index c406011a..6b81b7b3 100644 --- a/src/modules/tray.rs +++ b/src/modules/tray.rs @@ -9,7 +9,6 @@ use crate::{ }, }, theme::AshellTheme, - utils::PushMaybe, widgets::{ButtonUIRef, position_button}, }; use iced::{ @@ -143,7 +142,7 @@ impl TrayModule { .on_press(Message::ToggleSubmenu(layout.0)) .width(Length::Fill), ) - .push_maybe(if is_open { + .push(if is_open { Some( Column::with_children( layout diff --git a/src/password_dialog.rs b/src/password_dialog.rs index d8b86bf6..e1154b4d 100644 --- a/src/password_dialog.rs +++ b/src/password_dialog.rs @@ -1,7 +1,6 @@ use crate::{ components::icons::{StaticIcon, icon}, theme::AshellTheme, - utils::PushMaybe, }; use iced::{ Alignment, Element, Length, SurfaceId, @@ -55,7 +54,7 @@ Do you want to connect anyway?", .align_y(Alignment::Center), text(description), ) - .push_maybe( + .push( (!warning_only).then_some( row!( text_input("", current_password) diff --git a/src/utils/mod.rs b/src/utils/mod.rs index e6856e2c..d9dad1ec 100644 --- a/src/utils/mod.rs +++ b/src/utils/mod.rs @@ -3,47 +3,6 @@ use std::time::Duration; pub mod launcher; pub mod remote_value; -/// Extension trait to add `push_maybe` to `Row` and `Column` in iced 0.14, -/// which removed the built-in method. -pub trait PushMaybe<'a, Message, Theme, Renderer> { - fn push_maybe( - self, - child: Option>>, - ) -> Self; -} - -impl<'a, Message, Theme, Renderer> PushMaybe<'a, Message, Theme, Renderer> - for iced::widget::Row<'a, Message, Theme, Renderer> -where - Renderer: iced::core::Renderer, -{ - fn push_maybe( - self, - child: Option>>, - ) -> Self { - match child { - Some(child) => self.push(child), - None => self, - } - } -} - -impl<'a, Message, Theme, Renderer> PushMaybe<'a, Message, Theme, Renderer> - for iced::widget::Column<'a, Message, Theme, Renderer> -where - Renderer: iced::core::Renderer, -{ - fn push_maybe( - self, - child: Option>>, - ) -> Self { - match child { - Some(child) => self.push(child), - None => self, - } - } -} - #[derive(Debug, Clone, Copy)] pub enum IndicatorState { Normal, From c8f57b832efb1f552f272bf19bc23e1a26caaabb Mon Sep 17 00:00:00 2001 From: Simone Camito Date: Thu, 2 Apr 2026 11:09:22 +0200 Subject: [PATCH 12/14] fix formatting --- src/app.rs | 5 +--- src/modules/settings/bluetooth.rs | 4 +-- src/modules/tempo.rs | 48 ++++++++++++++----------------- src/widgets/centerbox.rs | 10 ++----- src/widgets/menu_wrapper.rs | 10 ++----- src/widgets/position_button.rs | 11 ++----- 6 files changed, 31 insertions(+), 57 deletions(-) diff --git a/src/app.rs b/src/app.rs index 188b82e8..52895758 100644 --- a/src/app.rs +++ b/src/app.rs @@ -580,10 +580,7 @@ impl App { }), iced::output_events().map(Message::OutputEvent), listen_with(move |evt, _, _| match evt { - iced::event::Event::Keyboard(keyboard::Event::KeyPressed { - key, - .. - }) => { + iced::event::Event::Keyboard(keyboard::Event::KeyPressed { key, .. }) => { debug!("Keyboard event received: {key:?}"); if matches!(key, keyboard::Key::Named(keyboard::key::Named::Escape)) { debug!("ESC key pressed, closing all menus"); diff --git a/src/modules/settings/bluetooth.rs b/src/modules/settings/bluetooth.rs index c77d978a..387cc3f9 100644 --- a/src/modules/settings/bluetooth.rs +++ b/src/modules/settings/bluetooth.rs @@ -274,9 +274,7 @@ impl BluetoothSettings { }) .width(Length::Fill), ) - .push( - d.battery.map(|battery| Self::battery_level(theme, battery)), - ) + .push(d.battery.map(|battery| Self::battery_level(theme, battery))) .push( icon_button(theme, StaticIcon::Remove) .on_press(Message::RemoveDevice(d.path.clone())) diff --git a/src/modules/tempo.rs b/src/modules/tempo.rs index fe3b18ae..446d1d8c 100644 --- a/src/modules/tempo.rs +++ b/src/modules/tempo.rs @@ -670,30 +670,28 @@ impl Tempo { .scale_alpha(theme.opacity), ) .into(), - border: Border::default().rounded( - iced::border::Radius { - top_left: if index == 0 { - theme.radius.lg - } else { - theme.radius.sm - }, - top_right: if index == 0 { - theme.radius.lg - } else { - theme.radius.sm - }, - bottom_right: if index == data.daily.time.len() - 2 { - theme.radius.lg - } else { - theme.radius.sm - }, - bottom_left: if index == data.daily.time.len() - 2 { - theme.radius.lg - } else { - theme.radius.sm - }, + border: Border::default().rounded(iced::border::Radius { + top_left: if index == 0 { + theme.radius.lg + } else { + theme.radius.sm }, - ), + top_right: if index == 0 { + theme.radius.lg + } else { + theme.radius.sm + }, + bottom_right: if index == data.daily.time.len() - 2 { + theme.radius.lg + } else { + theme.radius.sm + }, + bottom_left: if index == data.daily.time.len() - 2 { + theme.radius.lg + } else { + theme.radius.sm + }, + }), ..container::Style::default() }) .into() @@ -732,9 +730,7 @@ impl Tempo { let interval = *interval; channel( 100, - async move |mut output: iced::futures::channel::mpsc::Sender< - Message, - >| { + async move |mut output: iced::futures::channel::mpsc::Sender| { let mut interval = tokio::time::interval(interval); loop { interval.tick().await; diff --git a/src/widgets/centerbox.rs b/src/widgets/centerbox.rs index 651e21f0..72aeea73 100644 --- a/src/widgets/centerbox.rs +++ b/src/widgets/centerbox.rs @@ -6,17 +6,11 @@ use iced::advanced::widget::{Operation, Tree}; use iced::advanced::{Clipboard, Shell, Widget, mouse}; use iced::{Alignment, Length, Padding, Pixels, Point, Rectangle, Size, Vector, event}; -type Element<'a, Message, Theme, Renderer> = - iced::core::Element<'a, Message, Theme, Renderer>; +type Element<'a, Message, Theme, Renderer> = iced::core::Element<'a, Message, Theme, Renderer>; /// A container that distributes its contents horizontally. #[allow(missing_debug_implementations)] -pub struct Centerbox< - 'a, - Message, - Theme = iced::Theme, - Renderer = iced::Renderer, -> { +pub struct Centerbox<'a, Message, Theme = iced::Theme, Renderer = iced::Renderer> { spacing: f32, padding: Padding, width: Length, diff --git a/src/widgets/menu_wrapper.rs b/src/widgets/menu_wrapper.rs index 74ebb7d6..696b0acc 100644 --- a/src/widgets/menu_wrapper.rs +++ b/src/widgets/menu_wrapper.rs @@ -8,16 +8,10 @@ use iced::{ event, overlay, touch, }; -type Element<'a, Message, Theme, Renderer> = - iced::core::Element<'a, Message, Theme, Renderer>; +type Element<'a, Message, Theme, Renderer> = iced::core::Element<'a, Message, Theme, Renderer>; #[allow(missing_debug_implementations)] -pub struct MenuWrapper< - 'a, - Message, - Theme = iced::Theme, - Renderer = iced::Renderer, -> { +pub struct MenuWrapper<'a, Message, Theme = iced::Theme, Renderer = iced::Renderer> { x: f32, content: Element<'a, Message, Theme, Renderer>, on_click_outside: Option, diff --git a/src/widgets/position_button.rs b/src/widgets/position_button.rs index 1fb55730..dfb4c684 100644 --- a/src/widgets/position_button.rs +++ b/src/widgets/position_button.rs @@ -7,8 +7,7 @@ use iced::{ widget::button::{Catalog, Status, Style, StyleFn}, }; -type Element<'a, Message, Theme, Renderer> = - iced::core::Element<'a, Message, Theme, Renderer>; +type Element<'a, Message, Theme, Renderer> = iced::core::Element<'a, Message, Theme, Renderer>; #[derive(Debug, Clone, Copy)] pub struct ButtonUIRef { @@ -21,12 +20,8 @@ enum OnPress<'a, Message> { MessageWithPosition(Box Message + 'a>), } -pub struct PositionButton< - 'a, - Message, - Theme = iced::Theme, - Renderer = iced::Renderer, -> where +pub struct PositionButton<'a, Message, Theme = iced::Theme, Renderer = iced::Renderer> +where Renderer: iced::core::Renderer, Theme: Catalog, { From 7fc55ad6d7b8d015d89b97441da67b84070a0c72 Mon Sep 17 00:00:00 2001 From: Simone Camito Date: Thu, 2 Apr 2026 14:56:33 +0200 Subject: [PATCH 13/14] fix ESC button --- Cargo.lock | 45 ++++++++------------------------------------- 1 file changed, 8 insertions(+), 37 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7827644e..2e1820e7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -924,7 +924,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -1356,7 +1356,7 @@ dependencies = [ "log", "presser", "thiserror 1.0.69", - "windows 0.54.0", + "windows 0.58.0", ] [[package]] @@ -1709,7 +1709,7 @@ dependencies = [ [[package]] name = "iced_layershell" version = "0.1.0" -source = "git+https://github.com/MalpenZibo/iced_layershell?branch=main#672b61ab487a359816d259406abf2fafbf118e18" +source = "git+https://github.com/MalpenZibo/iced_layershell?branch=main#056c58f1b435d707e150665f6b2199a7187d40da" dependencies = [ "calloop", "calloop-wayland-source", @@ -3114,7 +3114,7 @@ dependencies = [ "once_cell", "socket2", "tracing", - "windows-sys 0.60.2", + "windows-sys 0.52.0", ] [[package]] @@ -3410,7 +3410,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -3467,7 +3467,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -4007,7 +4007,7 @@ dependencies = [ "getrandom 0.3.4", "once_cell", "rustix", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -4931,7 +4931,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.48.0", ] [[package]] @@ -4940,16 +4940,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows" -version = "0.54.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49" -dependencies = [ - "windows-core 0.54.0", - "windows-targets 0.52.6", -] - [[package]] name = "windows" version = "0.58.0" @@ -4982,16 +4972,6 @@ dependencies = [ "windows-core 0.61.2", ] -[[package]] -name = "windows-core" -version = "0.54.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65" -dependencies = [ - "windows-result 0.1.2", - "windows-targets 0.52.6", -] - [[package]] name = "windows-core" version = "0.58.0" @@ -5108,15 +5088,6 @@ dependencies = [ "windows-link 0.1.3", ] -[[package]] -name = "windows-result" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" -dependencies = [ - "windows-targets 0.52.6", -] - [[package]] name = "windows-result" version = "0.2.0" From 9ae453f2ca49951bf3049e408e0e85e21424666e Mon Sep 17 00:00:00 2001 From: Simone Camito Date: Thu, 2 Apr 2026 15:37:21 +0200 Subject: [PATCH 14/14] upd latest iced_layershell --- Cargo.lock | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2e1820e7..e067867a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -924,7 +924,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -1709,7 +1709,7 @@ dependencies = [ [[package]] name = "iced_layershell" version = "0.1.0" -source = "git+https://github.com/MalpenZibo/iced_layershell?branch=main#056c58f1b435d707e150665f6b2199a7187d40da" +source = "git+https://github.com/MalpenZibo/iced_layershell?branch=main#9ec98e94d67849ffe8b89cdde41afdd7ad0bae14" dependencies = [ "calloop", "calloop-wayland-source", @@ -3114,7 +3114,7 @@ dependencies = [ "once_cell", "socket2", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.60.2", ] [[package]] @@ -3410,7 +3410,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -3467,7 +3467,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -4007,7 +4007,7 @@ dependencies = [ "getrandom 0.3.4", "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -4931,7 +4931,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.61.2", ] [[package]]