diff --git a/Cargo.lock b/Cargo.lock index eb3a64c7..44b0a032 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,17 +17,6 @@ version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08f9b8508dccb7687a1d6c4ce66b2b0ecef467c94667de27d8d7fe1f8d2a9cdc" -[[package]] -name = "async-broadcast" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90622698a1218e0b2fb846c97b5f19a0831f6baddee73d9454156365ccfa473b" -dependencies = [ - "easy-parallel", - "event-listener", - "futures-core", -] - [[package]] name = "async-broadcast" version = "0.4.0" @@ -93,15 +82,6 @@ dependencies = [ "event-listener", ] -[[package]] -name = "async-oneshot" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ec7c75bcbcb0139e9177f30692fd617405ca4e0c27802e128d53171f7042e2c" -dependencies = [ - "futures-micro", -] - [[package]] name = "async-recursion" version = "0.3.2" @@ -174,12 +154,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "bumpalo" -version = "3.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ccbd214614c6783386c1af30caf03192f17891059cecc394b4fb119e363de3" - [[package]] name = "byteorder" version = "1.4.3" @@ -271,7 +245,7 @@ dependencies = [ "libc", "num-integer", "num-traits", - "time 0.1.43", + "time", "winapi", ] @@ -298,10 +272,8 @@ dependencies = [ "gtk4", "i18n-embed", "i18n-embed-fl", - "libcosmic", "once_cell", "pretty_env_logger", - "relm4-macros 0.4.4", "rust-embed", "serde", "serde_json", @@ -309,25 +281,6 @@ dependencies = [ "xdg", ] -[[package]] -name = "cosmic-applet-audio" -version = "0.1.0" -dependencies = [ - "async-io", - "freedesktop-desktop-entry", - "futures-util", - "gtk4", - "libcosmic-widgets", - "libpulse-binding", - "mpris2-zbus", - "once_cell", - "pulsectl-rs", - "relm4-macros 0.4.4", - "tokio", - "tracker", - "zbus", -] - [[package]] name = "cosmic-applet-graphics" version = "0.1.0" @@ -335,24 +288,7 @@ dependencies = [ "cosmic-panel-config", "gtk4", "once_cell", - "relm4-macros 0.4.4", - "tokio", - "zbus", -] - -[[package]] -name = "cosmic-applet-network" -version = "0.1.0" -dependencies = [ - "cosmic-dbus-networkmanager", - "cosmic-panel-config", - "futures-util", - "gtk4", - "itertools", - "libcosmic-widgets", - "once_cell", - "relm4-macros 0.4.4", - "slotmap", + "relm4-macros", "tokio", "zbus", ] @@ -382,7 +318,7 @@ dependencies = [ "logind-zbus", "nix 0.24.1", "once_cell", - "relm4-macros 0.4.4", + "relm4-macros", "tokio", "zbus", ] @@ -432,25 +368,13 @@ dependencies = [ "once_cell", "pretty_env_logger", "rust-embed", + "smithay-client-toolkit", "tokio", "wayland-client", "wayland-commons", "wayland-scanner", ] -[[package]] -name = "cosmic-dbus-networkmanager" -version = "0.1.0" -source = "git+https://github.com/pop-os/dbus-settings-bindings#d3b16fda4deba1ed4b95ce77943fb4c0db7a5773" -dependencies = [ - "bitflags", - "derive_builder", - "procfs", - "time 0.3.9", - "zbus", - "zvariant", -] - [[package]] name = "cosmic-panel-button" version = "0.1.0" @@ -511,41 +435,6 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "darling" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4529658bdda7fd6769b8614be250cdcfc3aeb0ee72fe66f9e41e5e5eb73eac02" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "649c91bc01e8b1eac09fb91e8dbc7d517684ca6be8ebc75bb9cafc894f9fdb6f" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn", -] - -[[package]] -name = "darling_macro" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc69c5bfcbd2fc09a0f38451d2daf0e372e367986a83906d1b0dbc88134fb5" -dependencies = [ - "darling_core", - "quote", - "syn", -] - [[package]] name = "dashmap" version = "5.3.4" @@ -569,37 +458,6 @@ dependencies = [ "syn", ] -[[package]] -name = "derive_builder" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3" -dependencies = [ - "derive_builder_macro", -] - -[[package]] -name = "derive_builder_core" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "derive_builder_macro" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68" -dependencies = [ - "derive_builder_core", - "syn", -] - [[package]] name = "digest" version = "0.9.0" @@ -609,15 +467,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "dirs" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309" -dependencies = [ - "dirs-sys", -] - [[package]] name = "dirs" version = "4.0.0" @@ -659,12 +508,6 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6907e25393cdcc1f4f3f513d9aac1e840eb1cc341a0fccb01171f7d14d10b946" -[[package]] -name = "either" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" - [[package]] name = "enumflags2" version = "0.7.5" @@ -789,44 +632,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "flume" -version = "0.10.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843c03199d0c0ca54bc1ea90ac0d507274c28abcc4f691ae8b4eaa375087c76a" -dependencies = [ - "futures-core", - "futures-sink", - "nanorand", - "pin-project", - "spin", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "fragile" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9d758e60b45e8d749c89c1b389ad8aee550f86aa12e2b9298b546dda7a82ab1" - -[[package]] -name = "freedesktop-desktop-entry" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45157175a725e81f3f594382430b6b78af5f8f72db9bd51b94f0785f80fc6d29" -dependencies = [ - "dirs 3.0.2", - "gettext-rs", - "memchr", - "thiserror", - "xdg", -] - [[package]] name = "fsevent-sys" version = "4.1.0" @@ -910,15 +715,6 @@ dependencies = [ "syn", ] -[[package]] -name = "futures-micro" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b460264b3593d68b16a7bc35f7bc226ddfebdf9a1c8db1ed95d5cc6b7168c826" -dependencies = [ - "pin-project-lite", -] - [[package]] name = "futures-sink" version = "0.3.21" @@ -1008,32 +804,6 @@ dependencies = [ "system-deps", ] -[[package]] -name = "gdk4-x11" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be84e388c6b74cce3f9232904ce87ae1857ee3a41a20d9d8a16ae8792799b27c" -dependencies = [ - "gdk4", - "gdk4-x11-sys", - "gio", - "glib", - "libc", - "x11", -] - -[[package]] -name = "gdk4-x11-sys" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f85f9dabcc847c0733246822bebb476dcbb93f5a964d561b46b69f00fdbbf44" -dependencies = [ - "gdk4-sys", - "glib-sys", - "libc", - "system-deps", -] - [[package]] name = "generic-array" version = "0.14.5" @@ -1051,30 +821,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad" dependencies = [ "cfg-if", - "js-sys", "libc", "wasi 0.10.2+wasi-snapshot-preview1", - "wasm-bindgen", -] - -[[package]] -name = "gettext-rs" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e49ea8a8fad198aaa1f9655a2524b64b70eb06b2f3ff37da407566c93054f364" -dependencies = [ - "gettext-sys", - "locale_config", -] - -[[package]] -name = "gettext-sys" -version = "0.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63ce2e00f56a206778276704bbe38564c8695249fdc8f354b4ef71c57c3839d" -dependencies = [ - "cc", - "temp-dir", ] [[package]] @@ -1380,12 +1128,6 @@ dependencies = [ "syn", ] -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - [[package]] name = "inotify" version = "0.9.6" @@ -1435,30 +1177,12 @@ dependencies = [ "unic-langid", ] -[[package]] -name = "itertools" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3" -dependencies = [ - "either", -] - [[package]] name = "itoa" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" -[[package]] -name = "js-sys" -version = "0.3.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "671a26f820db17c2a2750743f1dd03bafd15b98c9f30c7c2628c024c05d73397" -dependencies = [ - "wasm-bindgen", -] - [[package]] name = "kqueue" version = "1.0.6" @@ -1491,32 +1215,6 @@ version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" -[[package]] -name = "libcosmic" -version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#d004d686bd83e55f8f5058700941284ca84dc579" -dependencies = [ - "cascade", - "gdk4", - "gdk4-x11", - "gio", - "gobject-sys", - "gtk4", - "libcosmic-widgets", - "once_cell", - "x11", -] - -[[package]] -name = "libcosmic-widgets" -version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#d004d686bd83e55f8f5058700941284ca84dc579" -dependencies = [ - "relm4", - "relm4-macros 0.4.1", - "tracker", -] - [[package]] name = "libloading" version = "0.7.3" @@ -1527,33 +1225,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "libpulse-binding" -version = "2.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17be42160017e0ae993c03bfdab4ecb6f82ce3f8d515bd8da8fdf18d10703663" -dependencies = [ - "bitflags", - "libc", - "libpulse-sys", - "num-derive", - "num-traits", - "winapi", -] - -[[package]] -name = "libpulse-sys" -version = "1.19.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "991e6bd0efe2a36e6534e136e7996925e4c1a8e35b7807fe533f2beffff27c30" -dependencies = [ - "libc", - "num-derive", - "num-traits", - "pkg-config", - "winapi", -] - [[package]] name = "locale_config" version = "0.3.0" @@ -1648,27 +1319,6 @@ dependencies = [ "windows-sys", ] -[[package]] -name = "mpris2-zbus" -version = "0.1.0" -source = "git+https://github.com/pop-os/mpris2-zbus#bcc8481ea7ccfc08aa870f28272d9093db3b1ba9" -dependencies = [ - "serde", - "thiserror", - "time 0.3.9", - "zbus", - "zvariant", -] - -[[package]] -name = "nanorand" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" -dependencies = [ - "getrandom", -] - [[package]] name = "nix" version = "0.22.3" @@ -1735,17 +1385,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "num-derive" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "num-integer" version = "0.1.45" @@ -1775,15 +1414,6 @@ dependencies = [ "libc", ] -[[package]] -name = "num_threads" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" -dependencies = [ - "libc", -] - [[package]] name = "objc" version = "0.2.7" @@ -1923,26 +1553,6 @@ dependencies = [ "ucd-trie", ] -[[package]] -name = "pin-project" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58ad3879ad3baf4e44784bc6a718a8698867bb991f8ce24d1bcbe2cfb4c3a75e" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "744b6f092ba29c3650faf274db506afd39944f48420f6c86b17cfe0ee1cb36bb" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "pin-project-lite" version = "0.2.9" @@ -2033,28 +1643,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "procfs" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0941606b9934e2d98a3677759a971756eb821f75764d0e0d26946d08e74d9104" -dependencies = [ - "bitflags", - "byteorder", - "hex", - "lazy_static", - "libc", -] - -[[package]] -name = "pulsectl-rs" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06a988bceed1981b2c5fc4a3da0e4e073fdaff8e6bd022b089f54bc573dc3cfc" -dependencies = [ - "libpulse-binding", -] - [[package]] name = "quick-error" version = "1.2.3" @@ -2146,32 +1734,6 @@ version = "0.6.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64" -[[package]] -name = "relm4" -version = "0.4.1" -source = "git+https://github.com/AaronErhardt/relm4?rev=7404ad64ca8763f6629cadcd743947cd29e1538a#7404ad64ca8763f6629cadcd743947cd29e1538a" -dependencies = [ - "async-broadcast 0.3.4", - "async-oneshot", - "flume", - "fragile", - "futures", - "gtk4", - "log", - "once_cell", - "tokio", -] - -[[package]] -name = "relm4-macros" -version = "0.4.1" -source = "git+https://github.com/AaronErhardt/relm4?branch=new-approach#f8efd12fffb4c581fc41d2781202282bdfbf7e04" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "relm4-macros" version = "0.4.4" @@ -2431,15 +1993,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "spin" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c530c2b0d0bf8b69304b39fe2001993e267461948b890cd037d8ad4293fa1a0d" -dependencies = [ - "lock_api", -] - [[package]] name = "static_assertions" version = "1.1.0" @@ -2476,12 +2029,6 @@ dependencies = [ "version-compare", ] -[[package]] -name = "temp-dir" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af547b166dd1ea4b472165569fc456cfb6818116f854690b0ff205e636523dab" - [[package]] name = "tempfile" version = "3.3.0" @@ -2535,16 +2082,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "time" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2702e08a7a860f005826c6815dcac101b19b5eb330c27fe4a5928fec1d20ddd" -dependencies = [ - "libc", - "num_threads", -] - [[package]] name = "tinystr" version = "0.3.4" @@ -2591,26 +2128,6 @@ dependencies = [ "serde", ] -[[package]] -name = "tracker" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e66d89d37f24af7a53e394a412441c803df73f1a5adfcb3b9c37a2e0a75392eb" -dependencies = [ - "tracker-macros", -] - -[[package]] -name = "tracker-macros" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ca57dc00ed70e0acce16b1a4994ba9caf7718b9247382285d5e5192d3f6cd8d" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "type-map" version = "0.4.0" @@ -2714,60 +2231,6 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" -[[package]] -name = "wasm-bindgen" -version = "0.2.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27370197c907c55e3f1a9fbe26f44e937fe6451368324e009cba39e139dc08ad" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53e04185bfa3a779273da532f5025e33398409573f348985af9a1cbf3774d3f4" -dependencies = [ - "bumpalo", - "lazy_static", - "log", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17cae7ff784d7e83a2fe7611cfe766ecf034111b49deb850a3dc7699c08251f5" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99ec0dc7a4756fffc231aab1b9f2f578d23cd391390ab27f952ae0c9b3ece20b" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d554b7f530dee5964d9a9468d95c1f8b8acae4f282807e7d27d4b03099a46744" - [[package]] name = "wayland-client" version = "0.29.4" @@ -2921,16 +2384,6 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" -[[package]] -name = "x11" -version = "2.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dd0565fa8bfba8c5efe02725b14dff114c866724eff2cfd44d76cea74bcd87a" -dependencies = [ - "libc", - "pkg-config", -] - [[package]] name = "xcursor" version = "0.3.4" @@ -2946,7 +2399,7 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c4583db5cbd4c4c0303df2d15af80f0539db703fa1c68802d4cbbd2dd0f88f6" dependencies = [ - "dirs 4.0.0", + "dirs", ] [[package]] @@ -2961,7 +2414,7 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53819092b9db813b2c6168b097b4b13ad284d81c9f2b0165a0a1b190e505a1f3" dependencies = [ - "async-broadcast 0.4.0", + "async-broadcast", "async-channel", "async-executor", "async-io", diff --git a/Cargo.toml b/Cargo.toml index 631dd191..70e26245 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,8 +1,6 @@ [workspace] members = [ - "applets/cosmic-applet-audio", "applets/cosmic-applet-graphics", - "applets/cosmic-applet-network", "applets/cosmic-applet-notifications", "applets/cosmic-applet-power", "applets/cosmic-applet-workspaces", diff --git a/applets/cosmic-app-list/Cargo.toml b/applets/cosmic-app-list/Cargo.toml index 1b5dace7..bcdf6f18 100644 --- a/applets/cosmic-app-list/Cargo.toml +++ b/applets/cosmic-app-list/Cargo.toml @@ -9,8 +9,6 @@ cosmic-panel-config = { git = "https://github.com/pop-os/cosmic-panel/", feature cascade = "1.0.0" gtk4 = { version = "0.4.5", features = ["v4_4"] } gio = "0.15.3" -libcosmic = { git = "https://github.com/pop-os/libcosmic" } -relm4-macros = "0.4.4" serde = "1.0.136" serde_json = "1.0.78" tokio = { version = "1.16.1", features = ["sync"] } diff --git a/applets/cosmic-app-list/src/apps_container/mod.rs b/applets/cosmic-app-list/src/apps_container/mod.rs index 621de069..6e63ae18 100644 --- a/applets/cosmic-app-list/src/apps_container/mod.rs +++ b/applets/cosmic-app-list/src/apps_container/mod.rs @@ -1,5 +1,3 @@ -use std::env; - // SPDX-License-Identifier: MPL-2.0-only use crate::dock_list::DockList; use crate::dock_list::DockListType; diff --git a/applets/cosmic-app-list/src/main.rs b/applets/cosmic-app-list/src/main.rs index 3a0798a6..479179c4 100644 --- a/applets/cosmic-app-list/src/main.rs +++ b/applets/cosmic-app-list/src/main.rs @@ -82,8 +82,6 @@ fn main() { // .expect("Failed to close selected window"); } Event::Favorite((name, should_favorite)) => { - dbg!(&name); - dbg!(should_favorite); let saved_app_model = apps_container.model(DockListType::Saved); let active_app_model = apps_container.model(DockListType::Active); if should_favorite { diff --git a/applets/cosmic-applet-workspaces/Cargo.toml b/applets/cosmic-applet-workspaces/Cargo.toml index c0f1291f..acbaf4bd 100644 --- a/applets/cosmic-applet-workspaces/Cargo.toml +++ b/applets/cosmic-applet-workspaces/Cargo.toml @@ -19,6 +19,7 @@ rust-embed = "6.3.0" tokio = { version = "1.16.1", features = ["sync"] } wayland-client = "0.29.4" wayland-commons = "0.29.4" +sctk = { package = "smithay-client-toolkit", git = "https://github.com/wash2/client-toolkit.git", default-features = false, features = ["calloop"] } [build-dependencies] gio = "0.15.10" diff --git a/applets/cosmic-applet-workspaces/build.rs b/applets/cosmic-applet-workspaces/build.rs index 040a9eef..d99ec86a 100644 --- a/applets/cosmic-applet-workspaces/build.rs +++ b/applets/cosmic-applet-workspaces/build.rs @@ -19,7 +19,6 @@ fn main() { ); let dest = PathBuf::from(&env::var("OUT_DIR").unwrap()); // Location of the xml file, relative to the `Cargo.toml` - let drm_protocol_file = "data/resources/wayland-drm.xml"; let ext_workspace_protocol_file = "data/resources/ext-workspace-unstable-v1.xml"; // Target directory for the generate files generate_code( diff --git a/applets/cosmic-applet-workspaces/i18n/en/cosmic_applet_workspaces.ftl b/applets/cosmic-applet-workspaces/i18n/en/cosmic_applet_workspaces.ftl index 2d5ea1e4..86b3f7ca 100644 --- a/applets/cosmic-applet-workspaces/i18n/en/cosmic_applet_workspaces.ftl +++ b/applets/cosmic-applet-workspaces/i18n/en/cosmic_applet_workspaces.ftl @@ -1 +1 @@ -cosmic-app-list = Cosmic Dock App List +cosmic-applet-workspaces = Cosmic Workspaces diff --git a/applets/cosmic-applet-workspaces/src/wayland.rs b/applets/cosmic-applet-workspaces/src/wayland.rs index 0bced8dc..5af6e35e 100644 --- a/applets/cosmic-applet-workspaces/src/wayland.rs +++ b/applets/cosmic-applet-workspaces/src/wayland.rs @@ -6,7 +6,9 @@ use std::{ }; use tokio::sync::mpsc; use wayland_client::{protocol::wl_registry, Display, GlobalManager}; - +use generated::client::{zext_workspace_manager_v1, zext_workspace_group_handle_v1, zext_workspace_handle_v1}; +use sctk::environment::{SimpleGlobal, Environment}; +use sctk::environment; mod generated { // The generated code tends to trigger a lot of warnings // so we isolate it into a very permissive module @@ -26,6 +28,18 @@ mod generated { } } +#[derive(Debug)] +struct State { + workspace_manager: SimpleGlobal, +} + +environment!(State, + singles = [ + zext_workspace_manager_v1::ZextWorkspaceManagerV1 => workspace_manager, + ], + multis = [] +); + pub fn spawn_workspaces(tx: mpsc::Sender>) -> mpsc::Sender { let (workspaces_tx, mut workspaces_rx) = mpsc::channel(100); if let Ok(display) = std::env::var("HOST_WAYLAND_DISPLAY") @@ -35,18 +49,30 @@ pub fn spawn_workspaces(tx: mpsc::Sender>) -> mpsc::Sender(); + dbg!(workspace_manager); + // let globals = GlobalManager::new(&attached_display); + // let _ = event_queue.sync_roundtrip(&mut (), |_, _, _| unreachable!()); + + // println!("Globals: "); + // for (name, interface, version) in globals.list() { + // println!("{}: {} (version {})", name, interface, version); + // } }); } else { - eprintln!("ENV variable HOST_WAYLAND_SOCKET is missing. Exiting..."); + eprintln!("ENV variable HOST_WAYLAND_DISPLAY is missing. Exiting..."); std::process::exit(1); } workspaces_tx } + + + + + diff --git a/applets/cosmic-applet-workspaces/src/window/mod.rs b/applets/cosmic-applet-workspaces/src/window/mod.rs index 4b0035b7..2adc9ae1 100644 --- a/applets/cosmic-applet-workspaces/src/window/mod.rs +++ b/applets/cosmic-applet-workspaces/src/window/mod.rs @@ -32,7 +32,7 @@ impl CosmicWorkspacesWindow { ..set_height_request(1); ..set_decorated(false); ..set_resizable(false); - ..set_title(Some(&fl!("cosmic-app-list"))); + ..set_title(Some(&fl!("cosmic-applet-workspaces"))); ..add_css_class("transparent"); }; let config = CosmicPanelConfig::load_from_env().unwrap_or_default(); diff --git a/applets/cosmic-panel-button/src/apps_window/mod.rs b/applets/cosmic-panel-button/src/apps_window/mod.rs index c8d35329..4f8c2e03 100644 --- a/applets/cosmic-panel-button/src/apps_window/mod.rs +++ b/applets/cosmic-panel-button/src/apps_window/mod.rs @@ -54,16 +54,16 @@ impl CosmicPanelAppButtonWindow { container.append(&image); app_button.set_child(Some(&container)); - dbg!(apps_desktop_info.string("Exec").unwrap().as_str()); + let app_id = app_desktop_file_name.to_string(); app_button.connect_clicked(move |_| { let _ = Command::new("xdg-shell-wrapper") .env_remove("WAYLAND_SOCKET") - .arg(apps_desktop_info.string("Exec").unwrap().as_str()) + .arg(&app_id) .spawn(); }); self_.set_child(Some(&app_button)); } else { - panic!("Requested application is not installed"); + panic!("{} is not installed", app_desktop_file_name); } self_ diff --git a/rust-toolchain b/rust-toolchain index 4213d88d..2bf5ad04 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -1.61 +stable