diff --git a/Cargo.lock b/Cargo.lock index 05ebb693..22da49cd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10,9 +10,9 @@ checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" [[package]] name = "ab_glyph" -version = "0.2.19" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5568a4aa5ba8adf5175c5c460b030e27d8893412976cc37bef0e4fbc16cfbba" +checksum = "fe21446ad43aa56417a767f3e2f3d7c4ca522904de1dd640529a76e9c5c3b33c" dependencies = [ "ab_glyph_rasterizer", "owned_ttf_parser", @@ -20,9 +20,9 @@ dependencies = [ [[package]] name = "ab_glyph_rasterizer" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "330223a1aecc308757b9926e9391c9b47f8ef2dbd8aea9df88312aea18c5e8d6" +checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" [[package]] name = "adler" @@ -67,9 +67,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.68" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cb2f989d18dd141ab8ae82f64d1a8cdd37e0840f73a406896cf5e99502fab61" +checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" [[package]] name = "apply" @@ -87,10 +87,16 @@ dependencies = [ ] [[package]] -name = "arrayref" -version = "0.3.6" +name = "arc-swap" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" +checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" + +[[package]] +name = "arrayref" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" [[package]] name = "arrayvec" @@ -115,13 +121,23 @@ dependencies = [ [[package]] name = "async-broadcast" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b19760fa2b7301cf235360ffd6d3558b1ed4249edd16d6cca8d690cee265b95" +checksum = "7c48ccdbf6ca6b121e0f586cbc0e73ae440e56c67c30fa0873b4e110d9c26d2b" dependencies = [ "event-listener", "futures-core", - "parking_lot 0.12.1", +] + +[[package]] +name = "async-channel" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833" +dependencies = [ + "concurrent-queue", + "event-listener", + "futures-core", ] [[package]] @@ -139,61 +155,89 @@ dependencies = [ ] [[package]] -name = "async-io" -version = "1.12.0" +name = "async-fs" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c374dda1ed3e7d8f0d9ba58715f924862c63eae6849c92d3a18e7fbde9e2794" +checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" dependencies = [ "async-lock", "autocfg", + "blocking", + "futures-lite", +] + +[[package]] +name = "async-io" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" +dependencies = [ + "async-lock", + "autocfg", + "cfg-if", "concurrent-queue", "futures-lite", - "libc", "log", "parking", "polling", + "rustix 0.37.7", "slab", "socket2", "waker-fn", - "windows-sys", ] [[package]] name = "async-lock" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8101efe8695a6c17e02911402145357e718ac92d3ff88ae8419e84b1707b685" +checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7" dependencies = [ "event-listener", - "futures-lite", ] [[package]] name = "async-recursion" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cda8f4bcc10624c4e85bc66b3f452cca98cfa5ca002dc83a16aad2367641bea" +checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.13", ] [[package]] name = "async-task" -version = "4.3.0" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a40729d2133846d9ed0ea60a8b9541bccddab49cd30f0715a1da672fe9a2524" +checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" [[package]] name = "async-trait" -version = "0.1.61" +version = "0.1.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "705339e0e4a9690e2908d2b3d049d85682cf19fbd5782494498fbf7003a6a282" +checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.13", +] + +[[package]] +name = "atomic-waker" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "debc29dde2e69f9e47506b525f639ed42300fc014a3e007832592448fa8e4599" + +[[package]] +name = "atomicwrites" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09a580bfc0fc2370333eddb71de8c8614d5972e3a327438eb3acc22824a638bf" +dependencies = [ + "rustix 0.36.12", + "tempfile", + "windows-sys 0.45.0", ] [[package]] @@ -236,9 +280,9 @@ checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" [[package]] name = "bit_field" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcb6dd1c2376d2e096796e234a70e17e94cc2d5d54ff8ce42b28cef1d0d359a4" +checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61" [[package]] name = "bitflags" @@ -254,13 +298,27 @@ checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" [[package]] name = "block-buffer" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ "generic-array", ] +[[package]] +name = "blocking" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c67b173a56acffd6d2326fb7ab938ba0b00a71480e14902b2591c87bc5741e8" +dependencies = [ + "async-channel", + "async-lock", + "async-task", + "atomic-waker", + "fastrand", + "futures-lite", +] + [[package]] name = "bluer" version = "0.15.7" @@ -278,7 +336,7 @@ dependencies = [ "libc", "log", "macaddr", - "nix 0.26.1", + "nix 0.26.2", "num-derive", "num-traits", "pin-project", @@ -292,28 +350,28 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.11.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" +checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" [[package]] name = "bytemuck" -version = "1.12.3" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaa3a8d9a1ca92e282c96a32d6511b695d7d994d1d102ba85d279f9b2756947f" +checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.3.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fe233b960f12f8007e3db2d136e3cb1c291bfd7396e384ee76025fc1a3932b4" +checksum = "fdde5c9cd29ebd706ce1b35600920a33550e402fc998a2e53ad3b42c3c47a192" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.13", ] [[package]] @@ -324,9 +382,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" [[package]] name = "calloop" @@ -343,15 +401,15 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.78" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" +checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" [[package]] name = "cfg-expr" -version = "0.11.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0357a6402b295ca3a86bc148e84df46c02e41f41fef186bda662557ef6328aa" +checksum = "a35b255461940a32985c627ce82900867c61db1659764d3675ea81963f72a4c6" dependencies = [ "smallvec", ] @@ -370,9 +428,9 @@ checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" [[package]] name = "chrono" -version = "0.4.23" +version = "0.4.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" +checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" dependencies = [ "iana-time-zone", "js-sys", @@ -401,9 +459,9 @@ dependencies = [ [[package]] name = "cocoa-foundation" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ade49b65d560ca58c403a479bb396592b155c0185eada742ee323d1d68d6318" +checksum = "931d3837c286f56e3c58423ce4eba12d08db2374461a785c86f672b08b5650d6" dependencies = [ "bitflags", "block", @@ -432,9 +490,9 @@ checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" [[package]] name = "concurrent-queue" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd7bef69dc86e3c610e4e7aed41035e2a7ed12e72dd7530f61327a6579a4390b" +checksum = "c278839b831783b70278b14df4d45e1beb1aad306c07bb796637de9a0e323e8e" dependencies = [ "crossbeam-utils", ] @@ -457,9 +515,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "core-graphics" @@ -503,7 +561,7 @@ dependencies = [ "itertools", "libcosmic", "log", - "nix 0.26.1", + "nix 0.26.2", "once_cell", "pretty_env_logger", "ron", @@ -524,7 +582,6 @@ dependencies = [ "libpulse-glib-binding", "log", "pretty_env_logger", - "smithay-client-toolkit", "tokio", ] @@ -540,7 +597,6 @@ dependencies = [ "once_cell", "pretty_env_logger", "rust-embed", - "smithay-client-toolkit", "tokio", "zbus", ] @@ -563,7 +619,6 @@ dependencies = [ "rand", "rust-embed", "slotmap", - "smithay-client-toolkit", "tokio", ] @@ -576,7 +631,6 @@ dependencies = [ "libcosmic", "once_cell", "rust-embed", - "smithay-client-toolkit", "zbus", ] @@ -597,7 +651,6 @@ dependencies = [ "pretty_env_logger", "rust-embed", "slotmap", - "smithay-client-toolkit", "tokio", "zbus", ] @@ -620,8 +673,7 @@ dependencies = [ "libpulse-binding", "libpulse-glib-binding", "logind-zbus", - "nix 0.26.1", - "smithay-client-toolkit", + "nix 0.26.2", "tokio", "zbus", ] @@ -649,34 +701,46 @@ dependencies = [ "i18n-embed-fl", "libcosmic", "log", - "nix 0.26.1", + "nix 0.26.2", "once_cell", "pretty_env_logger", "rust-embed", "wayland-backend", - "wayland-client", + "wayland-client 0.30.1", "xdg", ] [[package]] name = "cosmic-client-toolkit" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-protocols#e491d91d10cc0a6af725d733bada77ae413e459a" +source = "git+https://github.com/pop-os/cosmic-protocols#7d80b59afc464a8ecdb8001333f18de554f299f4" dependencies = [ "cosmic-protocols", - "smithay-client-toolkit", - "wayland-client", + "smithay-client-toolkit 0.17.0", + "wayland-client 0.30.1", +] + +[[package]] +name = "cosmic-config" +version = "0.1.0" +source = "git+https://github.com/pop-os/libcosmic#e5d263b23f1965e842b098891603decafc18a1e3" +dependencies = [ + "atomicwrites", + "dirs 4.0.0", + "notify", + "ron", + "serde", ] [[package]] name = "cosmic-dbus-networkmanager" version = "0.1.0" -source = "git+https://github.com/pop-os/dbus-settings-bindings?branch=main#95f6d5e9ac86dfa5902ac74dee85b1a8cfc035fd" +source = "git+https://github.com/pop-os/dbus-settings-bindings?branch=main#dd3d4935a9e10eac592a974b561c71030ac40c3b" dependencies = [ "bitflags", "derive_builder", "procfs", - "time 0.3.17", + "time 0.3.20", "zbus", "zvariant", ] @@ -692,27 +756,27 @@ dependencies = [ [[package]] name = "cosmic-panel-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-panel#f4d1755bc6df87f2c4a59987dcea522227e9f88c" +source = "git+https://github.com/pop-os/cosmic-panel#2227432ccf4d378b517fc1707d3bb287a1d4751e" dependencies = [ "anyhow", + "cosmic-config", "ron", "serde", "tracing", "wayland-protocols-wlr", - "xdg", "xdg-shell-wrapper-config", ] [[package]] name = "cosmic-protocols" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-protocols#e491d91d10cc0a6af725d733bada77ae413e459a" +source = "git+https://github.com/pop-os/cosmic-protocols#7d80b59afc464a8ecdb8001333f18de554f299f4" dependencies = [ "bitflags", "wayland-backend", - "wayland-client", - "wayland-protocols", - "wayland-scanner", + "wayland-client 0.30.1", + "wayland-protocols 0.30.0", + "wayland-scanner 0.30.0", "wayland-server", ] @@ -724,7 +788,7 @@ dependencies = [ "fontdb 0.13.0", "libm", "log", - "ouroboros 0.15.5", + "ouroboros 0.15.6", "rangemap", "rustybuzz 0.7.0", "swash", @@ -751,9 +815,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "280a9f2d8b3a38871a3c8a46fb80db65e5e5ed97da80c4d08bf27fb63e35e181" dependencies = [ "libc", ] @@ -769,9 +833,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" +checksum = "cf2b3e8478797446514c91ef04bafcb59faba183e621ad488df88983cc14128c" dependencies = [ "cfg-if", "crossbeam-utils", @@ -779,9 +843,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" +checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" dependencies = [ "cfg-if", "crossbeam-epoch", @@ -790,22 +854,22 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.13" +version = "0.9.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" +checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", - "memoffset 0.7.1", + "memoffset 0.8.0", "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.14" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" +checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" dependencies = [ "cfg-if", ] @@ -836,37 +900,31 @@ dependencies = [ "serde", ] -[[package]] -name = "cty" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" - [[package]] name = "custom_debug" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8225047674d65dcf4321e6bd3e060bdbbe940604a99b1559827f3e61c498d1e" +checksum = "e89e0ae2c2a42be29595d05c50e3ce6096c0698a97e021c3289790f0750cc8e2" dependencies = [ "custom_debug_derive", ] [[package]] name = "custom_debug_derive" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b35d34eb004bf2d33c093f1c55ee77829e8654644288d3b6afd8c2d99d23729" +checksum = "08a9f3941234c9f62ceaa2782974827749de9b0a8a6487275a278da068e1baf7" dependencies = [ "proc-macro2", - "syn", + "syn 1.0.109", "synstructure", ] [[package]] name = "cxx" -version = "1.0.86" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d1075c37807dcf850c379432f0df05ba52cc30f279c5cfc43cc221ce7f8579" +checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93" dependencies = [ "cc", "cxxbridge-flags", @@ -876,9 +934,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.86" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5044281f61b27bc598f2f6647d480aed48d2bf52d6eb0b627d84c0361b17aa70" +checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b" dependencies = [ "cc", "codespan-reporting", @@ -886,24 +944,24 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn", + "syn 2.0.13", ] [[package]] name = "cxxbridge-flags" -version = "1.0.86" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61b50bc93ba22c27b0d31128d2d130a0a6b3d267ae27ef7e4fae2167dfe8781c" +checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb" [[package]] name = "cxxbridge-macro" -version = "1.0.86" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e61fda7e62115119469c7b3591fd913ecca96fb766cfd3f2e2502ab7bc87a5" +checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.13", ] [[package]] @@ -929,12 +987,12 @@ dependencies = [ [[package]] name = "darling" -version = "0.14.2" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" dependencies = [ - "darling_core 0.14.2", - "darling_macro 0.14.2", + "darling_core 0.14.4", + "darling_macro 0.14.4", ] [[package]] @@ -948,21 +1006,21 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.9.3", - "syn", + "syn 1.0.109", ] [[package]] name = "darling_core" -version = "0.14.2" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim 0.10.0", - "syn", + "syn 1.0.109", ] [[package]] @@ -973,18 +1031,18 @@ checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" dependencies = [ "darling_core 0.10.2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "darling_macro" -version = "0.14.2" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" dependencies = [ - "darling_core 0.14.2", + "darling_core 0.14.4", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -997,7 +1055,7 @@ dependencies = [ "hashbrown", "lock_api", "once_cell", - "parking_lot_core 0.9.6", + "parking_lot_core 0.9.7", ] [[package]] @@ -1033,9 +1091,9 @@ dependencies = [ [[package]] name = "dbus-tokio" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12a1a74a0c53b22d7d994256cf3ecbeefa5eedce3cf9d362945ac523c4132180" +checksum = "007688d459bc677131c063a3a77fb899526e17b7980f390b69644bdbc41fad13" dependencies = [ "dbus", "libc", @@ -1050,7 +1108,7 @@ checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1068,10 +1126,10 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f" dependencies = [ - "darling 0.14.2", + "darling 0.14.4", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1081,7 +1139,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e" dependencies = [ "derive_builder_core", - "syn", + "syn 1.0.109", ] [[package]] @@ -1093,7 +1151,7 @@ dependencies = [ "darling 0.10.2", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1152,7 +1210,7 @@ checksum = "3bf95dc3f046b9da4f2d51833c0d3547d8564ef6910f5c1ed130306a75b92886" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1178,9 +1236,9 @@ checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" [[package]] name = "either" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" +checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" [[package]] name = "encase" @@ -1211,7 +1269,7 @@ checksum = "0f2f4de457d974f548d2c2a16f709ebd81013579e543bd1a9b19ced88132c2cf" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1222,14 +1280,14 @@ checksum = "bad30c9c0fa1aaf1ae5010dab11f1117b15d35faf62cda4bbbc53b9987950f18" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "enumflags2" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e75d4cd21b95383444831539909fbb14b9dc3fdceb2a6f5d36577329a1f55ccb" +checksum = "0044ebdf7fbb2a772e0c0233a9d3173c5cd8af8ae7078d4c5188af44ffffaa4b" dependencies = [ "enumflags2_derive", "serde", @@ -1237,13 +1295,13 @@ dependencies = [ [[package]] name = "enumflags2_derive" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f58dc3c5e468259f19f2d46304a6b28f1c3d034442e14b322d2b850e36f6d5ae" +checksum = "9d2c772ccdbdfd1967b4f5d79d17c98ebf92009fdcc838db7aa434462f600c26" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.13", ] [[package]] @@ -1261,13 +1319,13 @@ dependencies = [ [[package]] name = "errno" -version = "0.2.8" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" +checksum = "50d6a0976c999d473fe89ad888d5a284e55366d9dc9038b1ba2aa15128c4afa0" dependencies = [ "errno-dragonfly", "libc", - "winapi", + "windows-sys 0.45.0", ] [[package]] @@ -1282,9 +1340,9 @@ dependencies = [ [[package]] name = "euclid" -version = "0.22.7" +version = "0.22.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b52c2ef4a78da0ba68fbe1fd920627411096d2ac478f7f4c9f3a54ba6705bade" +checksum = "87f253bc5c813ca05792837a0ff4b3a580336b224512d48f7eda1d7dd9210787" dependencies = [ "num-traits", ] @@ -1297,35 +1355,48 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "exr" -version = "1.5.2" +version = "1.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eb5f255b5980bb0c8cf676b675d1a99be40f316881444f44e0462eaf5df5ded" +checksum = "bdd2162b720141a91a054640662d3edce3d50a944a50ffca5313cd951abb35b4" dependencies = [ "bit_field", "flume", "half", "lebe", "miniz_oxide", + "rayon-core", "smallvec", - "threadpool", + "zune-inflate", ] [[package]] name = "fastrand" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" dependencies = [ "instant", ] +[[package]] +name = "filetime" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.2.16", + "windows-sys 0.48.0", +] + [[package]] name = "find-crate" version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59a98bbaacea1c0eb6a0876280051b892eb73594fd90cf3b20e9c817029c57d2" dependencies = [ - "toml", + "toml 0.5.11", ] [[package]] @@ -1428,7 +1499,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfec8f19f9b89b2901219cc62604810d2bfef15dc1182e95320f57e7cbbe041a" dependencies = [ "log", - "memmap2 0.5.8", + "memmap2 0.5.10", "slotmap", "ttf-parser 0.18.1", ] @@ -1450,9 +1521,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fraction" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c37ba08fe22fba12a3ada3e479d09a8f7fac6081aa6f5c27f22b78639025031" +checksum = "3027ae1df8d41b4bed2241c8fdad4acc1e7af60c8e17743534b545e77182d678" dependencies = [ "lazy_static", "num", @@ -1485,10 +1556,19 @@ dependencies = [ ] [[package]] -name = "futures" -version = "0.3.25" +name = "fsevent-sys" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38390104763dc37a5145a53c29c63c1290b5d316d6086ec32c293f6736051bb0" +checksum = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2" +dependencies = [ + "libc", +] + +[[package]] +name = "futures" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" dependencies = [ "futures-channel", "futures-core", @@ -1501,9 +1581,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ "futures-core", "futures-sink", @@ -1511,15 +1591,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" [[package]] name = "futures-executor" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" dependencies = [ "futures-core", "futures-task", @@ -1529,9 +1609,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-lite" @@ -1550,32 +1630,32 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.13", ] [[package]] name = "futures-sink" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] name = "futures-task" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] name = "futures-util" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ "futures-channel", "futures-core", @@ -1600,9 +1680,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.6" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -1653,9 +1733,9 @@ dependencies = [ [[package]] name = "gif" -version = "0.11.4" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3edd93c6756b4dfaf2709eafcc345ba2636565295c198a9cfbf75fa5e3e00b06" +checksum = "80792593675e051cf94a4b111980da2ba60d4a83e43e0048c5693baab3977045" dependencies = [ "color_quant", "weezl", @@ -1669,9 +1749,9 @@ checksum = "518faa5064866338b013ff9b2350dc318e14cc4fcd6cb8206d7e7c9886c98815" [[package]] name = "glib" -version = "0.16.7" +version = "0.17.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd4df61a866ed7259d6189b8bcb1464989a77f1d85d25d002279bbe9dd38b2f" +checksum = "cfb53061756195d76969292c2d2e329e01259276524a9bae6c9b73af62854773" dependencies = [ "bitflags", "futures-channel", @@ -1683,6 +1763,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", + "memchr", "once_cell", "smallvec", "thiserror", @@ -1690,9 +1771,9 @@ dependencies = [ [[package]] name = "glib-macros" -version = "0.16.3" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e084807350b01348b6d9dbabb724d1a0bb987f47a2c85de200e98e12e30733bf" +checksum = "bc4cf346122086f196260783aa58987190dbd5f43bfab01946d2bf9786e8d9ef" dependencies = [ "anyhow", "heck", @@ -1700,14 +1781,14 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "glib-sys" -version = "0.16.3" +version = "0.17.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61a4f46316d06bfa33a7ac22df6f0524c8be58e3db2d9ca99ccb1f357b62a65" +checksum = "49f00ad0a1bf548e61adfff15d83430941d9e1bb620e334f779edd1c745680a5" dependencies = [ "libc", "system-deps", @@ -1739,13 +1820,12 @@ dependencies = [ [[package]] name = "glyph_brush" -version = "0.7.5" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac02497410cdb5062cc056a33f2e1e19ff69fbf26a4be9a02bf29d6e17ea105b" +checksum = "4edefd123f28a0b1d41ec4a489c2b43020b369180800977801611084f342978d" dependencies = [ "glyph_brush_draw_cache", "glyph_brush_layout", - "log", "ordered-float", "rustc-hash", "twox-hash", @@ -1778,9 +1858,9 @@ dependencies = [ [[package]] name = "gobject-sys" -version = "0.16.3" +version = "0.17.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3520bb9c07ae2a12c7f2fbb24d4efc11231c8146a86956413fb1a79bb760a0f1" +checksum = "15e75b0000a64632b2d8ca3cf856af9308e3a970844f6e9659bd197f026793d0" dependencies = [ "glib-sys", "libc", @@ -1856,9 +1936,9 @@ dependencies = [ [[package]] name = "heck" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" @@ -1878,6 +1958,12 @@ dependencies = [ "libc", ] +[[package]] +name = "hermit-abi" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" + [[package]] name = "hex" version = "0.4.3" @@ -1909,16 +1995,17 @@ dependencies = [ "serde", "serde_derive", "thiserror", - "toml", + "toml 0.5.11", "unic-langid", ] [[package]] name = "i18n-embed" -version = "0.13.5" +version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79ff7e6b37b61834ec97fc945d391315188d8bb87aa1d48f10f295e73a5f5bec" +checksum = "2653dd1a8be0726315603f1c180b29f90e5b2a58f8b943d949d5170d9ad81101" dependencies = [ + "arc-swap", "fluent", "fluent-langneg", "fluent-syntax", @@ -1936,9 +2023,9 @@ dependencies = [ [[package]] name = "i18n-embed-fl" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a425b9bbdc2e4cd797a2a79528662cb61894bd36db582e48da2c56c28eb727cd" +checksum = "4b5809e2295beeb55013705c3b947cbbe83b8cadf3c73a1e6dca06381927212a" dependencies = [ "dashmap", "find-crate", @@ -1951,7 +2038,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.10.0", - "syn", + "syn 1.0.109", "unic-langid", ] @@ -1965,21 +2052,21 @@ dependencies = [ "i18n-config", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "iana-time-zone" -version = "0.1.53" +version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" +checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "winapi", + "windows", ] [[package]] @@ -1995,7 +2082,7 @@ dependencies = [ [[package]] name = "iced" version = "0.6.0" -source = "git+https://github.com/pop-os/libcosmic/?branch=master#24709e9c3b56c49a0af168d1e37ebef85f112c8a" +source = "git+https://github.com/pop-os/libcosmic/?branch=master#e5d263b23f1965e842b098891603decafc18a1e3" dependencies = [ "iced_core", "iced_dyrend", @@ -2013,7 +2100,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.6.2" -source = "git+https://github.com/pop-os/libcosmic/?branch=master#24709e9c3b56c49a0af168d1e37ebef85f112c8a" +source = "git+https://github.com/pop-os/libcosmic/?branch=master#e5d263b23f1965e842b098891603decafc18a1e3" dependencies = [ "bitflags", "palette", @@ -2023,7 +2110,7 @@ dependencies = [ [[package]] name = "iced_dyrend" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic/?branch=master#24709e9c3b56c49a0af168d1e37ebef85f112c8a" +source = "git+https://github.com/pop-os/libcosmic/?branch=master#e5d263b23f1965e842b098891603decafc18a1e3" dependencies = [ "iced_glow", "iced_graphics", @@ -2037,7 +2124,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.5.1" -source = "git+https://github.com/pop-os/libcosmic/?branch=master#24709e9c3b56c49a0af168d1e37ebef85f112c8a" +source = "git+https://github.com/pop-os/libcosmic/?branch=master#e5d263b23f1965e842b098891603decafc18a1e3" dependencies = [ "futures", "log", @@ -2049,7 +2136,7 @@ dependencies = [ [[package]] name = "iced_glow" version = "0.5.1" -source = "git+https://github.com/pop-os/libcosmic/?branch=master#24709e9c3b56c49a0af168d1e37ebef85f112c8a" +source = "git+https://github.com/pop-os/libcosmic/?branch=master#e5d263b23f1965e842b098891603decafc18a1e3" dependencies = [ "bytemuck", "euclid", @@ -2064,7 +2151,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.5.0" -source = "git+https://github.com/pop-os/libcosmic/?branch=master#24709e9c3b56c49a0af168d1e37ebef85f112c8a" +source = "git+https://github.com/pop-os/libcosmic/?branch=master#e5d263b23f1965e842b098891603decafc18a1e3" dependencies = [ "bitflags", "bytemuck", @@ -2084,7 +2171,7 @@ dependencies = [ [[package]] name = "iced_lazy" version = "0.3.0" -source = "git+https://github.com/pop-os/libcosmic/?branch=master#24709e9c3b56c49a0af168d1e37ebef85f112c8a" +source = "git+https://github.com/pop-os/libcosmic/?branch=master#e5d263b23f1965e842b098891603decafc18a1e3" dependencies = [ "iced_native", "ouroboros 0.13.0", @@ -2093,13 +2180,13 @@ dependencies = [ [[package]] name = "iced_native" version = "0.7.0" -source = "git+https://github.com/pop-os/libcosmic/?branch=master#24709e9c3b56c49a0af168d1e37ebef85f112c8a" +source = "git+https://github.com/pop-os/libcosmic/?branch=master#e5d263b23f1965e842b098891603decafc18a1e3" dependencies = [ "iced_core", "iced_futures", "iced_style", "num-traits", - "smithay-client-toolkit", + "smithay-client-toolkit 0.17.0", "twox-hash", "unicode-segmentation", ] @@ -2107,7 +2194,7 @@ dependencies = [ [[package]] name = "iced_sctk" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic/?branch=master#24709e9c3b56c49a0af168d1e37ebef85f112c8a" +source = "git+https://github.com/pop-os/libcosmic/?branch=master#e5d263b23f1965e842b098891603decafc18a1e3" dependencies = [ "enum-repr", "float-cmp", @@ -2117,7 +2204,8 @@ dependencies = [ "iced_native", "log", "raw-window-handle", - "smithay-client-toolkit", + "smithay-client-toolkit 0.17.0", + "smithay-clipboard", "thiserror", "wayland-backend", ] @@ -2125,7 +2213,7 @@ dependencies = [ [[package]] name = "iced_softbuffer" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic/?branch=master#24709e9c3b56c49a0af168d1e37ebef85f112c8a" +source = "git+https://github.com/pop-os/libcosmic/?branch=master#e5d263b23f1965e842b098891603decafc18a1e3" dependencies = [ "cosmic-text", "iced_graphics", @@ -2140,7 +2228,7 @@ dependencies = [ [[package]] name = "iced_style" version = "0.5.1" -source = "git+https://github.com/pop-os/libcosmic/?branch=master#24709e9c3b56c49a0af168d1e37ebef85f112c8a" +source = "git+https://github.com/pop-os/libcosmic/?branch=master#e5d263b23f1965e842b098891603decafc18a1e3" dependencies = [ "iced_core", "once_cell", @@ -2150,7 +2238,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.7.0" -source = "git+https://github.com/pop-os/libcosmic/?branch=master#24709e9c3b56c49a0af168d1e37ebef85f112c8a" +source = "git+https://github.com/pop-os/libcosmic/?branch=master#e5d263b23f1965e842b098891603decafc18a1e3" dependencies = [ "bitflags", "bytemuck", @@ -2186,9 +2274,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "image" -version = "0.24.5" +version = "0.24.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69b7ea949b537b0fd0af141fff8c77690f2ce96f4f41f042ccb6c69c6c965945" +checksum = "527909aa81e20ac3a44803521443a765550f09b5130c2c2fa1ea59c2f8f50a3a" dependencies = [ "bytemuck", "byteorder", @@ -2199,20 +2287,40 @@ dependencies = [ "num-rational", "num-traits", "png", - "scoped_threadpool", + "qoi", "tiff", ] [[package]] name = "indexmap" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown", ] +[[package]] +name = "inotify" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff" +dependencies = [ + "bitflags", + "inotify-sys", + "libc", +] + +[[package]] +name = "inotify-sys" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb" +dependencies = [ + "libc", +] + [[package]] name = "instant" version = "0.1.12" @@ -2243,12 +2351,13 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "1.0.3" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46112a93252b123d31a119a8d1a1ac19deac4fac6e0e8b0df58f0d4e5870e63c" +checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220" dependencies = [ + "hermit-abi 0.3.1", "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -2262,9 +2371,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" +checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" [[package]] name = "jpeg-decoder" @@ -2283,9 +2392,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.60" +version = "0.3.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" +checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" dependencies = [ "wasm-bindgen", ] @@ -2310,6 +2419,26 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "kqueue" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c8fc60ba15bf51257aa9807a48a61013db043fcf3a78cb0d916e8e396dcad98" +dependencies = [ + "kqueue-sys", + "libc", +] + +[[package]] +name = "kqueue-sys" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8367585489f01bc55dd27404dcf56b95e6da061a256a666ab23be9ba96a2e587" +dependencies = [ + "bitflags", + "libc", +] + [[package]] name = "kurbo" version = "0.8.0" @@ -2333,14 +2462,14 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" [[package]] name = "libc" -version = "0.2.139" +version = "0.2.141" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" +checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5" [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic/?branch=master#24709e9c3b56c49a0af168d1e37ebef85f112c8a" +source = "git+https://github.com/pop-os/libcosmic/?branch=master#e5d263b23f1965e842b098891603decafc18a1e3" dependencies = [ "apply", "cosmic-panel-config", @@ -2357,7 +2486,7 @@ dependencies = [ "lazy_static", "palette", "slotmap", - "smithay-client-toolkit", + "smithay-client-toolkit 0.17.0", "tokio", ] @@ -2457,6 +2586,12 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" +[[package]] +name = "linux-raw-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d59d8c75012853d2e872fb56bc8a2e53718e2cafe1a4c823143141c6d90c322f" + [[package]] name = "locale_config" version = "0.3.0" @@ -2501,9 +2636,9 @@ dependencies = [ [[package]] name = "lyon_geom" -version = "0.16.2" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce4e12203c428a58200b8cf1c0a3aad1cda907008ea11310bb3729593e5f933" +checksum = "71d89ccbdafd83d259403e22061be27bccc3254bba65cdc5303250c4227c8c8e" dependencies = [ "arrayvec 0.5.2", "euclid", @@ -2527,9 +2662,9 @@ dependencies = [ [[package]] name = "matches" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" +checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "memchr" @@ -2548,9 +2683,9 @@ dependencies = [ [[package]] name = "memmap2" -version = "0.5.8" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b182332558b18d807c4ce1ca8ca983b34c3ee32765e47b3f0f69b90355cc1dc" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" dependencies = [ "libc", ] @@ -2573,6 +2708,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "memoffset" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +dependencies = [ + "autocfg", +] + [[package]] name = "metal" version = "0.24.0" @@ -2604,14 +2748,14 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" dependencies = [ "libc", "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys", + "windows-sys 0.45.0", ] [[package]] @@ -2672,14 +2816,13 @@ dependencies = [ "cfg-if", "libc", "memoffset 0.6.5", - "pin-utils", ] [[package]] name = "nix" -version = "0.26.1" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46a58d1d356c6597d08cde02c2f09d785b09e28711837b1ed667dc652c08a694" +checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" dependencies = [ "bitflags", "cfg-if", @@ -2691,14 +2834,32 @@ dependencies = [ [[package]] name = "nom" -version = "7.1.2" +version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5507769c4919c998e69e49c839d9dc6e693ede4cc4290d6ad8b41d4f09c548c" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" dependencies = [ "memchr", "minimal-lexical", ] +[[package]] +name = "notify" +version = "5.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58ea850aa68a06e48fdb069c0ec44d0d64c8dbffa49bf3b6f7f0a901fdea1ba9" +dependencies = [ + "bitflags", + "crossbeam-channel", + "filetime", + "fsevent-sys", + "inotify", + "kqueue", + "libc", + "mio", + "walkdir", + "windows-sys 0.42.0", +] + [[package]] name = "num" version = "0.4.0" @@ -2741,7 +2902,7 @@ checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -2837,15 +2998,15 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.17.0" +version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" +checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" [[package]] name = "ordered-float" -version = "3.4.0" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d84eb1409416d254e4a9c8fa56cc24701755025b458f0fcd8e59e1f5f40c23bf" +checksum = "13a384337e997e6860ffbaa83708b2ef329fd8c54cb67a5f64d421e0f943254f" dependencies = [ "num-traits", ] @@ -2862,9 +3023,9 @@ dependencies = [ [[package]] name = "ordered-stream" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4eb9ba3f3e42dbdd3b7b122de5ca169c81e93d561eb900da3a8c99bcfcf381a" +checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50" dependencies = [ "futures-core", "pin-project-lite", @@ -2883,12 +3044,12 @@ dependencies = [ [[package]] name = "ouroboros" -version = "0.15.5" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbb50b356159620db6ac971c6d5c9ab788c9cc38a6f49619fca2a27acb062ca" +checksum = "e1358bd1558bd2a083fed428ffeda486fbfb323e698cdda7794259d592ca72db" dependencies = [ "aliasable", - "ouroboros_macro 0.15.5", + "ouroboros_macro 0.15.6", ] [[package]] @@ -2901,27 +3062,27 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "ouroboros_macro" -version = "0.15.5" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a0d9d1a6191c4f391f87219d1ea42b23f09ee84d64763cd05ee6ea88d9f384d" +checksum = "5f7d21ccd03305a674437ee1248f3ab5d4b1db095cf1caf49f1713ddf61956b7" dependencies = [ "Inflector", "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "owned_ttf_parser" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a5f3c7ca08b6879e7965fb25e24d1f5eeb32ea73f9ad99b3854778a38c57e93" +checksum = "e25e9fb15717794fae58ab55c26e044103aad13186fbb625893f9a3bbcc24228" dependencies = [ "ttf-parser 0.18.1", ] @@ -2948,7 +3109,7 @@ dependencies = [ "find-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -2975,7 +3136,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.6", + "parking_lot_core 0.9.7", ] [[package]] @@ -2994,15 +3155,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.6" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba1ef8814b5c993410bb3adfad7a5ed269563e4a2f90c41f5d85be7fb47133bf" +checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" dependencies = [ "cfg-if", "libc", "redox_syscall 0.2.16", "smallvec", - "windows-sys", + "windows-sys 0.45.0", ] [[package]] @@ -3035,7 +3196,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -3070,7 +3231,7 @@ checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -3105,16 +3266,18 @@ dependencies = [ [[package]] name = "polling" -version = "2.5.2" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22122d5ec4f9fe1b3916419b76be1e80bcb93f618d071d2edf841b137b2a2bd6" +checksum = "7e1f879b2998099c2d69ab9605d145d5b661195627eccc680002c4918a7fb6fa" dependencies = [ "autocfg", + "bitflags", "cfg-if", + "concurrent-queue", "libc", "log", - "wepoll-ffi", - "windows-sys", + "pin-project-lite", + "windows-sys 0.45.0", ] [[package]] @@ -3135,13 +3298,12 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "1.2.1" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eda0fc3b0fb7c975631757e14d9049da17374063edb6ebbcbc54d880d4fe94e9" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "thiserror", - "toml", + "toml_edit", ] [[package]] @@ -3153,7 +3315,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "version_check", ] @@ -3170,9 +3332,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.49" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a8eca9f9c4ffde41714334dee777596264c7825420f521abc92b5b5deb63a5" +checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" dependencies = [ "unicode-ident", ] @@ -3187,7 +3349,7 @@ dependencies = [ "byteorder", "hex", "lazy_static", - "rustix", + "rustix 0.36.12", ] [[package]] @@ -3196,6 +3358,15 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74605f360ce573babfe43964cbe520294dcb081afbf8c108fc6e23036b4da2df" +[[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 = "1.2.3" @@ -3213,9 +3384,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.23" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" dependencies = [ "proc-macro2", ] @@ -3252,9 +3423,9 @@ dependencies = [ [[package]] name = "range-alloc" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63e935c45e09cc6dcf00d2f0b2d630a58f4095320223d47fc68918722f0538b6" +checksum = "9c8a99fddc9f0ba0a85884b8d14e3592853e787d581ca1816c91349b10e4eeab" [[package]] name = "rangemap" @@ -3264,9 +3435,9 @@ checksum = "8b9283c6b06096b47afc7109834fdedab891175bb5241ee5d4f7d2546549f263" [[package]] name = "raqote" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8d728aa565b374ac3a2109401af5707e941f7189914f5bb64fc416abcbd08ff" +checksum = "f5b6cb89f8be6a645e5834f3ad44a7960d12343d97b5b7fb07cb0365ae36aa2d" dependencies = [ "euclid", "lyon_geom", @@ -3276,18 +3447,15 @@ dependencies = [ [[package]] name = "raw-window-handle" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed7e3d950b66e19e0c372f3fa3fbbcf85b1746b571f74e0c2af6042a5c93420a" -dependencies = [ - "cty", -] +checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" [[package]] name = "rayon" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" +checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" dependencies = [ "either", "rayon-core", @@ -3295,9 +3463,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" dependencies = [ "crossbeam-channel", "crossbeam-deque", @@ -3322,9 +3490,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb02a9aee8e8c7ad8d86890f1e16b49e0bbbffc9961ff3788c31d57c98bcbf03" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ "bitflags", ] @@ -3342,9 +3510,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.7.1" +version = "1.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" +checksum = "8b1f693b24f6ac912f4893ef08244d70b6067480d2f1a46e950c9691e6749d1d" dependencies = [ "aho-corasick", "memchr", @@ -3353,18 +3521,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.28" +version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" - -[[package]] -name = "remove_dir_all" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "renderdoc-sys" @@ -3390,9 +3549,9 @@ dependencies = [ [[package]] name = "rgb" -version = "0.8.34" +version = "0.8.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3603b7d71ca82644f79b5a06d1220e9a58ede60bd32255f698cb1af8838b8db3" +checksum = "20ec2d3e3fc7a92ced357df9cebd5a10b6fb2aa1ee797bf7e9ce2f17dffc8f59" dependencies = [ "bytemuck", ] @@ -3419,9 +3578,9 @@ dependencies = [ [[package]] name = "rust-embed" -version = "6.4.2" +version = "6.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "283ffe2f866869428c92e0d61c2f35dfb4355293cdfdc48f49e895c15f1333d1" +checksum = "1b68543d5527e158213414a92832d2aab11a84d2571a5eb021ebe22c43aab066" dependencies = [ "rust-embed-impl", "rust-embed-utils", @@ -3430,22 +3589,22 @@ dependencies = [ [[package]] name = "rust-embed-impl" -version = "6.3.1" +version = "6.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31ab23d42d71fb9be1b643fe6765d292c5e14d46912d13f3ae2815ca048ea04d" +checksum = "4d4e0f0ced47ded9a68374ac145edd65a6c1fa13a96447b873660b2a568a0fd7" dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn", + "syn 1.0.109", "walkdir", ] [[package]] name = "rust-embed-utils" -version = "7.3.0" +version = "7.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1669d81dfabd1b5f8e2856b8bbe146c6192b0ba22162edc738ac0a5de18f054" +checksum = "512b0ab6853f7e14e3c8754acb43d6f748bb9ced66aa5915a6553ac8213f7731" dependencies = [ "sha2", "walkdir", @@ -3469,23 +3628,37 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustix" -version = "0.36.6" +version = "0.36.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4feacf7db682c6c329c4ede12649cd36ecab0f3be5b7d74e6a20304725db4549" +checksum = "e0af200a3324fa5bcd922e84e9b55a298ea9f431a489f01961acdebc6e908f25" dependencies = [ "bitflags", "errno", "io-lifetimes", "libc", - "linux-raw-sys", - "windows-sys", + "linux-raw-sys 0.1.4", + "windows-sys 0.45.0", +] + +[[package]] +name = "rustix" +version = "0.37.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2aae838e49b3d63e9274e1c01833cc8139d3fec468c3b84688c628f44b1ae11d" +dependencies = [ + "bitflags", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys 0.3.1", + "windows-sys 0.45.0", ] [[package]] name = "rustversion" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70" +checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" [[package]] name = "rustybuzz" @@ -3522,9 +3695,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" +checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" [[package]] name = "safe_arch" @@ -3550,12 +3723,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" -[[package]] -name = "scoped_threadpool" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8" - [[package]] name = "scopeguard" version = "1.1.0" @@ -3564,9 +3731,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "scratch" -version = "1.0.3" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2" +checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" [[package]] name = "self_cell" @@ -3576,29 +3743,29 @@ checksum = "1ef965a420fe14fdac7dd018862966a4c14094f900e1650bbc71ddd7d580c8af" [[package]] name = "serde" -version = "1.0.152" +version = "1.0.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" +checksum = "3c04e8343c3daeec41f58990b9d77068df31209f2af111e059e9fe9646693065" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.152" +version = "1.0.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" +checksum = "4c614d17805b093df4b147b51339e7e44bf05ef59fba1e45d83500bcfb4d8585" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.13", ] [[package]] name = "serde_json" -version = "1.0.92" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7434af0dc1cbd59268aa98b4c22c131c0584d2232f6fb166efb993e2832e896a" +checksum = "d721eca97ac802aa7777b701877c8004d950fc142651367300d21c1cc0194744" dependencies = [ "itoa", "ryu", @@ -3607,13 +3774,22 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.10" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a5ec9fa74a20ebbe5d9ac23dac1fc96ba0ecfe9f50f2843b52e537b10fbcb4e" +checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.13", +] + +[[package]] +name = "serde_spanned" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0efd8caf556a6cebd3b285caf480045fcc1ac04f6bd786b09a6f11af30c4fcf4" +dependencies = [ + "serde", ] [[package]] @@ -3646,13 +3822,19 @@ checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" [[package]] name = "signal-hook-registry" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" dependencies = [ "libc", ] +[[package]] +name = "simd-adler32" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "238abfbb77c1915110ad968465608b68e869e0772622c9656714e73e5a1a522f" + [[package]] name = "simplecss" version = "0.2.1" @@ -3670,9 +3852,9 @@ checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" [[package]] name = "slab" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" dependencies = [ "autocfg", ] @@ -3695,31 +3877,59 @@ checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "smithay-client-toolkit" version = "0.16.0" -source = "git+https://github.com/Smithay/client-toolkit?rev=69bffe5#69bffe5e80bed15997cd6712f66b8ea77fc8718e" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f307c47d32d2715eb2e0ece5589057820e0e5e70d07c247d1063e844e107f454" +dependencies = [ + "bitflags", + "dlib", + "lazy_static", + "log", + "memmap2 0.5.10", + "nix 0.24.3", + "pkg-config", + "wayland-client 0.29.5", + "wayland-cursor 0.29.5", + "wayland-protocols 0.29.5", +] + +[[package]] +name = "smithay-client-toolkit" +version = "0.17.0" +source = "git+https://github.com/Smithay/client-toolkit?rev=389a4f2#389a4f21872a99a3ba346cc3dabd55c4079ec191" dependencies = [ "bitflags", "calloop", "dlib", "lazy_static", "log", - "memmap2 0.5.8", - "nix 0.26.1", + "memmap2 0.5.10", + "nix 0.26.2", "pkg-config", "thiserror", "wayland-backend", - "wayland-client", - "wayland-cursor", - "wayland-protocols", + "wayland-client 0.30.1", + "wayland-cursor 0.30.0", + "wayland-protocols 0.30.0", "wayland-protocols-wlr", - "wayland-scanner", + "wayland-scanner 0.30.0", "xkbcommon", ] [[package]] -name = "socket2" -version = "0.4.7" +name = "smithay-clipboard" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +checksum = "0a345c870a1fae0b1b779085e81b51e614767c239e93503588e54c5b17f4b0e8" +dependencies = [ + "smithay-client-toolkit 0.16.0", + "wayland-client 0.29.5", +] + +[[package]] +name = "socket2" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", "winapi", @@ -3728,7 +3938,7 @@ dependencies = [ [[package]] name = "softbuffer" version = "0.2.0" -source = "git+https://github.com/pop-os/softbuffer?rev=8dcb6438b#8dcb6438b6c1688a0015b477dfa76c6c0bee3318" +source = "git+https://github.com/pop-os/softbuffer?tag=cosmic-2.0#98b9099f87113c4a4b577de5670ddf41149966b4" dependencies = [ "bytemuck", "cfg_aliases", @@ -3737,26 +3947,26 @@ dependencies = [ "fastrand", "foreign-types", "log", - "nix 0.26.1", + "nix 0.26.2", "objc", "raw-window-handle", - "redox_syscall 0.3.4", + "redox_syscall 0.3.5", "thiserror", "wasm-bindgen", "wayland-backend", - "wayland-client", - "wayland-sys", + "wayland-client 0.30.1", + "wayland-sys 0.30.1", "web-sys", - "windows-sys", + "windows-sys 0.45.0", "x11-dl", "x11rb", ] [[package]] name = "spin" -version = "0.9.4" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6002a767bff9e83f8eeecf883ecb8011875a21ae8da43bffb817a57e78cc09" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" dependencies = [ "lock_api", ] @@ -3814,7 +4024,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn", + "syn 1.0.109", ] [[package]] @@ -3844,9 +4054,9 @@ dependencies = [ [[package]] name = "sw-composite" -version = "0.7.15" +version = "0.7.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b8d4f1dd38540e3f62c393ae78e874c94491c403025368183b018e3fb098b1f" +checksum = "9ac8fb7895b4afa060ad731a32860db8755da3449a47e796d5ecf758db2671d4" [[package]] name = "swash" @@ -3860,9 +4070,20 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.107" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c9da457c5285ac1f936ebd076af6dac17a61cfe7826f2076b4d015cf47bc8ec" dependencies = [ "proc-macro2", "quote", @@ -3877,33 +4098,33 @@ checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "unicode-xid", ] [[package]] name = "sys-locale" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3358acbb4acd4146138b9bda219e904a6bb5aaaa237f8eed06f4d6bc1580ecee" +checksum = "f8a11bd9c338fdba09f7881ab41551932ad42e405f61d01e8406baea71c07aee" dependencies = [ "js-sys", "libc", "wasm-bindgen", "web-sys", - "winapi", + "windows-sys 0.45.0", ] [[package]] name = "system-deps" -version = "6.0.3" +version = "6.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2955b1fe31e1fa2fbd1976b71cc69a606d7d4da16f6de3333d0c92d51419aeff" +checksum = "555fc8147af6256f3931a36bb83ad0023240ce9cf2b319dec8236fd1f220b05f" dependencies = [ "cfg-expr", "heck", "pkg-config", - "toml", + "toml 0.7.3", "version-compare", ] @@ -3915,54 +4136,44 @@ checksum = "af547b166dd1ea4b472165569fc456cfb6818116f854690b0ff205e636523dab" [[package]] name = "tempfile" -version = "3.3.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" dependencies = [ "cfg-if", "fastrand", - "libc", - "redox_syscall 0.2.16", - "remove_dir_all", - "winapi", + "redox_syscall 0.3.5", + "rustix 0.37.7", + "windows-sys 0.45.0", ] [[package]] name = "termcolor" -version = "1.1.3" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" dependencies = [ "winapi-util", ] [[package]] name = "thiserror" -version = "1.0.38" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" +checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.38" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" +checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn", -] - -[[package]] -name = "threadpool" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" -dependencies = [ - "num_cpus", + "syn 2.0.13", ] [[package]] @@ -3989,9 +4200,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.17" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376" +checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890" dependencies = [ "serde", "time-core", @@ -4019,23 +4230,22 @@ dependencies = [ [[package]] name = "tinystr" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8aeafdfd935e4a7fe16a91ab711fa52d54df84f9c8f7ca5837a9d1d902ef4c2" +checksum = "7ac3f5b6856e931e15e07b478e98c8045239829a65f9156d4fa7e7788197a5ef" dependencies = [ "displaydoc", ] [[package]] name = "tokio" -version = "1.24.2" +version = "1.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a12a59981d9e3c38d216785b0c37399f6e415e8d0712047620f189371b0bb" +checksum = "d0de47a4eecbe11f498978a9b29d792f0d2692d1dd003650c24c76510e3bc001" dependencies = [ "autocfg", "bytes", "libc", - "memchr", "mio", "num_cpus", "parking_lot 0.12.1", @@ -4044,25 +4254,25 @@ dependencies = [ "socket2", "tokio-macros", "tracing", - "windows-sys", + "windows-sys 0.45.0", ] [[package]] name = "tokio-macros" -version = "1.8.2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" +checksum = "61a573bdc87985e9d6ddeed1b3d864e8a302c847e40d647746df2f1de209d1ce" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.13", ] [[package]] name = "tokio-stream" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d660770404473ccd7bc9f8b28494a811bc18542b915c0855c51e8f419d5223ce" +checksum = "8fb52b74f05dbf495a8fba459fdc331812b96aa086d9eb78101fa0d4569c3313" dependencies = [ "futures-core", "pin-project-lite", @@ -4071,13 +4281,47 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.10" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" dependencies = [ "serde", ] +[[package]] +name = "toml" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b403acf6f2bb0859c93c7f0d967cb4a75a7ac552100f9322faf64dc047669b21" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.19.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "239410c8609e8125456927e6707163a3b1fdb40561e4b803bc041f466ccfdc13" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + [[package]] name = "tracing" version = "0.1.37" @@ -4098,7 +4342,7 @@ checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -4185,9 +4429,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.8" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-bidi-mirroring" @@ -4215,9 +4459,9 @@ checksum = "2281c8c1d221438e373249e065ca4989c4c36952c211ff21a0ee91c44a3869e7" [[package]] name = "unicode-ident" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" +checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" [[package]] name = "unicode-linebreak" @@ -4237,9 +4481,9 @@ checksum = "7d817255e1bed6dfd4ca47258685d14d2bdcfbc64fdc9e3819bd5848057b8ecc" [[package]] name = "unicode-segmentation" -version = "1.10.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "unicode-vo" @@ -4321,12 +4565,11 @@ checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" [[package]] name = "walkdir" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" dependencies = [ "same-file", - "winapi", "winapi-util", ] @@ -4344,9 +4587,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" +checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -4354,24 +4597,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" +checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.33" +version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" +checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" dependencies = [ "cfg-if", "js-sys", @@ -4381,9 +4624,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" +checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4391,22 +4634,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" +checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" +checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" [[package]] name = "wasm-timer" @@ -4425,17 +4668,33 @@ dependencies = [ [[package]] name = "wayland-backend" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb23bfea266c92bb051ea36cce0eb1a52b743dc1c5f168021947eda79764656d" +checksum = "79ebd48bfc1178c9190c7ff80cc822b3335ffc83141e9aa723168f377257623e" dependencies = [ "cc", "downcast-rs", "io-lifetimes", - "nix 0.26.1", + "nix 0.26.2", "scoped-tls", "smallvec", - "wayland-sys", + "wayland-sys 0.30.1", +] + +[[package]] +name = "wayland-client" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f3b068c05a039c9f755f881dc50f01732214f5685e379829759088967c46715" +dependencies = [ + "bitflags", + "downcast-rs", + "libc", + "nix 0.24.3", + "scoped-tls", + "wayland-commons", + "wayland-scanner 0.29.5", + "wayland-sys 0.29.5", ] [[package]] @@ -4446,9 +4705,32 @@ checksum = "85bde68449abab1a808e5227b6e295f4ae3680911eb7711b4a2cb90141edb780" dependencies = [ "bitflags", "calloop", - "nix 0.26.1", + "nix 0.26.2", "wayland-backend", - "wayland-scanner", + "wayland-scanner 0.30.0", +] + +[[package]] +name = "wayland-commons" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8691f134d584a33a6606d9d717b95c4fa20065605f798a3f350d78dced02a902" +dependencies = [ + "nix 0.24.3", + "once_cell", + "smallvec", + "wayland-sys 0.29.5", +] + +[[package]] +name = "wayland-cursor" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6865c6b66f13d6257bef1cd40cbfe8ef2f150fb8ebbdb1e8e873455931377661" +dependencies = [ + "nix 0.24.3", + "wayland-client 0.29.5", + "xcursor", ] [[package]] @@ -4457,11 +4739,23 @@ version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d0c3a0d5b4b688b07b0442362d3ed6bf04724fcc16cd69ab6285b90dbc487aa" dependencies = [ - "nix 0.26.1", - "wayland-client", + "nix 0.26.2", + "wayland-client 0.30.1", "xcursor", ] +[[package]] +name = "wayland-protocols" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6" +dependencies = [ + "bitflags", + "wayland-client 0.29.5", + "wayland-commons", + "wayland-scanner 0.29.5", +] + [[package]] name = "wayland-protocols" version = "0.30.0" @@ -4470,8 +4764,8 @@ checksum = "7fefbeb8a360abe67ab7c2efe1d297a1a50ee011f5460791bc18870c26bb84e2" dependencies = [ "bitflags", "wayland-backend", - "wayland-client", - "wayland-scanner", + "wayland-client 0.30.1", + "wayland-scanner 0.30.0", "wayland-server", ] @@ -4483,12 +4777,23 @@ checksum = "fce991093320e4a6a525876e6b629ab24da25f9baef0c2e0080ad173ec89588a" dependencies = [ "bitflags", "wayland-backend", - "wayland-client", - "wayland-protocols", - "wayland-scanner", + "wayland-client 0.30.1", + "wayland-protocols 0.30.0", + "wayland-scanner 0.30.0", "wayland-server", ] +[[package]] +name = "wayland-scanner" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f4303d8fa22ab852f789e75a967f0a2cdc430a607751c0499bada3e451cbd53" +dependencies = [ + "proc-macro2", + "quote", + "xml-rs", +] + [[package]] name = "wayland-scanner" version = "0.30.0" @@ -4509,9 +4814,20 @@ dependencies = [ "bitflags", "downcast-rs", "io-lifetimes", - "nix 0.26.1", + "nix 0.26.2", "wayland-backend", - "wayland-scanner", + "wayland-scanner 0.30.0", +] + +[[package]] +name = "wayland-sys" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be12ce1a3c39ec7dba25594b97b42cb3195d54953ddb9d3d95a7c3902bc6e9d4" +dependencies = [ + "dlib", + "lazy_static", + "pkg-config", ] [[package]] @@ -4528,9 +4844,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.60" +version = "0.3.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" +checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" dependencies = [ "js-sys", "wasm-bindgen", @@ -4542,15 +4858,6 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" -[[package]] -name = "wepoll-ffi" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb" -dependencies = [ - "cc", -] - [[package]] name = "wgpu" version = "0.14.2" @@ -4697,71 +5004,179 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +dependencies = [ + "windows-targets 0.48.0", +] + [[package]] name = "windows-sys" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.0", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +dependencies = [ + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" [[package]] name = "windows_aarch64_msvc" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" [[package]] name = "windows_i686_gnu" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" [[package]] name = "windows_i686_msvc" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" [[package]] name = "windows_x86_64_gnu" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" [[package]] name = "windows_x86_64_msvc" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" + +[[package]] +name = "winnow" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae8970b36c66498d8ff1d66685dc86b91b29db0c7739899012f63a63814b4b28" +dependencies = [ + "memchr", +] [[package]] name = "x11-dl" -version = "2.20.1" +version = "2.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1536d6965a5d4e573c7ef73a2c15ebcd0b2de3347bdf526c34c297c00ac40f0" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" dependencies = [ - "lazy_static", "libc", + "once_cell", "pkg-config", ] @@ -4811,7 +5226,7 @@ dependencies = [ [[package]] name = "xdg-shell-wrapper-config" version = "0.1.0" -source = "git+https://github.com/pop-os/xdg-shell-wrapper#c1af8996077de8ad11ff9c3a9eae6aae839b757f" +source = "git+https://github.com/pop-os/xdg-shell-wrapper#6751f5e32d2d3c01aef2b423975e7b68965d36c1" dependencies = [ "serde", "wayland-protocols-wlr", @@ -4830,9 +5245,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbee136714379ab22da0280207fdb7f47e0bb940adea97731b65598b8c7a92e" dependencies = [ "libc", - "memmap2 0.5.8", + "memmap2 0.5.10", ] +[[package]] +name = "xml-rs" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3" + [[package]] name = "xmlparser" version = "0.13.5" @@ -4853,12 +5274,13 @@ checksum = "c03b3e19c937b5b9bd8e52b1c88f30cce5c0d33d676cf174866175bb794ff658" [[package]] name = "zbus" -version = "3.7.0" +version = "3.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "379d587c0ccb632d1179cf44082653f682842f0535f0fdfaefffc34849cc855e" +checksum = "3dc29e76f558b2cb94190e8605ecfe77dd40f5df8c072951714b4b71a97f5848" dependencies = [ "async-broadcast", "async-executor", + "async-fs", "async-io", "async-lock", "async-recursion", @@ -4874,7 +5296,7 @@ dependencies = [ "futures-util", "hex", "lazy_static", - "nix 0.25.1", + "nix 0.26.2", "once_cell", "ordered-stream", "rand", @@ -4893,15 +5315,16 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "3.7.0" +version = "3.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66492a2e90c0df7190583eccb8424aa12eb7ff06edea415a4fff6688fae18cf8" +checksum = "62a80fd82c011cd08459eaaf1fd83d3090c1b61e6d5284360074a7475af3a85d" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", "regex", - "syn", + "syn 1.0.109", + "zvariant_utils", ] [[package]] @@ -4922,10 +5345,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c110ba09c9b3a43edd4803d570df0da2414fed6e822e22b976a4e3ef50860701" [[package]] -name = "zvariant" -version = "3.10.0" +name = "zune-inflate" +version = "0.2.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "576cc41e65c7f283e5460f5818073e68fb1f1631502b969ef228c2e03c862efb" +checksum = "440a08fd59c6442e4b846ea9b10386c38307eae728b216e1ab2c305d1c9daaf8" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "zvariant" +version = "3.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46fe4914a985446d6fd287019b5fceccce38303d71407d9e6e711d44954a05d8" dependencies = [ "byteorder", "enumflags2", @@ -4937,12 +5369,24 @@ dependencies = [ [[package]] name = "zvariant_derive" -version = "3.10.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fd4aafc0dee96ae7242a24249ce9babf21e1562822f03df650d4e68c20e41ed" +checksum = "34c20260af4b28b3275d6676c7e2a6be0d4332e8e0aba4616d34007fd84e462a" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", + "zvariant_utils", +] + +[[package]] +name = "zvariant_utils" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53b22993dbc4d128a17a3b6c92f1c63872dd67198537ee728d8b5d7c40640a8b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", ] diff --git a/cosmic-app-list/src/app.rs b/cosmic-app-list/src/app.rs index d355df6b..7b2f2c8b 100644 --- a/cosmic-app-list/src/app.rs +++ b/cosmic-app-list/src/app.rs @@ -17,7 +17,6 @@ use cosmic::iced; use cosmic::iced::wayland::actions::window::SctkWindowSettings; use cosmic::iced::wayland::popup::destroy_popup; use cosmic::iced::wayland::popup::get_popup; -use cosmic::iced::wayland::SurfaceIdWrapper; use cosmic::iced::widget::mouse_listener; use cosmic::iced::widget::{column, row}; use cosmic::iced::Settings; @@ -39,7 +38,6 @@ use cosmic::{Element, Theme}; use cosmic_protocols::toplevel_info::v1::client::zcosmic_toplevel_handle_v1::ZcosmicToplevelHandleV1; use freedesktop_desktop_entry::DesktopEntry; use iced::widget::container; -use iced::widget::horizontal_space; use iced::Alignment; use iced::Background; use iced::Length; @@ -380,211 +378,202 @@ impl Application for CosmicAppList { Command::none() } - fn view(&self, id: SurfaceIdWrapper) -> Element { - match id { - SurfaceIdWrapper::LayerSurface(_) => unimplemented!(), - SurfaceIdWrapper::Window(_) => { - let (favorites, running) = self.toplevel_list.iter().fold( - (Vec::new(), Vec::new()), - |(mut favorites, mut running), - Toplevel { - id, - toplevels, - desktop_info, - .. - }| { - let cosmic_icon = cosmic::widget::icon( - Path::new(&desktop_info.icon), - self.applet_helper.suggested_size().0, - ); + fn view(&self, id: window::Id) -> Element { + if let Some(Toplevel { + toplevels, + desktop_info, + .. + }) = self.toplevel_list.iter().find(|t| t.popup == Some(id)) + { + let is_favorite = self.config.favorites.contains(&desktop_info.id) + || self.config.favorites.contains(&desktop_info.name); - let dot_radius = 2; - let dots = (0..toplevels.len()) - .into_iter() - .map(|_| { - container(vertical_space(Length::Units(0))) - .padding(dot_radius) - .style(::Style::Custom( - |theme| container::Appearance { - text_color: Some(Color::TRANSPARENT), - background: Some(Background::Color( - theme.cosmic().on_bg_color().into(), - )), - border_radius: 4.0, - border_width: 0.0, - border_color: Color::TRANSPARENT, - }, - )) - .into() - }) - .collect_vec(); - let icon_wrapper = match &self.applet_helper.anchor { - PanelAnchor::Left => { - row(vec![column(dots).spacing(4).into(), cosmic_icon.into()]) - .align_items(iced::Alignment::Center) - .spacing(4) - .into() - } - PanelAnchor::Right => { - row(vec![cosmic_icon.into(), column(dots).spacing(4).into()]) - .align_items(iced::Alignment::Center) - .spacing(4) - .into() - } - PanelAnchor::Top => { - column(vec![row(dots).spacing(4).into(), cosmic_icon.into()]) - .align_items(iced::Alignment::Center) - .spacing(4) - .into() - } - PanelAnchor::Bottom => { - column(vec![cosmic_icon.into(), row(dots).spacing(4).into()]) - .align_items(iced::Alignment::Center) - .spacing(4) - .into() - } - }; - let mut icon_button = cosmic::widget::button(Button::Text) - .custom(vec![icon_wrapper]) - .padding(8); - if self.popup.is_none() { - icon_button = icon_button.on_press( - toplevels - .first() - .map(|t| Message::Activate(t.0.clone())) - .unwrap_or_else(|| Message::Exec(desktop_info.exec.clone())), - ); - } + let mut content = column![ + iced::widget::text(&desktop_info.name).horizontal_alignment(Horizontal::Center), + cosmic::widget::button(Button::Text) + .custom(vec![iced::widget::text(fl!("new-window")).into()]) + .on_press(Message::Exec(desktop_info.exec.clone())), + ] + .padding(8) + .spacing(4) + .align_items(Alignment::Center); + if !toplevels.is_empty() { + let mut list_col = column![]; + for (handle, info) in toplevels { + let title = if info.title.len() > 20 { + format!("{:.24}...", &info.title) + } else { + info.title.clone() + }; + list_col = list_col.push( + cosmic::widget::button(Button::Text) + .custom(vec![iced::widget::text(title).into()]) + .on_press(Message::Activate(handle.clone())), + ); + } + content = content.push(divider::horizontal::light()); + content = content.push(list_col); + content = content.push(divider::horizontal::light()); + } + content = content.push(if is_favorite { + cosmic::widget::button(Button::Text) + .custom(vec![iced::widget::text(fl!("unfavorite")).into()]) + .on_press(Message::UnFavorite(desktop_info.id.clone())) + } else { + cosmic::widget::button(Button::Text) + .custom(vec![iced::widget::text(fl!("favorite")).into()]) + .on_press(Message::Favorite(desktop_info.id.clone())) + }); - // TODO tooltip on hover - let icon_button = mouse_listener( - icon_button.width(Length::Shrink).height(Length::Shrink), - ) - .on_right_release(Message::Popup(desktop_info.id.clone())); - let icon_button = if let Some(tracker) = self.rectangle_tracker.as_ref() { - tracker.container(*id, icon_button).into() - } else { - icon_button.into() - }; - if self.config.favorites.contains(&desktop_info.id) - || self.config.favorites.contains(&desktop_info.name) - { - favorites.push(icon_button) - } else { - running.push(icon_button); - } - (favorites, running) - }, + content = match toplevels.len() { + 0 => content, + 1 => content.push( + cosmic::widget::button(Button::Text) + .custom(vec![iced::widget::text(fl!("quit")).into()]) + .on_press(Message::Quit(desktop_info.id.clone())), + ), + _ => content.push( + cosmic::widget::button(Button::Text) + .custom(vec![iced::widget::text(&fl!("quit-all")).into()]) + .on_press(Message::Quit(desktop_info.id.clone())), + ), + }; + // return Container::new(Container::new(content.width(Length::Shrink).height(Length::Shrink)).style( + // cosmic::Container::Custom(|theme| container::Appearance { + // text_color: Some(theme.cosmic().on_bg_color().into()), + // background: Some(theme.extended_palette().background.base.color.into()), + // border_radius: 12.0, + // border_width: 0.0, + // border_color: Color::TRANSPARENT, + // }), + // )).into(); + return self.applet_helper.popup_container(content).into(); + } + + let (favorites, running) = self.toplevel_list.iter().fold( + (Vec::new(), Vec::new()), + |(mut favorites, mut running), + Toplevel { + id, + toplevels, + desktop_info, + .. + }| { + let cosmic_icon = cosmic::widget::icon( + Path::new(&desktop_info.icon), + self.applet_helper.suggested_size().0, ); - let (w, h) = match self.applet_helper.anchor { - PanelAnchor::Top | PanelAnchor::Bottom => (Length::Shrink, Length::Fill), - PanelAnchor::Left | PanelAnchor::Right => (Length::Fill, Length::Shrink), - }; - - let content = match &self.applet_helper.anchor { - PanelAnchor::Left | PanelAnchor::Right => container( - column![ - column(favorites), - divider::horizontal::light(), - column(running) - ] - .spacing(4) - .align_items(Alignment::Center) - .height(h) - .width(w), - ), - PanelAnchor::Top | PanelAnchor::Bottom => container( - row![row(favorites), vertical_rule(1), row(running)] + let dot_radius = 2; + let dots = (0..toplevels.len()) + .into_iter() + .map(|_| { + container(vertical_space(Length::Units(0))) + .padding(dot_radius) + .style(::Style::Custom( + |theme| container::Appearance { + text_color: Some(Color::TRANSPARENT), + background: Some(Background::Color( + theme.cosmic().on_bg_color().into(), + )), + border_radius: 4.0, + border_width: 0.0, + border_color: Color::TRANSPARENT, + }, + )) + .into() + }) + .collect_vec(); + let icon_wrapper = match &self.applet_helper.anchor { + PanelAnchor::Left => { + row(vec![column(dots).spacing(4).into(), cosmic_icon.into()]) + .align_items(iced::Alignment::Center) .spacing(4) - .align_items(Alignment::Center) - .height(h) - .width(w), - ), - }; - if self.popup.is_some() { - mouse_listener(content) - .on_right_press(Message::ClosePopup) - .on_press(Message::ClosePopup) - .into() - } else { - content.into() - } - } - SurfaceIdWrapper::Popup(p) => { - if let Some(Toplevel { - toplevels, - desktop_info, - .. - }) = self.toplevel_list.iter().find(|t| t.popup == Some(p)) - { - let is_favorite = self.config.favorites.contains(&desktop_info.id) - || self.config.favorites.contains(&desktop_info.name); - - let mut content = column![ - iced::widget::text(&desktop_info.name) - .horizontal_alignment(Horizontal::Center), - cosmic::widget::button(Button::Text) - .custom(vec![iced::widget::text(fl!("new-window")).into()]) - .on_press(Message::Exec(desktop_info.exec.clone())), - ] - .padding(8) - .spacing(4) - .align_items(Alignment::Center); - if !toplevels.is_empty() { - let mut list_col = column![]; - for (handle, info) in toplevels { - let title = if info.title.len() > 20 { - format!("{:.24}...", &info.title) - } else { - info.title.clone() - }; - list_col = list_col.push( - cosmic::widget::button(Button::Text) - .custom(vec![iced::widget::text(title).into()]) - .on_press(Message::Activate(handle.clone())), - ); - } - content = content.push(divider::horizontal::light()); - content = content.push(list_col); - content = content.push(divider::horizontal::light()); + .into() } - content = content.push(if is_favorite { - cosmic::widget::button(Button::Text) - .custom(vec![iced::widget::text(fl!("unfavorite")).into()]) - .on_press(Message::UnFavorite(desktop_info.id.clone())) - } else { - cosmic::widget::button(Button::Text) - .custom(vec![iced::widget::text(fl!("favorite")).into()]) - .on_press(Message::Favorite(desktop_info.id.clone())) - }); - - content = match toplevels.len() { - 0 => content, - 1 => content.push( - cosmic::widget::button(Button::Text) - .custom(vec![iced::widget::text(fl!("quit")).into()]) - .on_press(Message::Quit(desktop_info.id.clone())), - ), - _ => content.push( - cosmic::widget::button(Button::Text) - .custom(vec![iced::widget::text(&fl!("quit-all")).into()]) - .on_press(Message::Quit(desktop_info.id.clone())), - ), - }; - // return Container::new(Container::new(content.width(Length::Shrink).height(Length::Shrink)).style( - // cosmic::Container::Custom(|theme| container::Appearance { - // text_color: Some(theme.cosmic().on_bg_color().into()), - // background: Some(theme.extended_palette().background.base.color.into()), - // border_radius: 12.0, - // border_width: 0.0, - // border_color: Color::TRANSPARENT, - // }), - // )).into(); - return self.applet_helper.popup_container(content).into(); + PanelAnchor::Right => { + row(vec![cosmic_icon.into(), column(dots).spacing(4).into()]) + .align_items(iced::Alignment::Center) + .spacing(4) + .into() + } + PanelAnchor::Top => { + column(vec![row(dots).spacing(4).into(), cosmic_icon.into()]) + .align_items(iced::Alignment::Center) + .spacing(4) + .into() + } + PanelAnchor::Bottom => { + column(vec![cosmic_icon.into(), row(dots).spacing(4).into()]) + .align_items(iced::Alignment::Center) + .spacing(4) + .into() + } + }; + let mut icon_button = cosmic::widget::button(Button::Text) + .custom(vec![icon_wrapper]) + .padding(8); + if self.popup.is_none() { + icon_button = icon_button.on_press( + toplevels + .first() + .map(|t| Message::Activate(t.0.clone())) + .unwrap_or_else(|| Message::Exec(desktop_info.exec.clone())), + ); } - horizontal_space(Length::Units(1)).into() - } + + // TODO tooltip on hover + let icon_button = + mouse_listener(icon_button.width(Length::Shrink).height(Length::Shrink)) + .on_right_release(Message::Popup(desktop_info.id.clone())); + let icon_button = if let Some(tracker) = self.rectangle_tracker.as_ref() { + tracker.container(*id, icon_button).into() + } else { + icon_button.into() + }; + if self.config.favorites.contains(&desktop_info.id) + || self.config.favorites.contains(&desktop_info.name) + { + favorites.push(icon_button) + } else { + running.push(icon_button); + } + (favorites, running) + }, + ); + + let (w, h) = match self.applet_helper.anchor { + PanelAnchor::Top | PanelAnchor::Bottom => (Length::Shrink, Length::Fill), + PanelAnchor::Left | PanelAnchor::Right => (Length::Fill, Length::Shrink), + }; + + let content = match &self.applet_helper.anchor { + PanelAnchor::Left | PanelAnchor::Right => container( + column![ + column(favorites), + divider::horizontal::light(), + column(running) + ] + .spacing(4) + .align_items(Alignment::Center) + .height(h) + .width(w), + ), + PanelAnchor::Top | PanelAnchor::Bottom => container( + row![row(favorites), vertical_rule(1), row(running)] + .spacing(4) + .align_items(Alignment::Center) + .height(h) + .width(w), + ), + }; + if self.popup.is_some() { + mouse_listener(content) + .on_right_press(Message::ClosePopup) + .on_press(Message::ClosePopup) + .into() + } else { + content.into() } } @@ -614,7 +603,7 @@ impl Application for CosmicAppList { self.theme } - fn close_requested(&self, _id: SurfaceIdWrapper) -> Self::Message { + fn close_requested(&self, _id: window::Id) -> Self::Message { Message::Ignore } diff --git a/cosmic-applet-audio/Cargo.toml b/cosmic-applet-audio/Cargo.toml index 1a75abab..84f35d25 100644 --- a/cosmic-applet-audio/Cargo.toml +++ b/cosmic-applet-audio/Cargo.toml @@ -11,6 +11,5 @@ libpulse-binding = "2.26.0" libpulse-glib-binding = "2.25.0" tokio = { version = "1.20.1", features=["full"] } libcosmic = { git = "https://github.com/pop-os/libcosmic/", branch = "master", default-features = false, features = ["tokio", "wayland", "applet"] } -sctk = { package = "smithay-client-toolkit", git = "https://github.com/Smithay/client-toolkit", rev = "69bffe5" } log = "0.4.14" -pretty_env_logger = "0.4.0" \ No newline at end of file +pretty_env_logger = "0.4.0" diff --git a/cosmic-applet-audio/src/main.rs b/cosmic-applet-audio/src/main.rs index 92adb27d..5df43572 100644 --- a/cosmic-applet-audio/src/main.rs +++ b/cosmic-applet-audio/src/main.rs @@ -1,4 +1,3 @@ -use cosmic::iced::wayland::SurfaceIdWrapper; use cosmic::iced::widget; use cosmic::iced_native::alignment::Horizontal; use cosmic::iced_native::layout::Limits; @@ -97,7 +96,7 @@ impl Application for Audio { self.theme } - fn close_requested(&self, _id: SurfaceIdWrapper) -> Self::Message { + fn close_requested(&self, _id: window::Id) -> Self::Message { Message::Ignore } @@ -268,134 +267,131 @@ impl Application for Audio { pulse::connect().map(Message::Pulse) } - fn view(&self, id: SurfaceIdWrapper) -> Element { - match id { - SurfaceIdWrapper::LayerSurface(_) => unimplemented!(), - SurfaceIdWrapper::Window(_) => self - .applet_helper + fn view(&self, id: window::Id) -> Element { + if id == window::Id::new(0) { + self.applet_helper .icon_button(&self.icon_name) .on_press(Message::TogglePopup) - .into(), - SurfaceIdWrapper::Popup(_) => { - let audio_disabled = matches!(self.pulse_state, PulseState::Disconnected(_)); - let out_f64 = VolumeLinear::from( - self.current_output - .as_ref() - .map(|o| o.volume.avg()) - .unwrap_or_default(), - ) - .0 * 100.0; - let in_f64 = VolumeLinear::from( - self.current_input - .as_ref() - .map(|o| o.volume.avg()) - .unwrap_or_default(), - ) - .0 * 100.0; + .into() + } else { + let audio_disabled = matches!(self.pulse_state, PulseState::Disconnected(_)); + let out_f64 = VolumeLinear::from( + self.current_output + .as_ref() + .map(|o| o.volume.avg()) + .unwrap_or_default(), + ) + .0 * 100.0; + let in_f64 = VolumeLinear::from( + self.current_input + .as_ref() + .map(|o| o.volume.avg()) + .unwrap_or_default(), + ) + .0 * 100.0; - let audio_content = if audio_disabled { - column![text("PulseAudio Disconnected") - .width(Length::Fill) - .horizontal_alignment(Horizontal::Center) - .size(24),] - } else { - column![ - row![ - icon("audio-volume-high-symbolic", 32) - .width(Length::Units(24)) - .height(Length::Units(24)) - .style(Svg::Symbolic), - slider(0.0..=100.0, out_f64, Message::SetOutputVolume) - .width(Length::FillPortion(5)), - text(format!("{}%", out_f64.round())) - .width(Length::FillPortion(1)) - .horizontal_alignment(Horizontal::Right) - ] - .spacing(12) - .align_items(Alignment::Center) - .padding([8, 24]), - row![ - icon("audio-input-microphone-symbolic", 32) - .width(Length::Units(24)) - .height(Length::Units(24)) - .style(Svg::Symbolic), - slider(0.0..=100.0, in_f64, Message::SetInputVolume) - .width(Length::FillPortion(5)), - text(format!("{}%", in_f64.round())) - .width(Length::FillPortion(1)) - .horizontal_alignment(Horizontal::Right) - ] - .spacing(12) - .align_items(Alignment::Center) - .padding([8, 24]), - container(divider::horizontal::light()) - .padding([12, 24]) - .width(Length::Fill), - revealer( - self.is_open == IsOpen::Output, - "Output", - match &self.current_output { - Some(output) => pretty_name(output.description.clone()), - None => String::from("No device selected"), - }, - self.outputs - .clone() - .into_iter() - .map(|output| ( - output.name.clone().unwrap_or_default(), - pretty_name(output.description) - )) - .collect(), - Message::OutputToggle, - Message::OutputChanged, - ), - revealer( - self.is_open == IsOpen::Input, - "Input", - match &self.current_input { - Some(input) => pretty_name(input.description.clone()), - None => String::from("No device selected"), - }, - self.inputs - .clone() - .into_iter() - .map(|input| ( - input.name.clone().unwrap_or_default(), - pretty_name(input.description) - )) - .collect(), - Message::InputToggle, - Message::InputChanged, - ) + let audio_content = if audio_disabled { + column![text("PulseAudio Disconnected") + .width(Length::Fill) + .horizontal_alignment(Horizontal::Center) + .size(24),] + } else { + column![ + row![ + icon("audio-volume-high-symbolic", 32) + .width(Length::Units(24)) + .height(Length::Units(24)) + .style(Svg::Symbolic), + slider(0.0..=100.0, out_f64, Message::SetOutputVolume) + .width(Length::FillPortion(5)), + text(format!("{}%", out_f64.round())) + .width(Length::FillPortion(1)) + .horizontal_alignment(Horizontal::Right) ] - .align_items(Alignment::Start) - }; - let content = column![ - audio_content, + .spacing(12) + .align_items(Alignment::Center) + .padding([8, 24]), + row![ + icon("audio-input-microphone-symbolic", 32) + .width(Length::Units(24)) + .height(Length::Units(24)) + .style(Svg::Symbolic), + slider(0.0..=100.0, in_f64, Message::SetInputVolume) + .width(Length::FillPortion(5)), + text(format!("{}%", in_f64.round())) + .width(Length::FillPortion(1)) + .horizontal_alignment(Horizontal::Right) + ] + .spacing(12) + .align_items(Alignment::Center) + .padding([8, 24]), container(divider::horizontal::light()) .padding([12, 24]) .width(Length::Fill), - container(toggler( - Some("Show Media Controls on Top Panel".into()), - self.show_media_controls_in_top_panel, - Message::ToggleMediaControlsInTopPanel, - )) - .padding([0, 24]), - container(divider::horizontal::light()) - .padding([12, 24]) - .width(Length::Fill), - button(APPLET_BUTTON_THEME) - .text("Sound Settings...") - .padding([8, 24]) - .width(Length::Fill) + revealer( + self.is_open == IsOpen::Output, + "Output", + match &self.current_output { + Some(output) => pretty_name(output.description.clone()), + None => String::from("No device selected"), + }, + self.outputs + .clone() + .into_iter() + .map(|output| ( + output.name.clone().unwrap_or_default(), + pretty_name(output.description) + )) + .collect(), + Message::OutputToggle, + Message::OutputChanged, + ), + revealer( + self.is_open == IsOpen::Input, + "Input", + match &self.current_input { + Some(input) => pretty_name(input.description.clone()), + None => String::from("No device selected"), + }, + self.inputs + .clone() + .into_iter() + .map(|input| ( + input.name.clone().unwrap_or_default(), + pretty_name(input.description) + )) + .collect(), + Message::InputToggle, + Message::InputChanged, + ) ] .align_items(Alignment::Start) - .padding([8, 0]); + }; + let content = column![ + audio_content, + container(divider::horizontal::light()) + .padding([12, 24]) + .width(Length::Fill), + container(toggler( + Some("Show Media Controls on Top Panel".into()), + self.show_media_controls_in_top_panel, + Message::ToggleMediaControlsInTopPanel, + )) + .padding([0, 24]), + container(divider::horizontal::light()) + .padding([12, 24]) + .width(Length::Fill), + button(APPLET_BUTTON_THEME) + .text("Sound Settings...") + .padding([8, 24]) + .width(Length::Fill) + ] + .align_items(Alignment::Start) + .padding([8, 0]); - self.applet_helper - .popup_container(container(content)) - .into() - } + self.applet_helper + .popup_container(container(content)) + .into() } } } diff --git a/cosmic-applet-battery/Cargo.toml b/cosmic-applet-battery/Cargo.toml index f25db072..0b43d454 100644 --- a/cosmic-applet-battery/Cargo.toml +++ b/cosmic-applet-battery/Cargo.toml @@ -6,7 +6,6 @@ edition = "2021" [dependencies] once_cell = "1.16.0" libcosmic = { git = "https://github.com/pop-os/libcosmic/", branch = "master", default-features = false, features = ["tokio", "wayland", "applet"] } -sctk = { package = "smithay-client-toolkit", git = "https://github.com/Smithay/client-toolkit", rev = "69bffe5" } futures = "0.3" zbus = { version = "3.5", default-features = false, features = ["tokio"] } log = "0.4" diff --git a/cosmic-applet-battery/src/app.rs b/cosmic-applet-battery/src/app.rs index 7412f837..10870744 100644 --- a/cosmic-applet-battery/src/app.rs +++ b/cosmic-applet-battery/src/app.rs @@ -13,7 +13,6 @@ use crate::upower_kbdbacklight::{ use cosmic::applet::{CosmicAppletHelper, APPLET_BUTTON_THEME}; use cosmic::iced::alignment::Horizontal; use cosmic::iced::wayland::popup::{destroy_popup, get_popup}; -use cosmic::iced::wayland::SurfaceIdWrapper; use cosmic::iced::{ widget::{column, container, row, slider, text}, window, Alignment, Application, Command, Length, Subscription, @@ -213,163 +212,158 @@ impl Application for CosmicBatteryApplet { } Command::none() } - fn view(&self, id: SurfaceIdWrapper) -> Element { - match id { - SurfaceIdWrapper::LayerSurface(_) => unimplemented!(), - SurfaceIdWrapper::Window(_) => self - .applet_helper + fn view(&self, id: window::Id) -> Element { + if id == window::Id::new(0) { + self.applet_helper .icon_button(&self.icon_name) .on_press(Message::TogglePopup) - .into(), - SurfaceIdWrapper::Popup(_) => { - let name = text(fl!("battery")).size(18); - let description = text( - if "battery-full-charging-symbolic" == self.icon_name - || "battery-full-charged-symbolic" == self.icon_name - { - format!("{}%", self.battery_percent) - } else { - format!( - "{} {} ({:.0}%)", - format_duration(self.time_remaining), - fl!("until-empty"), - self.battery_percent - ) - }, - ) - .size(12); - self.applet_helper - .popup_container( - column![ - row![ - icon(&*self.icon_name, 24) - .style(Svg::Symbolic) - .width(Length::Units(24)) - .height(Length::Units(24)), - column![name, description] - ] - .padding([0, 24]) - .spacing(8) - .align_items(Alignment::Center), - container(divider::horizontal::light()) - .width(Length::Fill) - .padding([0, 12]), - button(APPLET_BUTTON_THEME) - .custom(vec![row![ - column![ - text(fl!("battery")).size(14), - text(fl!("battery-desc")).size(12) - ] - .width(Length::Fill), - icon("emblem-ok-symbolic", 12).size(12).style( - match self.power_profile { - Power::Battery => Svg::SymbolicActive, - _ => Svg::Default, - } - ), - ] - .align_items(Alignment::Center) - .into()]) - .padding([8, 24]) - .on_press(Message::SelectProfile(Power::Battery)) - .width(Length::Fill), - button(APPLET_BUTTON_THEME) - .custom(vec![row![ - column![ - text(fl!("balanced")).size(14), - text(fl!("balanced-desc")).size(12) - ] - .width(Length::Fill), - icon("emblem-ok-symbolic", 12).size(12).style( - match self.power_profile { - Power::Balanced => Svg::SymbolicActive, - _ => Svg::Default, - } - ), - ] - .align_items(Alignment::Center) - .into()]) - .padding([8, 24]) - .on_press(Message::SelectProfile(Power::Balanced)) - .width(Length::Fill), - button(APPLET_BUTTON_THEME) - .custom(vec![row![ - column![ - text(fl!("performance")).size(14), - text(fl!("performance-desc")).size(12) - ] - .width(Length::Fill), - icon("emblem-ok-symbolic", 12).size(12).style( - match self.power_profile { - Power::Performance => Svg::SymbolicActive, - _ => Svg::Default, - } - ), - ] - .align_items(Alignment::Center) - .into()]) - .padding([8, 24]) - .on_press(Message::SelectProfile(Power::Performance)) - .width(Length::Fill), - container(divider::horizontal::light()) - .width(Length::Fill) - .padding([0, 12]), - container(toggler(fl!("max-charge"), self.charging_limit, |_| { - Message::SetChargingLimit(!self.charging_limit) - })) - .padding([0, 24]) - .width(Length::Fill), - container(divider::horizontal::light()) - .width(Length::Fill) - .padding([0, 12]), - row![ - icon("display-brightness-symbolic", 24) - .style(Svg::Symbolic) - .width(Length::Units(24)) - .height(Length::Units(24)), - slider( - 1..=100, - (self.screen_brightness * 100.0) as i32, - Message::SetScreenBrightness - ), - text(format!("{:.0}%", self.screen_brightness * 100.0)) - .width(Length::Units(40)) - .horizontal_alignment(Horizontal::Right) - ] - .padding([0, 24]) - .spacing(12), - row![ - icon("keyboard-brightness-symbolic", 24) - .style(Svg::Symbolic) - .width(Length::Units(24)) - .height(Length::Units(24)), - slider( - 0..=100, - (self.kbd_brightness * 100.0) as i32, - Message::SetKbdBrightness - ), - text(format!("{:.0}%", self.kbd_brightness * 100.0)) - .width(Length::Units(40)) - .horizontal_alignment(Horizontal::Right) - ] - .padding([0, 24]) - .spacing(12), - container(divider::horizontal::light()) - .width(Length::Fill) - .padding([0, 12]), - button(APPLET_BUTTON_THEME) - .custom(vec![text(fl!("power-settings")) - .width(Length::Fill) - .into()]) - .on_press(Message::OpenBatterySettings) - .width(Length::Fill) - .padding([8, 24]) - ] - .spacing(8) - .padding([8, 0]), + .into() + } else { + let name = text(fl!("battery")).size(18); + let description = text( + if "battery-full-charging-symbolic" == self.icon_name + || "battery-full-charged-symbolic" == self.icon_name + { + format!("{}%", self.battery_percent) + } else { + format!( + "{} {} ({:.0}%)", + format_duration(self.time_remaining), + fl!("until-empty"), + self.battery_percent ) - .into() - } + }, + ) + .size(12); + self.applet_helper + .popup_container( + column![ + row![ + icon(&*self.icon_name, 24) + .style(Svg::Symbolic) + .width(Length::Units(24)) + .height(Length::Units(24)), + column![name, description] + ] + .padding([0, 24]) + .spacing(8) + .align_items(Alignment::Center), + container(divider::horizontal::light()) + .width(Length::Fill) + .padding([0, 12]), + button(APPLET_BUTTON_THEME) + .custom(vec![row![ + column![ + text(fl!("battery")).size(14), + text(fl!("battery-desc")).size(12) + ] + .width(Length::Fill), + icon("emblem-ok-symbolic", 12).size(12).style( + match self.power_profile { + Power::Battery => Svg::SymbolicActive, + _ => Svg::Default, + } + ), + ] + .align_items(Alignment::Center) + .into()]) + .padding([8, 24]) + .on_press(Message::SelectProfile(Power::Battery)) + .width(Length::Fill), + button(APPLET_BUTTON_THEME) + .custom(vec![row![ + column![ + text(fl!("balanced")).size(14), + text(fl!("balanced-desc")).size(12) + ] + .width(Length::Fill), + icon("emblem-ok-symbolic", 12).size(12).style( + match self.power_profile { + Power::Balanced => Svg::SymbolicActive, + _ => Svg::Default, + } + ), + ] + .align_items(Alignment::Center) + .into()]) + .padding([8, 24]) + .on_press(Message::SelectProfile(Power::Balanced)) + .width(Length::Fill), + button(APPLET_BUTTON_THEME) + .custom(vec![row![ + column![ + text(fl!("performance")).size(14), + text(fl!("performance-desc")).size(12) + ] + .width(Length::Fill), + icon("emblem-ok-symbolic", 12).size(12).style( + match self.power_profile { + Power::Performance => Svg::SymbolicActive, + _ => Svg::Default, + } + ), + ] + .align_items(Alignment::Center) + .into()]) + .padding([8, 24]) + .on_press(Message::SelectProfile(Power::Performance)) + .width(Length::Fill), + container(divider::horizontal::light()) + .width(Length::Fill) + .padding([0, 12]), + container(toggler(fl!("max-charge"), self.charging_limit, |_| { + Message::SetChargingLimit(!self.charging_limit) + })) + .padding([0, 24]) + .width(Length::Fill), + container(divider::horizontal::light()) + .width(Length::Fill) + .padding([0, 12]), + row![ + icon("display-brightness-symbolic", 24) + .style(Svg::Symbolic) + .width(Length::Units(24)) + .height(Length::Units(24)), + slider( + 1..=100, + (self.screen_brightness * 100.0) as i32, + Message::SetScreenBrightness + ), + text(format!("{:.0}%", self.screen_brightness * 100.0)) + .width(Length::Units(40)) + .horizontal_alignment(Horizontal::Right) + ] + .padding([0, 24]) + .spacing(12), + row![ + icon("keyboard-brightness-symbolic", 24) + .style(Svg::Symbolic) + .width(Length::Units(24)) + .height(Length::Units(24)), + slider( + 0..=100, + (self.kbd_brightness * 100.0) as i32, + Message::SetKbdBrightness + ), + text(format!("{:.0}%", self.kbd_brightness * 100.0)) + .width(Length::Units(40)) + .horizontal_alignment(Horizontal::Right) + ] + .padding([0, 24]) + .spacing(12), + container(divider::horizontal::light()) + .width(Length::Fill) + .padding([0, 12]), + button(APPLET_BUTTON_THEME) + .custom(vec![text(fl!("power-settings")).width(Length::Fill).into()]) + .on_press(Message::OpenBatterySettings) + .width(Length::Fill) + .padding([8, 24]) + ] + .spacing(8) + .padding([8, 0]), + ) + .into() } } @@ -406,7 +400,7 @@ impl Application for CosmicBatteryApplet { self.theme } - fn close_requested(&self, _id: SurfaceIdWrapper) -> Self::Message { + fn close_requested(&self, _id: window::Id) -> Message { Message::Ignore } diff --git a/cosmic-applet-bluetooth/Cargo.toml b/cosmic-applet-bluetooth/Cargo.toml index 45b0c210..b06dfc31 100644 --- a/cosmic-applet-bluetooth/Cargo.toml +++ b/cosmic-applet-bluetooth/Cargo.toml @@ -9,7 +9,6 @@ once_cell = "1.16.0" bluer = { version = "0.15", features = ["bluetoothd", "id"] } futures-util = "0.3.21" libcosmic = { git = "https://github.com/pop-os/libcosmic/", branch = "master", default-features = false, features = ["wayland", "applet", "tokio"] } -sctk = { package = "smithay-client-toolkit", git = "https://github.com/Smithay/client-toolkit", rev = "69bffe5" } futures = "0.3" log = "0.4" pretty_env_logger = "0.4" @@ -21,4 +20,4 @@ anyhow = "1.0" i18n-embed = { version = "0.13.4", features = ["fluent-system", "desktop-requester"] } i18n-embed-fl = "0.6.4" rust-embed = "6.3.0" -rand = "0.8" \ No newline at end of file +rand = "0.8" diff --git a/cosmic-applet-bluetooth/src/app.rs b/cosmic-applet-bluetooth/src/app.rs index 84c0d2e6..4a3e0ec3 100644 --- a/cosmic-applet-bluetooth/src/app.rs +++ b/cosmic-applet-bluetooth/src/app.rs @@ -6,7 +6,6 @@ use cosmic::{ iced::{ wayland::{ popup::{destroy_popup, get_popup}, - SurfaceIdWrapper, }, widget::{column, container, row, scrollable, text, Column}, Alignment, Application, Color, Command, Length, Subscription, @@ -275,7 +274,7 @@ impl Application for CosmicBluetoothApplet { } Command::none() } - fn view(&self, id: SurfaceIdWrapper) -> Element { + fn view(&self, id: window::Id) -> Element { let button_style = Button::Custom { active: |t| iced_style::button::Appearance { border_radius: BorderRadius::from(0.0), @@ -286,230 +285,228 @@ impl Application for CosmicBluetoothApplet { ..t.hovered(&Button::Text) }, }; - match id { - SurfaceIdWrapper::LayerSurface(_) => unimplemented!(), - SurfaceIdWrapper::Window(_) => self - .applet_helper + if id == window::Id::new(0) { + self.applet_helper .icon_button(&self.icon_name) .on_press(Message::TogglePopup) - .into(), - SurfaceIdWrapper::Popup(_) => { - let mut known_bluetooth = column![]; - for dev in self.bluer_state.devices.iter().filter(|d| { - !self - .request_confirmation - .as_ref() - .map_or(false, |(dev, _, _)| d.address == dev.address) - }) { - let mut row = row![ - icon(dev.icon.as_str(), 16).style(Svg::Symbolic), - text(dev.name.clone()) - .size(14) - .horizontal_alignment(Horizontal::Left) - .vertical_alignment(Vertical::Center) - .width(Length::Fill) - ] - .align_items(Alignment::Center) - .spacing(12); - - match &dev.status { - BluerDeviceStatus::Connected => { - row = row.push( - text(fl!("connected")) - .size(14) - .horizontal_alignment(Horizontal::Right) - .vertical_alignment(Vertical::Center), - ); - } - BluerDeviceStatus::Paired => {} - BluerDeviceStatus::Connecting | BluerDeviceStatus::Disconnecting => { - row = row.push( - icon("process-working-symbolic", 24) - .style(Svg::Symbolic) - .width(Length::Units(24)) - .height(Length::Units(24)), - ); - } - BluerDeviceStatus::Disconnected | BluerDeviceStatus::Pairing => continue, - }; - - known_bluetooth = known_bluetooth.push( - button(APPLET_BUTTON_THEME) - .custom(vec![row.into()]) - .style(APPLET_BUTTON_THEME) - .on_press(match dev.status { - BluerDeviceStatus::Connected => { - Message::Request(BluerRequest::DisconnectDevice(dev.address)) - } - BluerDeviceStatus::Disconnected => { - Message::Request(BluerRequest::PairDevice(dev.address)) - } - BluerDeviceStatus::Paired => { - Message::Request(BluerRequest::ConnectDevice(dev.address)) - } - BluerDeviceStatus::Connecting => { - Message::Request(BluerRequest::CancelConnect(dev.address)) - } - BluerDeviceStatus::Disconnecting => Message::Ignore, // Start connecting? - BluerDeviceStatus::Pairing => Message::Ignore, // Cancel pairing? - }) - .width(Length::Fill), - ); - } - - let mut content = column![ - column![ - toggler(fl!("bluetooth"), self.bluer_state.bluetooth_enabled, |m| { - Message::Request(BluerRequest::SetBluetoothEnabled(m)) - },) - .text_size(14) - .width(Length::Fill), - // these are not in the UX mockup, but they are useful imo - toggler(fl!("discoverable"), self.bluer_state.discoverable, |m| { - Message::Request(BluerRequest::SetDiscoverable(m)) - },) - .text_size(14) - .width(Length::Fill), - toggler(fl!("pairable"), self.bluer_state.pairable, |m| { - Message::Request(BluerRequest::SetPairable(m)) - },) - .text_size(14) - .width(Length::Fill) - ] - .spacing(8) - .padding([0, 12]), - divider::horizontal::light(), - known_bluetooth, - ] - .align_items(Alignment::Center) - .spacing(8) - .padding([8, 0]); - let dropdown_icon = if self.show_visible_devices { - "go-down-symbolic" - } else { - "go-next-symbolic" - }; - let available_connections_btn = button(Button::Secondary) - .custom( - vec![ - text(fl!("other-devices")) - .size(14) - .width(Length::Fill) - .height(Length::Units(24)) - .vertical_alignment(Vertical::Center) - .into(), - container( - icon(dropdown_icon, 14) - .style(Svg::Symbolic) - .width(Length::Units(14)) - .height(Length::Units(14)), - ) - .align_x(Horizontal::Center) - .align_y(Vertical::Center) - .width(Length::Units(24)) - .height(Length::Units(24)) - .into(), - ] - .into(), - ) - .padding([8, 24]) - .style(button_style.clone()) - .on_press(Message::ToggleVisibleDevices(!self.show_visible_devices)); - content = content.push(available_connections_btn); - let mut list_column: Vec> = - Vec::with_capacity(self.bluer_state.devices.len()); - - if let Some((device, pin, _)) = self.request_confirmation.as_ref() { - let row = column![ - icon(device.icon.as_str(), 16).style(Svg::Symbolic), - text(&device.name) - .horizontal_alignment(Horizontal::Left) - .vertical_alignment(Vertical::Center) - .width(Length::Fill), - text(fl!( - "confirm-pin", - HashMap::from_iter(vec![("deviceName", device.name.clone())]) - )) + .into() + } else { + let mut known_bluetooth = column![]; + for dev in self.bluer_state.devices.iter().filter(|d| { + !self + .request_confirmation + .as_ref() + .map_or(false, |(dev, _, _)| d.address == dev.address) + }) { + let mut row = row![ + icon(dev.icon.as_str(), 16).style(Svg::Symbolic), + text(dev.name.clone()) + .size(14) .horizontal_alignment(Horizontal::Left) .vertical_alignment(Vertical::Center) .width(Length::Fill) - .size(14), - text(pin) - .horizontal_alignment(Horizontal::Center) - .vertical_alignment(Vertical::Center) - .width(Length::Fill) - .size(32), - row![ - button(Button::Secondary) - .custom( - vec![text(fl!("cancel")) - .size(14) - .width(Length::Fill) - .height(Length::Units(24)) - .vertical_alignment(Vertical::Center) - .into(),] - .into(), - ) - .padding([8, 24]) - .style(button_style.clone()) - .on_press(Message::Cancel) - .width(Length::Fill), - button(Button::Secondary) - .custom( - vec![text(fl!("confirm")) - .size(14) - .width(Length::Fill) - .height(Length::Units(24)) - .vertical_alignment(Vertical::Center) - .into(),] - .into(), - ) - .padding([8, 24]) - .style(button_style.clone()) - .on_press(Message::Confirm) - .width(Length::Fill), - ] - ] - .padding([0, 24]) - .spacing(12); - list_column.push(row.into()); - } - let mut visible_devices_count = 0; - if self.show_visible_devices { - if self.bluer_state.bluetooth_enabled { - let mut visible_devices = column![]; - for dev in self.bluer_state.devices.iter().filter(|d| { - matches!( - d.status, - BluerDeviceStatus::Disconnected | BluerDeviceStatus::Pairing - ) && !self - .request_confirmation - .as_ref() - .map_or(false, |(dev, _, _)| d.address == dev.address) - }) { - let row = row![ - icon(dev.icon.as_str(), 16).style(Svg::Symbolic), - text(dev.name.clone()) - .horizontal_alignment(Horizontal::Left) - .size(14), - ] - .width(Length::Fill) - .align_items(Alignment::Center) - .spacing(12); - visible_devices = visible_devices.push( - button(APPLET_BUTTON_THEME) - .custom(vec![row.width(Length::Fill).into()]) - .on_press(Message::Request(BluerRequest::PairDevice( - dev.address.clone(), - ))) - .width(Length::Fill), - ); - visible_devices_count += 1; - } - list_column.push(visible_devices.into()); + ] + .align_items(Alignment::Center) + .spacing(12); + + match &dev.status { + BluerDeviceStatus::Connected => { + row = row.push( + text(fl!("connected")) + .size(14) + .horizontal_alignment(Horizontal::Right) + .vertical_alignment(Vertical::Center), + ); } + BluerDeviceStatus::Paired => {} + BluerDeviceStatus::Connecting | BluerDeviceStatus::Disconnecting => { + row = row.push( + icon("process-working-symbolic", 24) + .style(Svg::Symbolic) + .width(Length::Units(24)) + .height(Length::Units(24)), + ); + } + BluerDeviceStatus::Disconnected | BluerDeviceStatus::Pairing => continue, + }; + + known_bluetooth = known_bluetooth.push( + button(APPLET_BUTTON_THEME) + .custom(vec![row.into()]) + .style(APPLET_BUTTON_THEME) + .on_press(match dev.status { + BluerDeviceStatus::Connected => { + Message::Request(BluerRequest::DisconnectDevice(dev.address)) + } + BluerDeviceStatus::Disconnected => { + Message::Request(BluerRequest::PairDevice(dev.address)) + } + BluerDeviceStatus::Paired => { + Message::Request(BluerRequest::ConnectDevice(dev.address)) + } + BluerDeviceStatus::Connecting => { + Message::Request(BluerRequest::CancelConnect(dev.address)) + } + BluerDeviceStatus::Disconnecting => Message::Ignore, // Start connecting? + BluerDeviceStatus::Pairing => Message::Ignore, // Cancel pairing? + }) + .width(Length::Fill), + ); + } + + let mut content = column![ + column![ + toggler(fl!("bluetooth"), self.bluer_state.bluetooth_enabled, |m| { + Message::Request(BluerRequest::SetBluetoothEnabled(m)) + },) + .text_size(14) + .width(Length::Fill), + // these are not in the UX mockup, but they are useful imo + toggler(fl!("discoverable"), self.bluer_state.discoverable, |m| { + Message::Request(BluerRequest::SetDiscoverable(m)) + },) + .text_size(14) + .width(Length::Fill), + toggler(fl!("pairable"), self.bluer_state.pairable, |m| { + Message::Request(BluerRequest::SetPairable(m)) + },) + .text_size(14) + .width(Length::Fill) + ] + .spacing(8) + .padding([0, 12]), + divider::horizontal::light(), + known_bluetooth, + ] + .align_items(Alignment::Center) + .spacing(8) + .padding([8, 0]); + let dropdown_icon = if self.show_visible_devices { + "go-down-symbolic" + } else { + "go-next-symbolic" + }; + let available_connections_btn = button(Button::Secondary) + .custom( + vec![ + text(fl!("other-devices")) + .size(14) + .width(Length::Fill) + .height(Length::Units(24)) + .vertical_alignment(Vertical::Center) + .into(), + container( + icon(dropdown_icon, 14) + .style(Svg::Symbolic) + .width(Length::Units(14)) + .height(Length::Units(14)), + ) + .align_x(Horizontal::Center) + .align_y(Vertical::Center) + .width(Length::Units(24)) + .height(Length::Units(24)) + .into(), + ] + .into(), + ) + .padding([8, 24]) + .style(button_style.clone()) + .on_press(Message::ToggleVisibleDevices(!self.show_visible_devices)); + content = content.push(available_connections_btn); + let mut list_column: Vec> = + Vec::with_capacity(self.bluer_state.devices.len()); + + if let Some((device, pin, _)) = self.request_confirmation.as_ref() { + let row = column![ + icon(device.icon.as_str(), 16).style(Svg::Symbolic), + text(&device.name) + .horizontal_alignment(Horizontal::Left) + .vertical_alignment(Vertical::Center) + .width(Length::Fill), + text(fl!( + "confirm-pin", + HashMap::from_iter(vec![("deviceName", device.name.clone())]) + )) + .horizontal_alignment(Horizontal::Left) + .vertical_alignment(Vertical::Center) + .width(Length::Fill) + .size(14), + text(pin) + .horizontal_alignment(Horizontal::Center) + .vertical_alignment(Vertical::Center) + .width(Length::Fill) + .size(32), + row![ + button(Button::Secondary) + .custom( + vec![text(fl!("cancel")) + .size(14) + .width(Length::Fill) + .height(Length::Units(24)) + .vertical_alignment(Vertical::Center) + .into(),] + .into(), + ) + .padding([8, 24]) + .style(button_style.clone()) + .on_press(Message::Cancel) + .width(Length::Fill), + button(Button::Secondary) + .custom( + vec![text(fl!("confirm")) + .size(14) + .width(Length::Fill) + .height(Length::Units(24)) + .vertical_alignment(Vertical::Center) + .into(),] + .into(), + ) + .padding([8, 24]) + .style(button_style.clone()) + .on_press(Message::Confirm) + .width(Length::Fill), + ] + ] + .padding([0, 24]) + .spacing(12); + list_column.push(row.into()); + } + let mut visible_devices_count = 0; + if self.show_visible_devices { + if self.bluer_state.bluetooth_enabled { + let mut visible_devices = column![]; + for dev in self.bluer_state.devices.iter().filter(|d| { + matches!( + d.status, + BluerDeviceStatus::Disconnected | BluerDeviceStatus::Pairing + ) && !self + .request_confirmation + .as_ref() + .map_or(false, |(dev, _, _)| d.address == dev.address) + }) { + let row = row![ + icon(dev.icon.as_str(), 16).style(Svg::Symbolic), + text(dev.name.clone()) + .horizontal_alignment(Horizontal::Left) + .size(14), + ] + .width(Length::Fill) + .align_items(Alignment::Center) + .spacing(12); + visible_devices = visible_devices.push( + button(APPLET_BUTTON_THEME) + .custom(vec![row.width(Length::Fill).into()]) + .on_press(Message::Request(BluerRequest::PairDevice( + dev.address.clone(), + ))) + .width(Length::Fill), + ); + visible_devices_count += 1; + } + list_column.push(visible_devices.into()); } - let item_counter = visible_devices_count + } + let item_counter = visible_devices_count // request confirmation is pretty big + if self.request_confirmation.is_some() { 5 @@ -517,15 +514,14 @@ impl Application for CosmicBluetoothApplet { 0 }; - if item_counter > 10 { - content = content.push( - scrollable(Column::with_children(list_column)).height(Length::Units(300)), - ); - } else { - content = content.push(Column::with_children(list_column)); - } - self.applet_helper.popup_container(content).into() + if item_counter > 10 { + content = content.push( + scrollable(Column::with_children(list_column)).height(Length::Units(300)), + ); + } else { + content = content.push(Column::with_children(list_column)); } + self.applet_helper.popup_container(content).into() } } @@ -537,7 +533,7 @@ impl Application for CosmicBluetoothApplet { self.theme } - fn close_requested(&self, _id: SurfaceIdWrapper) -> Self::Message { + fn close_requested(&self, _id: window::Id) -> Self::Message { Message::Ignore } diff --git a/cosmic-applet-graphics/Cargo.toml b/cosmic-applet-graphics/Cargo.toml index 3f071699..9cbc385e 100644 --- a/cosmic-applet-graphics/Cargo.toml +++ b/cosmic-applet-graphics/Cargo.toml @@ -8,7 +8,6 @@ edition = "2021" [dependencies] zbus = "3.4" libcosmic = { git = "https://github.com/pop-os/libcosmic/", branch = "master", default-features = false, features = ["tokio", "wayland", "applet"] } -sctk = { package = "smithay-client-toolkit", git = "https://github.com/Smithay/client-toolkit", rev = "69bffe5" } once_cell = "1" # Application i18n i18n-embed = { version = "0.13.4", features = ["fluent-system", "desktop-requester"] } diff --git a/cosmic-applet-graphics/src/window.rs b/cosmic-applet-graphics/src/window.rs index 918bb909..3ff43c14 100644 --- a/cosmic-applet-graphics/src/window.rs +++ b/cosmic-applet-graphics/src/window.rs @@ -3,7 +3,6 @@ use crate::fl; use crate::graphics::{get_current_graphics, set_graphics, Graphics}; use cosmic::applet::CosmicAppletHelper; use cosmic::iced::wayland::popup::{destroy_popup, get_popup}; -use cosmic::iced::wayland::SurfaceIdWrapper; use cosmic::iced_native::alignment::Horizontal; use cosmic::iced_native::Alignment; use cosmic::iced_style::application::{self, Appearance}; @@ -121,7 +120,7 @@ impl Application for Window { Message::CurrentGraphics(match cur_graphics { Ok(g) => Some(g), Err(err) => { - dbg!(err); + eprintln!("{err}"); None } }) @@ -184,10 +183,9 @@ impl Application for Window { Command::none() } - fn view(&self, id: SurfaceIdWrapper) -> Element { - match id { - SurfaceIdWrapper::LayerSurface(_) => unimplemented!(), - SurfaceIdWrapper::Window(_) => match self.applet_helper.anchor { + fn view(&self, id: window::Id) -> Element { + if id == window::Id::new(0) { + match self.applet_helper.anchor { PanelAnchor::Left | PanelAnchor::Right => self .applet_helper .icon_button("input-gaming-symbolic") @@ -219,187 +217,185 @@ impl Application for Window { .width(Length::Shrink) .height(Length::Shrink) .into(), - }, - SurfaceIdWrapper::Popup(_) => { - let content_list = vec![ - button(APPLET_BUTTON_THEME) - .custom(vec![row![ - column![ - text(format!("{} {}", fl!("integrated"), fl!("graphics"))).size(14), - text(fl!("integrated-desc")).size(12) - ] - .width(Length::Fill), - icon( - match self.graphics_mode { - Some(GraphicsMode::SelectedGraphicsMode { - new: Graphics::Integrated, - .. - }) => "process-working-symbolic", - _ => "emblem-ok-symbolic", - }, - 12 - ) - .size(12) - .style(match self.graphics_mode { - Some(GraphicsMode::CurrentGraphicsMode(Graphics::Integrated)) => - Svg::SymbolicActive, - Some(GraphicsMode::AppliedGraphicsMode(Graphics::Integrated)) => - Svg::SymbolicActive, + } + } else { + let content_list = vec![ + button(APPLET_BUTTON_THEME) + .custom(vec![row![ + column![ + text(format!("{} {}", fl!("integrated"), fl!("graphics"))).size(14), + text(fl!("integrated-desc")).size(12) + ] + .width(Length::Fill), + icon( + match self.graphics_mode { Some(GraphicsMode::SelectedGraphicsMode { new: Graphics::Integrated, .. - }) => Svg::Symbolic, - _ => Svg::Default, - },), - ] - .align_items(Alignment::Center) - .into()]) - .padding([8, 24]) - .on_press(Message::SelectGraphicsMode(Graphics::Integrated)) - .width(Length::Fill) - .into(), - button(APPLET_BUTTON_THEME) - .custom(vec![row![ - column![ - text(format!("{} {}", fl!("nvidia"), fl!("graphics"))).size(14), - ] + }) => "process-working-symbolic", + _ => "emblem-ok-symbolic", + }, + 12 + ) + .size(12) + .style(match self.graphics_mode { + Some(GraphicsMode::CurrentGraphicsMode(Graphics::Integrated)) => + Svg::SymbolicActive, + Some(GraphicsMode::AppliedGraphicsMode(Graphics::Integrated)) => + Svg::SymbolicActive, + Some(GraphicsMode::SelectedGraphicsMode { + new: Graphics::Integrated, + .. + }) => Svg::Symbolic, + _ => Svg::Default, + },), + ] + .align_items(Alignment::Center) + .into()]) + .padding([8, 24]) + .on_press(Message::SelectGraphicsMode(Graphics::Integrated)) + .width(Length::Fill) + .into(), + button(APPLET_BUTTON_THEME) + .custom(vec![row![ + column![text(format!("{} {}", fl!("nvidia"), fl!("graphics"))).size(14),] .width(Length::Fill), - icon( - match self.graphics_mode { - Some(GraphicsMode::SelectedGraphicsMode { - new: Graphics::Nvidia, - .. - }) => "process-working-symbolic", - _ => "emblem-ok-symbolic", - }, - 12 - ) - .size(12) - .style(match self.graphics_mode { - Some(GraphicsMode::CurrentGraphicsMode(Graphics::Nvidia)) => - Svg::SymbolicActive, - Some(GraphicsMode::AppliedGraphicsMode(Graphics::Nvidia)) => - Svg::SymbolicActive, + icon( + match self.graphics_mode { Some(GraphicsMode::SelectedGraphicsMode { new: Graphics::Nvidia, .. - }) => Svg::Symbolic, - _ => Svg::Default, - }), + }) => "process-working-symbolic", + _ => "emblem-ok-symbolic", + }, + 12 + ) + .size(12) + .style(match self.graphics_mode { + Some(GraphicsMode::CurrentGraphicsMode(Graphics::Nvidia)) => + Svg::SymbolicActive, + Some(GraphicsMode::AppliedGraphicsMode(Graphics::Nvidia)) => + Svg::SymbolicActive, + Some(GraphicsMode::SelectedGraphicsMode { + new: Graphics::Nvidia, + .. + }) => Svg::Symbolic, + _ => Svg::Default, + }), + ] + .align_items(Alignment::Center) + .into()]) + .padding([8, 24]) + .on_press(Message::SelectGraphicsMode(Graphics::Nvidia)) + .width(Length::Fill) + .into(), + button(APPLET_BUTTON_THEME) + .custom(vec![row![ + column![ + text(format!("{} {}", fl!("hybrid"), fl!("graphics"))).size(14), + text(fl!("hybrid-desc")).size(12) ] - .align_items(Alignment::Center) - .into()]) - .padding([8, 24]) - .on_press(Message::SelectGraphicsMode(Graphics::Nvidia)) - .width(Length::Fill) - .into(), - button(APPLET_BUTTON_THEME) - .custom(vec![row![ - column![ - text(format!("{} {}", fl!("hybrid"), fl!("graphics"))).size(14), - text(fl!("hybrid-desc")).size(12) - ] - .width(Length::Fill), - icon( - match self.graphics_mode { - Some(GraphicsMode::SelectedGraphicsMode { - new: Graphics::Hybrid, - .. - }) => "process-working-symbolic", - _ => "emblem-ok-symbolic", - }, - 12 - ) - .size(12) - .style(match self.graphics_mode { - Some(GraphicsMode::CurrentGraphicsMode(Graphics::Hybrid)) => - Svg::SymbolicActive, - Some(GraphicsMode::AppliedGraphicsMode(Graphics::Hybrid)) => - Svg::SymbolicActive, + .width(Length::Fill), + icon( + match self.graphics_mode { Some(GraphicsMode::SelectedGraphicsMode { new: Graphics::Hybrid, .. - }) => Svg::Symbolic, - _ => Svg::Default, - }) + }) => "process-working-symbolic", + _ => "emblem-ok-symbolic", + }, + 12 + ) + .size(12) + .style(match self.graphics_mode { + Some(GraphicsMode::CurrentGraphicsMode(Graphics::Hybrid)) => + Svg::SymbolicActive, + Some(GraphicsMode::AppliedGraphicsMode(Graphics::Hybrid)) => + Svg::SymbolicActive, + Some(GraphicsMode::SelectedGraphicsMode { + new: Graphics::Hybrid, + .. + }) => Svg::Symbolic, + _ => Svg::Default, + }) + ] + .align_items(Alignment::Center) + .into()]) + .padding([8, 24]) + .on_press(Message::SelectGraphicsMode(Graphics::Hybrid)) + .width(Length::Fill) + .into(), + button(APPLET_BUTTON_THEME) + .custom(vec![row![ + column![ + text(format!("{} {}", fl!("compute"), fl!("graphics"))).size(14), + text(fl!("compute-desc")).size(12) ] - .align_items(Alignment::Center) - .into()]) - .padding([8, 24]) - .on_press(Message::SelectGraphicsMode(Graphics::Hybrid)) - .width(Length::Fill) - .into(), - button(APPLET_BUTTON_THEME) - .custom(vec![row![ - column![ - text(format!("{} {}", fl!("compute"), fl!("graphics"))).size(14), - text(fl!("compute-desc")).size(12) - ] - .width(Length::Fill), - icon( - match self.graphics_mode { - Some(GraphicsMode::SelectedGraphicsMode { - new: Graphics::Compute, - .. - }) => "process-working-symbolic", - _ => "emblem-ok-symbolic", - }, - 12 - ) - .size(12) - .style(match self.graphics_mode { - Some(GraphicsMode::CurrentGraphicsMode(Graphics::Compute)) => - Svg::SymbolicActive, - Some(GraphicsMode::AppliedGraphicsMode(Graphics::Compute)) => - Svg::SymbolicActive, + .width(Length::Fill), + icon( + match self.graphics_mode { Some(GraphicsMode::SelectedGraphicsMode { new: Graphics::Compute, .. - }) => Svg::Symbolic, - _ => Svg::Default, - }), - ] - .align_items(Alignment::Center) - .into()]) - .padding([8, 24]) - .on_press(Message::SelectGraphicsMode(Graphics::Compute)) - .width(Length::Fill) - .into(), - ]; + }) => "process-working-symbolic", + _ => "emblem-ok-symbolic", + }, + 12 + ) + .size(12) + .style(match self.graphics_mode { + Some(GraphicsMode::CurrentGraphicsMode(Graphics::Compute)) => + Svg::SymbolicActive, + Some(GraphicsMode::AppliedGraphicsMode(Graphics::Compute)) => + Svg::SymbolicActive, + Some(GraphicsMode::SelectedGraphicsMode { + new: Graphics::Compute, + .. + }) => Svg::Symbolic, + _ => Svg::Default, + }), + ] + .align_items(Alignment::Center) + .into()]) + .padding([8, 24]) + .on_press(Message::SelectGraphicsMode(Graphics::Compute)) + .width(Length::Fill) + .into(), + ]; - self.applet_helper - .popup_container( - column(vec![ - text(fl!("graphics-mode")) - .width(Length::Fill) - .horizontal_alignment(Horizontal::Center) - .size(24) - .into(), - container(divider::horizontal::light()) - .padding([0, 12]) - .width(Length::Fill) - .into(), - column(content_list).into(), - ]) - .padding([8, 0]) - .spacing(12), - ) - .into() - } + self.applet_helper + .popup_container( + column(vec![ + text(fl!("graphics-mode")) + .width(Length::Fill) + .horizontal_alignment(Horizontal::Center) + .size(24) + .into(), + container(divider::horizontal::light()) + .padding([0, 12]) + .width(Length::Fill) + .into(), + column(content_list).into(), + ]) + .padding([8, 0]) + .spacing(12), + ) + .into() } } - fn close_requested(&self, id: SurfaceIdWrapper) -> Self::Message { - match id { - SurfaceIdWrapper::LayerSurface(_) | SurfaceIdWrapper::Window(_) => unimplemented!(), - SurfaceIdWrapper::Popup(id) => Message::PopupClosed(id), + fn close_requested(&self, id: window::Id) -> Self::Message { + if id != window::Id::new(0) { + Message::PopupClosed(id) + } else { + unimplemented!(); } } fn style(&self) -> ::Style { ::Style::Custom(|theme| Appearance { background_color: Color::from_rgba(0.0, 0.0, 0.0, 0.0), - text_color: theme.cosmic().on_bg_color().into(), + text_color: theme.cosmic().background.on.into(), }) } diff --git a/cosmic-applet-network/Cargo.toml b/cosmic-applet-network/Cargo.toml index 7a28468f..93d23c53 100644 --- a/cosmic-applet-network/Cargo.toml +++ b/cosmic-applet-network/Cargo.toml @@ -10,7 +10,6 @@ cosmic-dbus-networkmanager = { git = "https://github.com/pop-os/dbus-settings-bi # cosmic-dbus-networkmanager = { path = "../../../dbus-settings-bindings/networkmanager" } futures-util = "0.3.21" libcosmic = { git = "https://github.com/pop-os/libcosmic/", branch = "master", default-features = false, features = ["wayland", "applet", "tokio"] } -sctk = { package = "smithay-client-toolkit", git = "https://github.com/Smithay/client-toolkit", rev = "69bffe5" } futures = "0.3" zbus = { version = "3.7", default-features = false } log = "0.4" diff --git a/cosmic-applet-network/src/app.rs b/cosmic-applet-network/src/app.rs index 785b118c..8dc02d41 100644 --- a/cosmic-applet-network/src/app.rs +++ b/cosmic-applet-network/src/app.rs @@ -2,10 +2,7 @@ use cosmic::iced_style; use cosmic::{ applet::CosmicAppletHelper, iced::{ - wayland::{ - popup::{destroy_popup, get_popup}, - SurfaceIdWrapper, - }, + wayland::popup::{destroy_popup, get_popup}, widget::{column, container, row, scrollable, text, text_input, Column}, Alignment, Application, Color, Command, Length, Subscription, }, @@ -34,7 +31,8 @@ use crate::{ pub fn run() -> cosmic::iced::Result { let helper = CosmicAppletHelper::default(); - CosmicNetworkApplet::run(helper.window_settings()) + let settings = helper.window_settings(); + CosmicNetworkApplet::run(settings) } #[derive(Debug)] @@ -338,7 +336,7 @@ impl Application for CosmicNetworkApplet { } Command::none() } - fn view(&self, id: SurfaceIdWrapper) -> Element { + fn view(&self, id: window::Id) -> Element { let button_style = Button::Custom { active: |t| iced_style::button::Appearance { border_radius: BorderRadius::from(0.0), @@ -349,349 +347,344 @@ impl Application for CosmicNetworkApplet { ..t.hovered(&Button::Text) }, }; - match id { - SurfaceIdWrapper::LayerSurface(_) => unimplemented!(), - SurfaceIdWrapper::Window(_) => self - .applet_helper + if id == window::Id::new(0) { + self.applet_helper .icon_button(&self.icon_name) .on_press(Message::TogglePopup) - .into(), - SurfaceIdWrapper::Popup(_) => { - let mut vpn_ethernet_col = column![]; - let mut known_wifi = column![]; - for conn in &self.nm_state.active_conns { - match conn { - ActiveConnectionInfo::Vpn { name, ip_addresses } => { - let mut ipv4 = Vec::with_capacity(ip_addresses.len()); - for addr in ip_addresses { - ipv4.push( - text(format!("{}: {}", fl!("ipv4"), addr.to_string())) - .size(12) - .into(), - ); - } - vpn_ethernet_col = vpn_ethernet_col - .push(column![text(name), Column::with_children(ipv4)].spacing(4)); + .into() + } else { + let mut vpn_ethernet_col = column![]; + let mut known_wifi = column![]; + for conn in &self.nm_state.active_conns { + match conn { + ActiveConnectionInfo::Vpn { name, ip_addresses } => { + let mut ipv4 = Vec::with_capacity(ip_addresses.len()); + for addr in ip_addresses { + ipv4.push( + text(format!("{}: {}", fl!("ipv4"), addr.to_string())) + .size(12) + .into(), + ); } - ActiveConnectionInfo::Wired { - name, - hw_address: _, - speed, - ip_addresses, - } => { - let mut ipv4 = Vec::with_capacity(ip_addresses.len()); - for addr in ip_addresses { - ipv4.push( - text(format!("{}: {}", fl!("ipv4"), addr.to_string())) - .size(12) - .into(), - ); - } - vpn_ethernet_col = vpn_ethernet_col.push( - column![ - row![ - text(name), - text(format!("{speed} {}", fl!("megabits-per-second"))) - ] - .spacing(16), - Column::with_children(ipv4), + vpn_ethernet_col = vpn_ethernet_col + .push(column![text(name), Column::with_children(ipv4)].spacing(4)); + } + ActiveConnectionInfo::Wired { + name, + hw_address: _, + speed, + ip_addresses, + } => { + let mut ipv4 = Vec::with_capacity(ip_addresses.len()); + for addr in ip_addresses { + ipv4.push( + text(format!("{}: {}", fl!("ipv4"), addr.to_string())) + .size(12) + .into(), + ); + } + vpn_ethernet_col = vpn_ethernet_col.push( + column![ + row![ + text(name), + text(format!("{speed} {}", fl!("megabits-per-second"))) ] - .spacing(4), + .spacing(16), + Column::with_children(ipv4), + ] + .spacing(4), + ); + } + ActiveConnectionInfo::WiFi { + name, + ip_addresses, + state, + .. + } => { + let mut ipv4 = Vec::with_capacity(ip_addresses.len()); + for addr in ip_addresses { + ipv4.push( + text(format!("{}: {}", fl!("ipv4"), addr.to_string())) + .size(12) + .into(), ); } - ActiveConnectionInfo::WiFi { - name, - ip_addresses, - state, - .. - } => { - let mut ipv4 = Vec::with_capacity(ip_addresses.len()); - for addr in ip_addresses { - ipv4.push( - text(format!("{}: {}", fl!("ipv4"), addr.to_string())) - .size(12) - .into(), - ); - } - let mut btn_content = vec![ - icon("network-wireless-symbolic", 24) - .style(Svg::Symbolic) - .width(Length::Units(24)) - .height(Length::Units(24)) - .into(), - column![text(name).size(14), Column::with_children(ipv4)] - .width(Length::Fill) - .into(), - ]; - match state { - ActiveConnectionState::Activating - | ActiveConnectionState::Deactivating => { - btn_content.push( - icon("process-working-symbolic", 24) - .style(Svg::Symbolic) - .width(Length::Units(24)) - .height(Length::Units(24)) - .into(), - ); - } - ActiveConnectionState::Activated => btn_content.push( - text(format!("{}", fl!("connected"))) - .size(14) - .horizontal_alignment(Horizontal::Right) - .vertical_alignment(Vertical::Center) - .into(), - ), - _ => {} - }; - known_wifi = known_wifi.push( - column![button(Button::Secondary) - .custom(btn_content) - .padding([8, 24]) - .style(button_style.clone()) - .on_press(Message::Disconnect(name.clone()))] - .align_items(Alignment::Center), - ); - } - }; - } - for known in &self.nm_state.known_access_points { - let mut btn_content = vec![ - icon("network-wireless-symbolic", 24) - .style(Svg::Symbolic) - .width(Length::Units(24)) - .height(Length::Units(24)) - .into(), - text(&known.ssid).size(14).width(Length::Fill).into(), - ]; - - if known.working { - btn_content.push( - icon("process-working-symbolic", 24) + let mut btn_content = vec![ + icon("network-wireless-symbolic", 24) .style(Svg::Symbolic) .width(Length::Units(24)) .height(Length::Units(24)) .into(), - ); - } - - let mut btn = button(Button::Secondary) - .custom(btn_content) - .padding([8, 24]) - .width(Length::Fill) - .style(button_style.clone()); - btn = match known.state { - DeviceState::Failed - | DeviceState::Unknown - | DeviceState::Unmanaged - | DeviceState::Disconnected - | DeviceState::NeedAuth => { - btn.on_press(Message::ActivateKnownWifi(known.ssid.clone())) - } - DeviceState::Activated => { - btn.on_press(Message::Disconnect(known.ssid.clone())) - } - _ => btn, - }; - known_wifi = known_wifi.push(row![btn].align_items(Alignment::Center)); - } - - let mut content = column![ - vpn_ethernet_col, - container( - toggler(fl!("airplane-mode"), self.nm_state.airplane_mode, |m| { - Message::ToggleAirplaneMode(m) - }) - .width(Length::Fill) - ) - .padding([0, 12]), - divider::horizontal::light(), - container( - toggler(fl!("wifi"), self.nm_state.wifi_enabled, |m| { - Message::ToggleWiFi(m) - }) - .width(Length::Fill) - ) - .padding([0, 12]), - divider::horizontal::light(), - known_wifi, - ] - .align_items(Alignment::Center) - .spacing(8) - .padding([8, 0]); - let dropdown_icon = if self.show_visible_networks { - "go-down-symbolic" - } else { - "go-next-symbolic" - }; - let available_connections_btn = button(Button::Secondary) - .custom( - vec![ - text(fl!("visible-wireless-networks")) - .size(14) + column![text(name).size(14), Column::with_children(ipv4)] .width(Length::Fill) - .height(Length::Units(24)) - .vertical_alignment(Vertical::Center) .into(), - container( - icon(dropdown_icon, 14) - .style(Svg::Symbolic) - .width(Length::Units(14)) - .height(Length::Units(14)), - ) - .align_x(Horizontal::Center) - .align_y(Vertical::Center) - .width(Length::Units(24)) - .height(Length::Units(24)) - .into(), - ] - .into(), - ) - .padding([8, 24]) - .style(button_style.clone()) - .on_press(Message::ToggleVisibleNetworks); - content = content.push(available_connections_btn); - if self.show_visible_networks { - if let Some(new_conn_state) = self.new_connection.as_ref() { - match new_conn_state { - NewConnectionState::EnterPassword { - access_point, - password, - } => { - let id = row![ - icon("network-wireless-symbolic", 24) - .style(Svg::Symbolic) - .width(Length::Units(24)) - .height(Length::Units(24)), - text(&access_point.ssid).size(14), - ] - .align_items(Alignment::Center) - .width(Length::Fill) - .padding([0, 24]) - .spacing(12); - content = content.push(id); - let col = column![ - text(fl!("enter-password")), - text_input("", password, Message::Password) - .on_submit(Message::SubmitPassword) - .password(), - container(text(fl!("router-wps-button"))).padding(8), - row![ - button(Button::Secondary) - .custom(vec![container(text(fl!("cancel"))) - .padding([0, 24]) - .into()]) - .on_press(Message::CancelNewConnection), - button(Button::Secondary) - .custom(vec![container(text(fl!("connect"))) - .padding([0, 24]) - .into()]) - .on_press(Message::SubmitPassword) - ] - .spacing(24) - ] - .spacing(8) - .padding([0, 48]) - .align_items(Alignment::Center); - content = content.push(col); - } - NewConnectionState::Waiting(access_point) => { - let id = row![ - icon("network-wireless-symbolic", 24) - .style(Svg::Symbolic) - .width(Length::Units(24)) - .height(Length::Units(24)), - text(&access_point.ssid).size(14), - ] - .align_items(Alignment::Center) - .width(Length::Fill) - .spacing(12); - let connecting = row![ - id, + ]; + match state { + ActiveConnectionState::Activating + | ActiveConnectionState::Deactivating => { + btn_content.push( icon("process-working-symbolic", 24) .style(Svg::Symbolic) .width(Length::Units(24)) - .height(Length::Units(24)), - ] - .spacing(8) - .padding([0, 24]); - content = content.push(connecting); - } - NewConnectionState::Failure(access_point) => { - let id = row![ - icon("network-wireless-symbolic", 24) - .style(Svg::Symbolic) - .width(Length::Units(24)) - .height(Length::Units(24)), - text(&access_point.ssid).size(14), - ] - .align_items(Alignment::Center) - .width(Length::Fill) - .padding([0, 24]) - .spacing(12); - content = content.push(id); - let col = column![ - text(fl!("unable-to-connect")), - text(fl!("check-wifi-connection")), - row![ - button(Button::Secondary) - .custom(vec![container(text("Cancel")) - .padding([0, 24]) - .into()]) - .on_press(Message::CancelNewConnection), - button(Button::Secondary) - .custom(vec![container(text("Connect")) - .padding([0, 24]) - .into()]) - .on_press(Message::SelectWirelessAccessPoint( - access_point.clone() - )) - ] - .spacing(24) - ] - .spacing(16) - .padding([0, 48]) - .align_items(Alignment::Center); - content = content.push(col); - } - } - } else if self.nm_state.wifi_enabled { - let mut list_col = - Vec::with_capacity(self.nm_state.wireless_access_points.len()); - for ap in &self.nm_state.wireless_access_points { - if self - .nm_state - .active_conns - .iter() - .any(|a| ap.ssid == a.name()) - { - continue; - } - let button = button(button_style) - .custom(vec![row![ - icon("network-wireless-symbolic", 16) - .style(Svg::Symbolic) - .width(Length::Units(16)) - .height(Length::Units(16)), - text(&ap.ssid) - .size(14) .height(Length::Units(24)) - .vertical_alignment(Vertical::Center) - ] - .align_items(Alignment::Center) - .spacing(12) - .into()]) - .on_press(Message::SelectWirelessAccessPoint(ap.clone())) - .width(Length::Fill) - .padding([8, 24]); - list_col.push(button.into()); - } - content = content.push( - scrollable(Column::with_children(list_col)).height(Length::Units(300)), + .into(), + ); + } + ActiveConnectionState::Activated => btn_content.push( + text(format!("{}", fl!("connected"))) + .size(14) + .horizontal_alignment(Horizontal::Right) + .vertical_alignment(Vertical::Center) + .into(), + ), + _ => {} + }; + known_wifi = known_wifi.push( + column![button(Button::Secondary) + .custom(btn_content) + .padding([8, 24]) + .style(button_style.clone()) + .on_press(Message::Disconnect(name.clone()))] + .align_items(Alignment::Center), ); } - } - self.applet_helper.popup_container(content).into() + }; } + for known in &self.nm_state.known_access_points { + let mut btn_content = vec![ + icon("network-wireless-symbolic", 24) + .style(Svg::Symbolic) + .width(Length::Units(24)) + .height(Length::Units(24)) + .into(), + text(&known.ssid).size(14).width(Length::Fill).into(), + ]; + + if known.working { + btn_content.push( + icon("process-working-symbolic", 24) + .style(Svg::Symbolic) + .width(Length::Units(24)) + .height(Length::Units(24)) + .into(), + ); + } + + let mut btn = button(Button::Secondary) + .custom(btn_content) + .padding([8, 24]) + .width(Length::Fill) + .style(button_style.clone()); + btn = match known.state { + DeviceState::Failed + | DeviceState::Unknown + | DeviceState::Unmanaged + | DeviceState::Disconnected + | DeviceState::NeedAuth => { + btn.on_press(Message::ActivateKnownWifi(known.ssid.clone())) + } + DeviceState::Activated => btn.on_press(Message::Disconnect(known.ssid.clone())), + _ => btn, + }; + known_wifi = known_wifi.push(row![btn].align_items(Alignment::Center)); + } + + let mut content = column![ + vpn_ethernet_col, + container( + toggler(fl!("airplane-mode"), self.nm_state.airplane_mode, |m| { + Message::ToggleAirplaneMode(m) + }) + .width(Length::Fill) + ) + .padding([0, 12]), + divider::horizontal::light(), + container( + toggler(fl!("wifi"), self.nm_state.wifi_enabled, |m| { + Message::ToggleWiFi(m) + }) + .width(Length::Fill) + ) + .padding([0, 12]), + divider::horizontal::light(), + known_wifi, + ] + .align_items(Alignment::Center) + .spacing(8) + .padding([8, 0]); + let dropdown_icon = if self.show_visible_networks { + "go-down-symbolic" + } else { + "go-next-symbolic" + }; + let available_connections_btn = button(Button::Secondary) + .custom( + vec![ + text(fl!("visible-wireless-networks")) + .size(14) + .width(Length::Fill) + .height(Length::Units(24)) + .vertical_alignment(Vertical::Center) + .into(), + container( + icon(dropdown_icon, 14) + .style(Svg::Symbolic) + .width(Length::Units(14)) + .height(Length::Units(14)), + ) + .align_x(Horizontal::Center) + .align_y(Vertical::Center) + .width(Length::Units(24)) + .height(Length::Units(24)) + .into(), + ] + .into(), + ) + .padding([8, 24]) + .style(button_style.clone()) + .on_press(Message::ToggleVisibleNetworks); + content = content.push(available_connections_btn); + if self.show_visible_networks { + if let Some(new_conn_state) = self.new_connection.as_ref() { + match new_conn_state { + NewConnectionState::EnterPassword { + access_point, + password, + } => { + let id = row![ + icon("network-wireless-symbolic", 24) + .style(Svg::Symbolic) + .width(Length::Units(24)) + .height(Length::Units(24)), + text(&access_point.ssid).size(14), + ] + .align_items(Alignment::Center) + .width(Length::Fill) + .padding([0, 24]) + .spacing(12); + content = content.push(id); + let col = column![ + text(fl!("enter-password")), + text_input("", password, Message::Password) + .on_submit(Message::SubmitPassword) + .password(), + container(text(fl!("router-wps-button"))).padding(8), + row![ + button(Button::Secondary) + .custom(vec![container(text(fl!("cancel"))) + .padding([0, 24]) + .into()]) + .on_press(Message::CancelNewConnection), + button(Button::Secondary) + .custom(vec![container(text(fl!("connect"))) + .padding([0, 24]) + .into()]) + .on_press(Message::SubmitPassword) + ] + .spacing(24) + ] + .spacing(8) + .padding([0, 48]) + .align_items(Alignment::Center); + content = content.push(col); + } + NewConnectionState::Waiting(access_point) => { + let id = row![ + icon("network-wireless-symbolic", 24) + .style(Svg::Symbolic) + .width(Length::Units(24)) + .height(Length::Units(24)), + text(&access_point.ssid).size(14), + ] + .align_items(Alignment::Center) + .width(Length::Fill) + .spacing(12); + let connecting = row![ + id, + icon("process-working-symbolic", 24) + .style(Svg::Symbolic) + .width(Length::Units(24)) + .height(Length::Units(24)), + ] + .spacing(8) + .padding([0, 24]); + content = content.push(connecting); + } + NewConnectionState::Failure(access_point) => { + let id = row![ + icon("network-wireless-symbolic", 24) + .style(Svg::Symbolic) + .width(Length::Units(24)) + .height(Length::Units(24)), + text(&access_point.ssid).size(14), + ] + .align_items(Alignment::Center) + .width(Length::Fill) + .padding([0, 24]) + .spacing(12); + content = content.push(id); + let col = column![ + text(fl!("unable-to-connect")), + text(fl!("check-wifi-connection")), + row![ + button(Button::Secondary) + .custom(vec![container(text("Cancel")) + .padding([0, 24]) + .into()]) + .on_press(Message::CancelNewConnection), + button(Button::Secondary) + .custom(vec![container(text("Connect")) + .padding([0, 24]) + .into()]) + .on_press(Message::SelectWirelessAccessPoint( + access_point.clone() + )) + ] + .spacing(24) + ] + .spacing(16) + .padding([0, 48]) + .align_items(Alignment::Center); + content = content.push(col); + } + } + } else if self.nm_state.wifi_enabled { + let mut list_col = + Vec::with_capacity(self.nm_state.wireless_access_points.len()); + for ap in &self.nm_state.wireless_access_points { + if self + .nm_state + .active_conns + .iter() + .any(|a| ap.ssid == a.name()) + { + continue; + } + let button = button(button_style) + .custom(vec![row![ + icon("network-wireless-symbolic", 16) + .style(Svg::Symbolic) + .width(Length::Units(16)) + .height(Length::Units(16)), + text(&ap.ssid) + .size(14) + .height(Length::Units(24)) + .vertical_alignment(Vertical::Center) + ] + .align_items(Alignment::Center) + .spacing(12) + .into()]) + .on_press(Message::SelectWirelessAccessPoint(ap.clone())) + .width(Length::Fill) + .padding([8, 24]); + list_col.push(button.into()); + } + content = content.push( + scrollable(Column::with_children(list_col)).height(Length::Units(300)), + ); + } + } + self.applet_helper.popup_container(content).into() } } @@ -703,7 +696,7 @@ impl Application for CosmicNetworkApplet { self.theme } - fn close_requested(&self, _id: SurfaceIdWrapper) -> Self::Message { + fn close_requested(&self, _id: window::Id) -> Self::Message { Message::Ignore } diff --git a/cosmic-applet-notifications/src/main.rs b/cosmic-applet-notifications/src/main.rs index 2afec019..0d7aee4d 100644 --- a/cosmic-applet-notifications/src/main.rs +++ b/cosmic-applet-notifications/src/main.rs @@ -1,7 +1,6 @@ use cosmic::applet::{CosmicAppletHelper, APPLET_BUTTON_THEME}; use cosmic::iced::wayland::{ popup::{destroy_popup, get_popup}, - SurfaceIdWrapper, }; use cosmic::iced::{ widget::{button, column, row, text, Row, Space}, @@ -65,7 +64,7 @@ impl Application for Notifications { self.theme } - fn close_requested(&self, _id: SurfaceIdWrapper) -> Self::Message { + fn close_requested(&self, _id: window::Id) -> Self::Message { Message::Ignore } @@ -112,57 +111,54 @@ impl Application for Notifications { } } - fn view(&self, id: SurfaceIdWrapper) -> Element { - match id { - SurfaceIdWrapper::LayerSurface(_) => unimplemented!(), - SurfaceIdWrapper::Window(_) => self - .applet_helper + fn view(&self, id: window::Id) -> Element { + if id == window::Id::new(0) { + self.applet_helper .icon_button(&self.icon_name) .on_press(Message::TogglePopup) - .into(), - SurfaceIdWrapper::Popup(_) => { - let do_not_disturb = - row![ - toggler(String::from("Do Not Disturb"), self.do_not_disturb, |b| { - Message::DoNotDisturb(b) - }) - .width(Length::Fill) - ] - .padding([0, 24]); - - let settings = - row_button(vec!["Notification Settings...".into()]).on_press(Message::Settings); - - let notifications = if self.notifications.len() == 0 { - row![ - Space::with_width(Length::Fill), - column![text_icon(&self.icon_name, 40), "No Notifications"] - .align_items(Alignment::Center), - Space::with_width(Length::Fill) - ] - .spacing(12) - } else { - row![text("TODO: make app worky with notifications")] - }; - - let main_content = column![ - divider::horizontal::light(), - notifications, - divider::horizontal::light() + .into() + } else { + let do_not_disturb = + row![ + toggler(String::from("Do Not Disturb"), self.do_not_disturb, |b| { + Message::DoNotDisturb(b) + }) + .width(Length::Fill) ] - .padding([0, 24]) - .spacing(12); + .padding([0, 24]); - let content = column![] - .align_items(Alignment::Start) - .spacing(12) - .padding([12, 0]) - .push(do_not_disturb) - .push(main_content) - .push(settings); + let settings = + row_button(vec!["Notification Settings...".into()]).on_press(Message::Settings); - self.applet_helper.popup_container(content).into() - } + let notifications = if self.notifications.len() == 0 { + row![ + Space::with_width(Length::Fill), + column![text_icon(&self.icon_name, 40), "No Notifications"] + .align_items(Alignment::Center), + Space::with_width(Length::Fill) + ] + .spacing(12) + } else { + row![text("TODO: make app worky with notifications")] + }; + + let main_content = column![ + divider::horizontal::light(), + notifications, + divider::horizontal::light() + ] + .padding([0, 24]) + .spacing(12); + + let content = column![] + .align_items(Alignment::Start) + .spacing(12) + .padding([12, 0]) + .push(do_not_disturb) + .push(main_content) + .push(settings); + + self.applet_helper.popup_container(content).into() } } } diff --git a/cosmic-applet-power/Cargo.toml b/cosmic-applet-power/Cargo.toml index 38b6519d..7d7c97cf 100644 --- a/cosmic-applet-power/Cargo.toml +++ b/cosmic-applet-power/Cargo.toml @@ -10,7 +10,6 @@ libpulse-binding = "2.26.0" libpulse-glib-binding = "2.25.0" tokio = { version = "1.20.1", features=["full"] } libcosmic = { git = "https://github.com/pop-os/libcosmic/", branch = "master", default-features = false, features = ["tokio", "wayland", "applet"] } -sctk = { package = "smithay-client-toolkit", git = "https://github.com/Smithay/client-toolkit", rev = "69bffe5" } nix = "0.26.1" zbus = "3.7" logind-zbus = "3.1" diff --git a/cosmic-applet-power/src/main.rs b/cosmic-applet-power/src/main.rs index 3e5fe500..8bb3f1c8 100644 --- a/cosmic-applet-power/src/main.rs +++ b/cosmic-applet-power/src/main.rs @@ -2,7 +2,6 @@ use std::process; use cosmic::applet::{CosmicAppletHelper, APPLET_BUTTON_THEME}; use cosmic::iced::wayland::popup::{destroy_popup, get_popup}; -use cosmic::iced::wayland::SurfaceIdWrapper; use cosmic::iced_native::layout::Limits; use cosmic::iced_native::widget::Space; use cosmic::widget::{button, divider, icon}; @@ -80,7 +79,7 @@ impl Application for Power { self.theme } - fn close_requested(&self, _id: SurfaceIdWrapper) -> Self::Message { + fn close_requested(&self, _id: window::Id) -> Self::Message { Message::Ignore } @@ -139,61 +138,56 @@ impl Application for Power { } } - fn view(&self, id: SurfaceIdWrapper) -> Element { - match id { - SurfaceIdWrapper::LayerSurface(_) => unimplemented!(), - SurfaceIdWrapper::Window(_) => self - .applet_helper + fn view(&self, id: window::Id) -> Element { + if id == window::Id::new(0) { + self.applet_helper .icon_button(&self.icon_name) .on_press(Message::TogglePopup) - .into(), - SurfaceIdWrapper::Popup(_) => { - let settings = row_button(vec!["Settings...".into()]).on_press(Message::Settings); + .into() + } else { + let settings = row_button(vec!["Settings...".into()]).on_press(Message::Settings); - let session = column![ - row_button(vec![ - text_icon("system-lock-screen-symbolic", 24).into(), - "Lock Screen".into(), - Space::with_width(Length::Fill).into(), - "Super + Escape".into(), - ]) - .on_press(Message::Lock), - row_button(vec![ - text_icon("system-log-out-symbolic", 24).into(), - "Log Out".into(), - Space::with_width(Length::Fill).into(), - "Ctrl + Alt + Delete".into(), - ]) - .on_press(Message::LogOut), - ]; + let session = column![ + row_button(vec![ + text_icon("system-lock-screen-symbolic", 24).into(), + "Lock Screen".into(), + Space::with_width(Length::Fill).into(), + "Super + Escape".into(), + ]) + .on_press(Message::Lock), + row_button(vec![ + text_icon("system-log-out-symbolic", 24).into(), + "Log Out".into(), + Space::with_width(Length::Fill).into(), + "Ctrl + Alt + Delete".into(), + ]) + .on_press(Message::LogOut), + ]; - let power = row![ - power_buttons("system-lock-screen-symbolic", "Suspend") - .on_press(Message::Suspend), - power_buttons("system-restart-symbolic", "Restart").on_press(Message::Restart), - power_buttons("system-shutdown-symbolic", "Shutdown") - .on_press(Message::Shutdown), - ] - .spacing(24) - .padding([0, 24]); + let power = row![ + power_buttons("system-lock-screen-symbolic", "Suspend").on_press(Message::Suspend), + power_buttons("system-restart-symbolic", "Restart").on_press(Message::Restart), + power_buttons("system-shutdown-symbolic", "Shutdown").on_press(Message::Shutdown), + ] + .spacing(24) + .padding([0, 24]); - let content = column![ - settings, - container(divider::horizontal::light()) - .padding([0, 12]) - .width(Length::Fill), - session, - container(divider::horizontal::light()) - .padding([0, 12]) - .width(Length::Fill), - power - ] - .align_items(Alignment::Start) - .spacing(12) - .padding([8, 0]); + let content = column![ + settings, + container(divider::horizontal::light()) + .padding([0, 12]) + .width(Length::Fill), + session, + container(divider::horizontal::light()) + .padding([0, 12]) + .width(Length::Fill), + power + ] + .align_items(Alignment::Start) + .spacing(12) + .padding([8, 0]); - self.applet_helper.popup_container(content).into() - } + self.applet_helper.popup_container(content).into() } } } diff --git a/cosmic-applet-time/src/main.rs b/cosmic-applet-time/src/main.rs index 7644985c..89becccd 100644 --- a/cosmic-applet-time/src/main.rs +++ b/cosmic-applet-time/src/main.rs @@ -1,8 +1,5 @@ use cosmic::applet::{cosmic_panel_config::PanelAnchor, CosmicAppletHelper}; -use cosmic::iced::wayland::{ - popup::{destroy_popup, get_popup}, - SurfaceIdWrapper, -}; +use cosmic::iced::wayland::popup::{destroy_popup, get_popup}; use cosmic::iced::{ time, wayland::InitialSurface, @@ -28,9 +25,7 @@ pub fn main() -> cosmic::iced::Result { s.iced_settings.min_size = Some((1, 1)); s.iced_settings.max_size = None; s.autosize = true; - s.size_limits = Limits::NONE - .min_height(1) - .min_width(1); + s.size_limits = Limits::NONE.min_height(1).min_width(1); } _ => {} }; @@ -98,7 +93,7 @@ impl Application for Time { self.theme } - fn close_requested(&self, _id: SurfaceIdWrapper) -> Self::Message { + fn close_requested(&self, _id: window::Id) -> Self::Message { Message::Ignore } @@ -198,61 +193,57 @@ impl Application for Time { } } - fn view(&self, id: SurfaceIdWrapper) -> Element { - match id { - SurfaceIdWrapper::LayerSurface(_) => unimplemented!(), - SurfaceIdWrapper::Window(_) => { - let button = button( - if matches!( - self.applet_helper.anchor, - PanelAnchor::Top | PanelAnchor::Bottom - ) { - column![text(self.now.format("%b %-d %-I:%M %p").to_string())] - } else { - let mut date_time_col = column![ - icon( - "emoji-recent-symbolic", - self.applet_helper.suggested_size().0 - ) - .style(theme::Svg::Symbolic), - text(self.now.format("%I").to_string()), - text(self.now.format("%M").to_string()), - text(self.now.format("%p").to_string()), - vertical_space(Length::Units(4)), - // TODO better calendar icon? - icon( - "calendar-go-today-symbolic", - self.applet_helper.suggested_size().0 - ) - .style(theme::Svg::Symbolic), - ] - .align_items(Alignment::Center) - .spacing(4); - for d in self.now.format("%x").to_string().split("/") { - date_time_col = date_time_col.push(text(d.to_string())); - } - date_time_col - }, - ) - .on_press(Message::TogglePopup) - .style(theme::Button::Text); - - if let Some(tracker) = self.rectangle_tracker.as_ref() { - tracker.container(0, button).into() + fn view(&self, id: window::Id) -> Element { + if id == window::Id::new(0) { + let button = button( + if matches!( + self.applet_helper.anchor, + PanelAnchor::Top | PanelAnchor::Bottom + ) { + column![text(self.now.format("%b %-d %-I:%M %p").to_string())] } else { - button.into() - } - } - SurfaceIdWrapper::Popup(_) => { - let content = column![] - .align_items(Alignment::Start) - .spacing(12) - .padding([24, 0]) - .push(text(&self.msg)) - .padding(8); + let mut date_time_col = column![ + icon( + "emoji-recent-symbolic", + self.applet_helper.suggested_size().0 + ) + .style(theme::Svg::Symbolic), + text(self.now.format("%I").to_string()), + text(self.now.format("%M").to_string()), + text(self.now.format("%p").to_string()), + vertical_space(Length::Units(4)), + // TODO better calendar icon? + icon( + "calendar-go-today-symbolic", + self.applet_helper.suggested_size().0 + ) + .style(theme::Svg::Symbolic), + ] + .align_items(Alignment::Center) + .spacing(4); + for d in self.now.format("%x").to_string().split("/") { + date_time_col = date_time_col.push(text(d.to_string())); + } + date_time_col + }, + ) + .on_press(Message::TogglePopup) + .style(theme::Button::Text); - self.applet_helper.popup_container(content).into() + if let Some(tracker) = self.rectangle_tracker.as_ref() { + tracker.container(0, button).into() + } else { + button.into() } + } else { + let content = column![] + .align_items(Alignment::Start) + .spacing(12) + .padding([24, 0]) + .push(text(&self.msg)) + .padding(8); + + self.applet_helper.popup_container(content).into() } } } diff --git a/cosmic-applet-workspaces/src/components/app.rs b/cosmic-applet-workspaces/src/components/app.rs index c2eb8270..7187e6aa 100644 --- a/cosmic-applet-workspaces/src/components/app.rs +++ b/cosmic-applet-workspaces/src/components/app.rs @@ -4,7 +4,7 @@ use cosmic::applet::CosmicAppletHelper; use cosmic::iced::alignment::{Horizontal, Vertical}; use cosmic::iced::mouse::{self, ScrollDelta}; use cosmic::iced::wayland::actions::window::SctkWindowSettings; -use cosmic::iced::wayland::{window::resize_window, InitialSurface, SurfaceIdWrapper}; +use cosmic::iced::wayland::{window::resize_window, InitialSurface}; use cosmic::iced::widget::{column, container, row, text}; use cosmic::iced::{ subscription, widget::button, window, Application, Command, Event::Mouse, Length, Settings, @@ -131,7 +131,7 @@ impl Application for IcedWorkspacesApplet { Command::none() } - fn view(&self, _id: SurfaceIdWrapper) -> Element { + fn view(&self, _id: window::Id) -> Element { if self.workspaces.is_empty() { return row![].padding(8).into(); } @@ -200,7 +200,7 @@ impl Application for IcedWorkspacesApplet { self.theme } - fn close_requested(&self, _id: SurfaceIdWrapper) -> Self::Message { + fn close_requested(&self, _id: window::Id) -> Self::Message { unimplemented!() } diff --git a/cosmic-applet-workspaces/src/wayland.rs b/cosmic-applet-workspaces/src/wayland.rs index 35c59bda..ebb2713a 100644 --- a/cosmic-applet-workspaces/src/wayland.rs +++ b/cosmic-applet-workspaces/src/wayland.rs @@ -97,7 +97,7 @@ pub fn spawn_workspaces(tx: mpsc::Sender) -> SyncSender Msg { + fn close_requested(&self, _id: window::Id) -> Msg { unimplemented!() } @@ -65,7 +66,7 @@ impl iced::Application for Button { } } - fn view(&self, _id: SurfaceIdWrapper) -> cosmic::Element { + fn view(&self, _id: window::Id) -> cosmic::Element { // TODO icon? cosmic::widget::button(cosmic::theme::Button::Text) .text(&self.desktop.name)