From b4fbfe168a6714c63e161df3e415cc44b1dd6183 Mon Sep 17 00:00:00 2001 From: Lionel DARNIS Date: Sat, 23 May 2026 20:49:24 +0200 Subject: [PATCH] chore: align applets with local stack --- Cargo.toml | 50 ++++++++++++++++--- cosmic-app-list/Cargo.toml | 2 +- .../cosmic-app-list-config/Cargo.toml | 2 +- cosmic-app-list/src/app.rs | 1 + cosmic-applet-a11y/Cargo.toml | 8 ++- cosmic-applet-a11y/src/app.rs | 4 +- cosmic-applet-a11y/src/backend/wayland/mod.rs | 5 +- cosmic-applet-audio/Cargo.toml | 4 +- cosmic-applet-battery/Cargo.toml | 8 ++- cosmic-applet-battery/src/app.rs | 3 +- cosmic-applet-bluetooth/Cargo.toml | 2 +- cosmic-applet-bluetooth/src/app.rs | 5 +- cosmic-applet-bluetooth/src/bluetooth.rs | 3 +- cosmic-applet-input-sources/Cargo.toml | 2 +- cosmic-applet-input-sources/src/lib.rs | 5 +- cosmic-applet-minimize/Cargo.toml | 2 +- cosmic-applet-minimize/src/lib.rs | 4 +- cosmic-applet-network/Cargo.toml | 5 +- cosmic-applet-notifications/Cargo.toml | 2 +- cosmic-applet-power/Cargo.toml | 2 +- cosmic-applet-power/src/lib.rs | 9 +--- cosmic-applet-status-area/Cargo.toml | 2 +- .../src/components/app.rs | 3 +- .../src/components/status_menu.rs | 2 +- .../src/status_notifier_watcher.rs | 9 ++-- cosmic-applet-tiling/Cargo.toml | 2 +- cosmic-applet-tiling/src/window.rs | 3 +- cosmic-applet-time/Cargo.toml | 2 +- cosmic-applet-time/src/window.rs | 5 +- cosmic-applet-workspaces/Cargo.toml | 2 +- .../src/components/app.rs | 1 + cosmic-applets/Cargo.toml | 2 +- cosmic-panel-button/Cargo.toml | 2 +- cosmic-panel-button/src/lib.rs | 2 +- rust-toolchain.toml | 2 +- 35 files changed, 96 insertions(+), 71 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f97b6b28..40471449 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,11 +25,11 @@ resolver = "3" [workspace.dependencies] anyhow = "1.0.102" -cctk = { git = "https://github.com/pop-os/cosmic-protocols", package = "cosmic-client-toolkit", rev = "d0e95be" } +cctk = { package = "cosmic-client-toolkit", path = "../cosmic-protocols/client-toolkit" } cosmic-applets-config = { path = "cosmic-applets-config" } -cosmic-protocols = { git = "https://github.com/pop-os/cosmic-protocols", default-features = false, features = [ +cosmic-protocols = { path = "../cosmic-protocols", default-features = false, features = [ "client", -], rev = "d0e95be" } +]} futures = "0.3" futures-util = "0.3" @@ -38,7 +38,7 @@ i18n-embed = { version = "0.16.0", features = [ "desktop-requester", ] } i18n-embed-fl = "0.10" -libcosmic = { git = "https://github.com/pop-os/libcosmic", default-features = false, features = [ +cosmic = { package = "libcosmic-yoda", path = "../libcosmic", default-features = false, features = [ "applet", "applet-token", "dbus-config", @@ -58,7 +58,7 @@ tracing-subscriber = { version = "0.3.22", features = ["env-filter"] } tracing-log = "0.2.0" tokio = { version = "1.49.0", features = ["full"] } # cosmic-config = { path = "../libcosmic/cosmic-config" } -cosmic-config = { git = "https://github.com/pop-os/libcosmic" } +cosmic-config = { path = "../libcosmic/cosmic-config" } serde = { version = "1.0.228", features = ["derive"] } zlink = "0.5.0" @@ -82,12 +82,48 @@ ignored = ["libcosmic"] # winit = { git = "https://github.com/rust-windowing/winit.git", rev = "241b7a80bba96c91fa3901729cd5dec66abb9be4" } # winit = { path = "../winit" } +[patch."https://github.com/pop-os/libcosmic"] +cosmic-config = { path = "/home/lionel/Projets/COSMIC/libcosmic/cosmic-config" } +cosmic-theme = { path = "/home/lionel/Projets/COSMIC/libcosmic/cosmic-theme" } +iced = { path = "/home/lionel/Projets/COSMIC/libcosmic/iced" } +iced_accessibility = { path = "/home/lionel/Projets/COSMIC/libcosmic/iced/accessibility" } +iced_core = { path = "/home/lionel/Projets/COSMIC/libcosmic/iced/core" } +iced_futures = { path = "/home/lionel/Projets/COSMIC/libcosmic/iced/futures" } +iced_graphics = { path = "/home/lionel/Projets/COSMIC/libcosmic/iced/graphics" } +iced_renderer = { path = "/home/lionel/Projets/COSMIC/libcosmic/iced/renderer" } +iced_runtime = { path = "/home/lionel/Projets/COSMIC/libcosmic/iced/runtime" } +iced_tiny_skia = { path = "/home/lionel/Projets/COSMIC/libcosmic/iced/tiny_skia" } +iced_wgpu = { path = "/home/lionel/Projets/COSMIC/libcosmic/iced/wgpu" } +iced_widget = { path = "/home/lionel/Projets/COSMIC/libcosmic/iced/widget" } +iced_winit = { path = "/home/lionel/Projets/COSMIC/libcosmic/iced/winit" } + [patch."https://github.com/smithay/client-toolkit.git"] sctk = { package = "smithay-client-toolkit", version = "0.20.0" } [patch."https://github.com/pop-os/cosmic-protocols"] -cosmic-protocols = { git = "https://github.com/pop-os/cosmic-protocols//", branch = "main" } -cosmic-client-toolkit = { git = "https://github.com/pop-os/cosmic-protocols//", branch = "main" } +cosmic-protocols = { path = "/home/lionel/Projets/COSMIC/cosmic-protocols" } +cosmic-client-toolkit = { path = "/home/lionel/Projets/COSMIC/cosmic-protocols/client-toolkit" } + +[patch."https://github.com/pop-os/cosmic-panel"] +cosmic-panel-config = { path = "/home/lionel/Projets/COSMIC/cosmic-panel/cosmic-panel-config" } +xdg-shell-wrapper-config = { path = "/home/lionel/Projets/COSMIC/cosmic-panel/xdg-shell-wrapper-config" } + +[patch."https://github.com/pop-os/cosmic-notifications"] +cosmic-notifications-config = { path = "/home/lionel/Projets/COSMIC/cosmic-notifications/cosmic-notifications-config" } +cosmic-notifications-util = { path = "/home/lionel/Projets/COSMIC/cosmic-notifications/cosmic-notifications-util" } + +[patch."https://github.com/pop-os/cosmic-settings"] +cosmic-settings-a11y-manager-subscription = { path = "/home/lionel/Projets/COSMIC/cosmic-settings/subscriptions/a11y-manager" } +cosmic-settings-accessibility-subscription = { path = "/home/lionel/Projets/COSMIC/cosmic-settings/subscriptions/accessibility" } +cosmic-settings-airplane-mode-subscription = { path = "/home/lionel/Projets/COSMIC/cosmic-settings/subscriptions/airplane-mode" } +cosmic-settings-daemon-subscription = { path = "/home/lionel/Projets/COSMIC/cosmic-settings/subscriptions/settings-daemon" } +cosmic-settings-network-manager-subscription = { path = "/home/lionel/Projets/COSMIC/cosmic-settings/subscriptions/network-manager" } +cosmic-settings-sound-subscription = { path = "/home/lionel/Projets/COSMIC/cosmic-settings/subscriptions/sound" } +cosmic-settings-upower-subscription = { path = "/home/lionel/Projets/COSMIC/cosmic-settings/subscriptions/upower" } + +[patch."https://github.com/pop-os/cosmic-settings/"] +cosmic-settings-airplane-mode-subscription = { path = "/home/lionel/Projets/COSMIC/cosmic-settings/subscriptions/airplane-mode" } +cosmic-settings-network-manager-subscription = { path = "/home/lionel/Projets/COSMIC/cosmic-settings/subscriptions/network-manager" } # [patch.'https://github.com/pop-os/dbus-settings-bindings'] # cosmic-dbus-networkmanager = { path = "../dbus-settings-bindings/networkmanager" } diff --git a/cosmic-app-list/Cargo.toml b/cosmic-app-list/Cargo.toml index 499d9f30..88c20a9a 100644 --- a/cosmic-app-list/Cargo.toml +++ b/cosmic-app-list/Cargo.toml @@ -13,7 +13,7 @@ futures.workspace = true i18n-embed.workspace = true i18n-embed-fl.workspace = true image = { version = "0.25.9", default-features = false } -libcosmic.workspace = true +cosmic.workspace = true memmap2 = "0.9.10" fastrand = "2.3.0" rust-embed.workspace = true diff --git a/cosmic-app-list/cosmic-app-list-config/Cargo.toml b/cosmic-app-list/cosmic-app-list-config/Cargo.toml index 86b302ef..0d5a21d7 100644 --- a/cosmic-app-list/cosmic-app-list-config/Cargo.toml +++ b/cosmic-app-list/cosmic-app-list-config/Cargo.toml @@ -6,5 +6,5 @@ edition = "2024" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -libcosmic.workspace = true +cosmic.workspace = true serde = { workspace = true, features = ["derive"] } diff --git a/cosmic-app-list/src/app.rs b/cosmic-app-list/src/app.rs index d4d579a1..bfb6b193 100755 --- a/cosmic-app-list/src/app.rs +++ b/cosmic-app-list/src/app.rs @@ -435,6 +435,7 @@ pub enum PopupType { } #[derive(Debug, Clone)] +#[allow(dead_code)] enum Message { Wayland(WaylandUpdate), PinApp(u32), diff --git a/cosmic-applet-a11y/Cargo.toml b/cosmic-applet-a11y/Cargo.toml index f7e3e50f..711b4ec6 100644 --- a/cosmic-applet-a11y/Cargo.toml +++ b/cosmic-applet-a11y/Cargo.toml @@ -9,7 +9,7 @@ cctk.workspace = true cosmic-protocols.workspace = true i18n-embed-fl.workspace = true i18n-embed.workspace = true -libcosmic.workspace = true +cosmic.workspace = true rust-embed.workspace = true tokio.workspace = true tracing-log.workspace = true @@ -17,9 +17,7 @@ tracing-subscriber.workspace = true tracing.workspace = true [dependencies.cosmic-settings-a11y-manager-subscription] -git = "https://github.com/pop-os/cosmic-settings" -# path = "../../cosmic-settings/subscriptions/a11y-manager" +path = "../../cosmic-settings/subscriptions/a11y-manager" [dependencies.cosmic-settings-accessibility-subscription] -git = "https://github.com/pop-os/cosmic-settings" -# path = "../../cosmic-settings/subscriptions/accessibility" +path = "../../cosmic-settings/subscriptions/accessibility" diff --git a/cosmic-applet-a11y/src/app.rs b/cosmic-applet-a11y/src/app.rs index ad5f2a1e..6a328339 100644 --- a/cosmic-applet-a11y/src/app.rs +++ b/cosmic-applet-a11y/src/app.rs @@ -26,10 +26,9 @@ use cosmic::{ }; use cosmic_settings_a11y_manager_subscription::{ - self as cosmic_a11y_manager, AccessibilityEvent, AccessibilityRequest, ColorFilter, + AccessibilityEvent, AccessibilityRequest, ColorFilter, }; use cosmic_settings_accessibility_subscription::{self as accessibility}; -use std::sync::LazyLock; use tokio::sync::mpsc::UnboundedSender; pub fn run() -> cosmic::iced::Result { @@ -52,6 +51,7 @@ struct CosmicA11yApplet { } #[derive(Debug, Clone)] +#[allow(dead_code)] enum Message { TogglePopup, CloseRequested(window::Id), diff --git a/cosmic-applet-a11y/src/backend/wayland/mod.rs b/cosmic-applet-a11y/src/backend/wayland/mod.rs index fa9796f0..12340588 100644 --- a/cosmic-applet-a11y/src/backend/wayland/mod.rs +++ b/cosmic-applet-a11y/src/backend/wayland/mod.rs @@ -2,13 +2,12 @@ // SPDX-License-Identifier: GPL-3.0-only use anyhow; -use cctk::sctk::reexports::calloop::{self, channel::SyncSender}; +use cctk::sctk::reexports::calloop::{self}; use cosmic::iced::{ self, Subscription, - futures::{self, SinkExt, StreamExt, channel::mpsc}, + futures::{self, SinkExt}, stream, }; -use cosmic_protocols::a11y::v1::client::cosmic_a11y_manager_v1::Filter; use cosmic_settings_a11y_manager_subscription::{ self as thread, AccessibilityEvent, AccessibilityRequest, }; diff --git a/cosmic-applet-audio/Cargo.toml b/cosmic-applet-audio/Cargo.toml index c47da57b..dae49747 100644 --- a/cosmic-applet-audio/Cargo.toml +++ b/cosmic-applet-audio/Cargo.toml @@ -8,7 +8,7 @@ license = "GPL-3.0-only" futures.workspace = true i18n-embed-fl.workspace = true i18n-embed.workspace = true -libcosmic.workspace = true +cosmic.workspace = true mpris2-zbus = { git = "https://github.com/pop-os/dbus-settings-bindings" } rust-embed.workspace = true serde.workspace = true @@ -23,5 +23,5 @@ zlink.workspace = true intmap = "3.1.3" [dependencies.cosmic-settings-audio-client] -git = "https://github.com/pop-os/cosmic-settings-daemon" +path = "../../cosmic-settings-daemon/audio-client" features = ["codec"] diff --git a/cosmic-applet-battery/Cargo.toml b/cosmic-applet-battery/Cargo.toml index 8c8f6e1d..3310f8fa 100644 --- a/cosmic-applet-battery/Cargo.toml +++ b/cosmic-applet-battery/Cargo.toml @@ -12,7 +12,7 @@ drm = "0.14.1" futures.workspace = true i18n-embed-fl.workspace = true i18n-embed.workspace = true -libcosmic.workspace = true +cosmic.workspace = true rust-embed.workspace = true rustc-hash.workspace = true tokio.workspace = true @@ -24,9 +24,7 @@ zbus.workspace = true serde.workspace = true [dependencies.cosmic-settings-upower-subscription] -git = "https://github.com/pop-os/cosmic-settings" -# path = "../../cosmic-settings/subscriptions/upower" +path = "../../cosmic-settings/subscriptions/upower" [dependencies.cosmic-settings-daemon-subscription] -git = "https://github.com/pop-os/cosmic-settings" -# path = "../../cosmic-settings/subscriptions/settings-daemon" +path = "../../cosmic-settings/subscriptions/settings-daemon" diff --git a/cosmic-applet-battery/src/app.rs b/cosmic-applet-battery/src/app.rs index c210d51a..22d9e6cc 100644 --- a/cosmic-applet-battery/src/app.rs +++ b/cosmic-applet-battery/src/app.rs @@ -186,6 +186,7 @@ impl CosmicBatteryApplet { } #[derive(Debug, Clone)] +#[allow(dead_code)] enum Message { TogglePopup, CloseRequested(window::Id), @@ -525,7 +526,7 @@ impl cosmic::Application for CosmicBatteryApplet { Task::none() } - fn view(&self) -> Element { + fn view(&self) -> Element<'_, Message> { let is_horizontal = match self.core.applet.anchor { PanelAnchor::Top | PanelAnchor::Bottom => true, PanelAnchor::Left | PanelAnchor::Right => false, diff --git a/cosmic-applet-bluetooth/Cargo.toml b/cosmic-applet-bluetooth/Cargo.toml index e2108576..1ee209ee 100644 --- a/cosmic-applet-bluetooth/Cargo.toml +++ b/cosmic-applet-bluetooth/Cargo.toml @@ -10,7 +10,7 @@ bluer = { version = "0.17", features = ["bluetoothd", "id"] } futures.workspace = true i18n-embed-fl.workspace = true i18n-embed.workspace = true -libcosmic.workspace = true +cosmic.workspace = true fastrand = "2.3.0" rust-embed.workspace = true rustc-hash.workspace = true diff --git a/cosmic-applet-bluetooth/src/app.rs b/cosmic-applet-bluetooth/src/app.rs index e27af8ef..484b8bf3 100644 --- a/cosmic-applet-bluetooth/src/app.rs +++ b/cosmic-applet-bluetooth/src/app.rs @@ -24,7 +24,7 @@ use cosmic::{ widget::{button, divider, icon, indeterminate_circular, scrollable, text}, }; use futures::FutureExt; -use std::{collections::HashMap, sync::LazyLock, time::Duration}; +use std::{collections::HashMap, time::Duration}; use tokio::sync::mpsc::Sender; use crate::{ @@ -63,6 +63,7 @@ impl CosmicBluetoothApplet { } #[derive(Debug, Clone)] +#[allow(dead_code)] enum Message { TogglePopup, CloseRequested(window::Id), @@ -145,7 +146,7 @@ impl cosmic::Application for CosmicBluetoothApplet { } Message::BluetoothEvent(e) => match e { BluerEvent::RequestResponse { - req, + req: _, state, err_msg, } => { diff --git a/cosmic-applet-bluetooth/src/bluetooth.rs b/cosmic-applet-bluetooth/src/bluetooth.rs index 5184aa6a..3a859932 100644 --- a/cosmic-applet-bluetooth/src/bluetooth.rs +++ b/cosmic-applet-bluetooth/src/bluetooth.rs @@ -149,8 +149,6 @@ pub fn bluetooth_subscription( }, BluerSessionEvent::AgentEvent(e) => BluerEvent::AgentEvent(e), - - _ => return, }; _ = output.send(message).await; @@ -199,6 +197,7 @@ pub enum BluerRequest { } #[derive(Debug, Clone)] +#[allow(dead_code)] pub enum BluerEvent { RequestResponse { req: BluerRequest, diff --git a/cosmic-applet-input-sources/Cargo.toml b/cosmic-applet-input-sources/Cargo.toml index 8fdb1dd9..6895d7fe 100644 --- a/cosmic-applet-input-sources/Cargo.toml +++ b/cosmic-applet-input-sources/Cargo.toml @@ -8,7 +8,7 @@ license = "GPL-3.0-only" cosmic-comp-config = { git = "https://github.com/pop-os/cosmic-comp.git", rev = "5eb5af4" } i18n-embed-fl.workspace = true i18n-embed.workspace = true -libcosmic.workspace = true +cosmic.workspace = true rust-embed.workspace = true tokio.workspace = true tracing-log.workspace = true diff --git a/cosmic-applet-input-sources/src/lib.rs b/cosmic-applet-input-sources/src/lib.rs index 93e84283..2c845de1 100644 --- a/cosmic-applet-input-sources/src/lib.rs +++ b/cosmic-applet-input-sources/src/lib.rs @@ -3,7 +3,6 @@ mod localize; -use cosmic::iced::{Alignment, Length}; use cosmic::{ app, app::Core, @@ -14,16 +13,14 @@ use cosmic::{ iced::{ Rectangle, Task, platform_specific::shell::commands::popup::{destroy_popup, get_popup}, - widget::{column, row}, window::Id, }, - iced::{core::window, runtime::Appearance}, + iced::core::window, prelude::*, surface, theme, widget::{ self, autosize, rectangle_tracker::{RectangleTracker, RectangleUpdate, rectangle_tracker_subscription}, - space, }, }; use cosmic_comp_config::CosmicCompConfig; diff --git a/cosmic-applet-minimize/Cargo.toml b/cosmic-applet-minimize/Cargo.toml index bd564bdf..29ee2c8e 100644 --- a/cosmic-applet-minimize/Cargo.toml +++ b/cosmic-applet-minimize/Cargo.toml @@ -9,7 +9,7 @@ anyhow.workspace = true i18n-embed-fl.workspace = true i18n-embed.workspace = true image = { version = "0.25.9", default-features = false } -libcosmic.workspace = true +cosmic.workspace = true memmap2 = "0.9.10" rust-embed.workspace = true rustix.workspace = true diff --git a/cosmic-applet-minimize/src/lib.rs b/cosmic-applet-minimize/src/lib.rs index e40a7551..307762b5 100644 --- a/cosmic-applet-minimize/src/lib.rs +++ b/cosmic-applet-minimize/src/lib.rs @@ -316,7 +316,7 @@ impl cosmic::Application for Minimize { } else { (cross_padding, major_padding) }; - let theme = self.core.system_theme().cosmic(); + let _theme = self.core.system_theme().cosmic(); let icon_buttons = self.apps[..max_icon_count].iter().map(|app| { self.core .applet @@ -420,7 +420,7 @@ impl cosmic::Application for Minimize { (cross_padding, major_padding) }; let theme = self.core.system_theme().cosmic(); - let space_xxs = theme.space_xxs(); + let _space_xxs = theme.space_xxs(); let icon_buttons = self.apps[max_icon_count..].iter().map(|app| { tooltip( Element::from(crate::window_image::WindowImage::new( diff --git a/cosmic-applet-network/Cargo.toml b/cosmic-applet-network/Cargo.toml index 3ba86f2b..4129a279 100644 --- a/cosmic-applet-network/Cargo.toml +++ b/cosmic-applet-network/Cargo.toml @@ -12,7 +12,7 @@ futures.workspace = true futures-util.workspace = true i18n-embed-fl.workspace = true i18n-embed.workspace = true -libcosmic = { workspace = true, features = [ +cosmic = { workspace = true, features = [ "applet", "applet-token", "tokio", @@ -34,5 +34,4 @@ nmrs = "3.1.3" [dependencies.cosmic-settings-network-manager-subscription] -git = "https://github.com/pop-os/cosmic-settings/" -# path = "../../cosmic-settings/subscriptions/network-manager" +path = "../../cosmic-settings/subscriptions/network-manager" diff --git a/cosmic-applet-notifications/Cargo.toml b/cosmic-applet-notifications/Cargo.toml index 2e472b24..91752579 100644 --- a/cosmic-applet-notifications/Cargo.toml +++ b/cosmic-applet-notifications/Cargo.toml @@ -8,7 +8,7 @@ license = "GPL-3.0-only" cosmic-notifications-util = { git = "https://github.com/pop-os/cosmic-notifications" } cosmic-notifications-config = { git = "https://github.com/pop-os/cosmic-notifications" } anyhow.workspace = true -libcosmic.workspace = true +cosmic.workspace = true tokio.workspace = true # cosmic-notifications-util = { path = "../../cosmic-notifications-daemon/cosmic-notifications-util" } # cosmic-notifications-config = { path = "../../cosmic-notifications-daemon/cosmic-notifications-config" } diff --git a/cosmic-applet-power/Cargo.toml b/cosmic-applet-power/Cargo.toml index 693692e0..85f520f9 100644 --- a/cosmic-applet-power/Cargo.toml +++ b/cosmic-applet-power/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0-only" [dependencies] i18n-embed-fl.workspace = true i18n-embed.workspace = true -libcosmic.workspace = true +cosmic.workspace = true logind-zbus = "5.3.2" rust-embed.workspace = true rustix.workspace = true diff --git a/cosmic-applet-power/src/lib.rs b/cosmic-applet-power/src/lib.rs index 67725fbc..4a5829df 100644 --- a/cosmic-applet-power/src/lib.rs +++ b/cosmic-applet-power/src/lib.rs @@ -16,9 +16,8 @@ use cosmic::{ window, }, surface, theme, - widget::{Space, button, divider, icon, space, text}, + widget::{button, divider, icon, space, text}, }; -use std::sync::LazyLock; use logind_zbus::{ manager::ManagerProxy, @@ -35,9 +34,6 @@ pub mod session_manager; use crate::{cosmic_session::CosmicSessionProxy, session_manager::SessionManagerProxy}; -static SUBSURFACE_ID: LazyLock = - LazyLock::new(|| cosmic::widget::Id::new("subsurface")); - pub fn run() -> cosmic::iced::Result { localize::localize(); @@ -49,7 +45,6 @@ struct Power { icon_name: String, popup: Option, token_tx: Option>, - subsurface_id: window::Id, } #[derive(Debug, Clone, Copy)] @@ -75,6 +70,7 @@ impl PowerAction { } #[derive(Debug, Clone)] +#[allow(dead_code)] enum Message { Action(PowerAction), TogglePopup, @@ -104,7 +100,6 @@ impl cosmic::Application for Power { Self { core, icon_name: "system-shutdown-symbolic".to_string(), - subsurface_id: window::Id::unique(), token_tx: None, popup: Option::default(), }, diff --git a/cosmic-applet-status-area/Cargo.toml b/cosmic-applet-status-area/Cargo.toml index d643f70d..d96913ab 100644 --- a/cosmic-applet-status-area/Cargo.toml +++ b/cosmic-applet-status-area/Cargo.toml @@ -6,7 +6,7 @@ license = "GPL-3.0-only" [dependencies] futures.workspace = true -libcosmic.workspace = true +cosmic.workspace = true serde.workspace = true rustc-hash.workspace = true tokio.workspace = true diff --git a/cosmic-applet-status-area/src/components/app.rs b/cosmic-applet-status-area/src/components/app.rs index 3ad8c6ff..081dfe06 100644 --- a/cosmic-applet-status-area/src/components/app.rs +++ b/cosmic-applet-status-area/src/components/app.rs @@ -28,6 +28,7 @@ use crate::{ }; #[derive(Clone, Debug)] +#[allow(dead_code)] pub enum Msg { None, Activate(usize), @@ -637,7 +638,7 @@ fn menu_icon_button<'a>( let icon = menu.icon_handle().clone(); let theme = cosmic::theme::active(); - let theme = theme.cosmic(); + let _theme = theme.cosmic(); let suggested = applet.suggested_size(true); let padding = applet.suggested_padding(true).1; diff --git a/cosmic-applet-status-area/src/components/status_menu.rs b/cosmic-applet-status-area/src/components/status_menu.rs index e706f37b..6aa0953c 100644 --- a/cosmic-applet-status-area/src/components/status_menu.rs +++ b/cosmic-applet-status-area/src/components/status_menu.rs @@ -8,7 +8,7 @@ use cosmic::{ iced, widget::icon::{self, IconFallback}, }; -use std::path::{Path, PathBuf}; +use std::path::Path; use crate::subscriptions::status_notifier_item::{IconUpdate, Layout, StatusNotifierItem}; diff --git a/cosmic-applet-status-area/src/status_notifier_watcher.rs b/cosmic-applet-status-area/src/status_notifier_watcher.rs index 1bb75d79..5c8b6175 100644 --- a/cosmic-applet-status-area/src/status_notifier_watcher.rs +++ b/cosmic-applet-status-area/src/status_notifier_watcher.rs @@ -10,21 +10,18 @@ //! can be socket-activated and not conflict with anything else running as a status notifier //! watcher. //! -//! The daemon runs as long as as there is at least one client still connected. Which it checks -//! for every `REFRESH_INTERVAL`. +//! The daemon runs as long as there is at least one client still connected. use crate::subscriptions::status_notifier_watcher::server::create_service; use crate::unique_names::UniqueNames; use futures::StreamExt; -use std::{collections::HashSet, time::Duration}; +use std::collections::HashSet; use zbus::fdo; use zbus::message::Header; const DBUS_NAME: &str = "com.system76.CosmicStatusNotifierWatcher"; const OBJECT_PATH: &str = "/CosmicStatusNotifierWatcher"; -const REFRESH_INTERVAL: Duration = Duration::from_secs(60); - /// Run daemon pub fn run() -> cosmic::iced::Result { if let Err(err) = run_inner() { @@ -42,7 +39,7 @@ pub async fn cosmic_register(conn: &zbus::Connection) -> zbus::Result<()> { tokio::spawn(async move { while let Some(value) = stream.next().await { if let Some(_unique_name) = value { - /// Register with new owner + // Register with new owner. let _ = cosmic_watcher.register_applet().await; } } diff --git a/cosmic-applet-tiling/Cargo.toml b/cosmic-applet-tiling/Cargo.toml index 2ce1c452..2c245ddf 100644 --- a/cosmic-applet-tiling/Cargo.toml +++ b/cosmic-applet-tiling/Cargo.toml @@ -5,7 +5,7 @@ edition = "2024" license = "GPL-3.0-only" [dependencies] -libcosmic.workspace = true +cosmic.workspace = true anyhow.workspace = true cctk.workspace = true cosmic-comp-config = { git = "https://github.com/pop-os/cosmic-comp.git", rev = "5eb5af4" } diff --git a/cosmic-applet-tiling/src/window.rs b/cosmic-applet-tiling/src/window.rs index 327d5d75..7da430e3 100644 --- a/cosmic-applet-tiling/src/window.rs +++ b/cosmic-applet-tiling/src/window.rs @@ -26,7 +26,7 @@ use cosmic::{ }; use cosmic_comp_config::{CosmicCompConfig, TileBehavior}; use cosmic_protocols::workspace::v2::client::zcosmic_workspace_handle_v2::TilingState; -use std::{thread, time::Instant}; +use std::thread; use tracing::error; const ID: &str = "com.system76.CosmicAppletTiling"; @@ -46,6 +46,7 @@ pub struct Window { } #[derive(Clone, Debug)] +#[allow(dead_code)] pub enum Message { TogglePopup, PopupClosed(Id), diff --git a/cosmic-applet-time/Cargo.toml b/cosmic-applet-time/Cargo.toml index a6ca4dfd..a8713231 100644 --- a/cosmic-applet-time/Cargo.toml +++ b/cosmic-applet-time/Cargo.toml @@ -9,7 +9,7 @@ cosmic-applets-config.workspace = true jiff = "0.2" i18n-embed-fl.workspace = true i18n-embed.workspace = true -libcosmic.workspace = true +cosmic.workspace = true rust-embed.workspace = true tokio.workspace = true tracing-log.workspace = true diff --git a/cosmic-applet-time/src/window.rs b/cosmic-applet-time/src/window.rs index a44d81ee..ddd37d31 100644 --- a/cosmic-applet-time/src/window.rs +++ b/cosmic-applet-time/src/window.rs @@ -94,6 +94,7 @@ pub struct Window { } #[derive(Debug, Clone)] +#[allow(dead_code)] pub enum Message { TogglePopup, CloseRequested(window::Id), @@ -361,7 +362,7 @@ impl cosmic::Application for Window { } fn subscription(&self) -> Subscription { - fn time_subscription(mut show_seconds: watch::Receiver) -> Subscription { + fn time_subscription(show_seconds: watch::Receiver) -> Subscription { struct Wrapper { inner: watch::Receiver, id: &'static str, @@ -376,7 +377,7 @@ impl cosmic::Application for Window { inner: show_seconds, id: "time-sub", }, - |Wrapper { inner, id }| { + |Wrapper { inner, id: _ }| { let mut show_seconds = inner.clone(); stream::channel(1, move |mut output: mpsc::Sender| async move { // Mark this receiver's state as changed so that it always receives an initial diff --git a/cosmic-applet-workspaces/Cargo.toml b/cosmic-applet-workspaces/Cargo.toml index 857b668d..103680e2 100644 --- a/cosmic-applet-workspaces/Cargo.toml +++ b/cosmic-applet-workspaces/Cargo.toml @@ -6,7 +6,7 @@ edition = "2024" license = "GPL-3.0-only" [dependencies] -libcosmic.workspace = true +cosmic.workspace = true cctk.workspace = true tracing.workspace = true tracing-subscriber.workspace = true diff --git a/cosmic-applet-workspaces/src/components/app.rs b/cosmic-applet-workspaces/src/components/app.rs index dc4ccdc4..a9bafb79 100644 --- a/cosmic-applet-workspaces/src/components/app.rs +++ b/cosmic-applet-workspaces/src/components/app.rs @@ -84,6 +84,7 @@ impl IcedWorkspacesApplet { } #[derive(Debug, Clone)] +#[allow(dead_code)] enum Message { WorkspaceUpdate(WorkspacesUpdate), WorkspacePressed(ExtWorkspaceHandleV1), diff --git a/cosmic-applets/Cargo.toml b/cosmic-applets/Cargo.toml index c2129dff..f204a80c 100644 --- a/cosmic-applets/Cargo.toml +++ b/cosmic-applets/Cargo.toml @@ -23,7 +23,7 @@ cosmic-applet-time = { path = "../cosmic-applet-time" } cosmic-applet-workspaces = { path = "../cosmic-applet-workspaces" } cosmic-applet-input-sources = { path = "../cosmic-applet-input-sources" } cosmic-panel-button = { path = "../cosmic-panel-button" } -libcosmic.workspace = true +cosmic.workspace = true tracing.workspace = true tracing-subscriber.workspace = true tracing-log.workspace = true diff --git a/cosmic-panel-button/Cargo.toml b/cosmic-panel-button/Cargo.toml index 9fa73486..69074433 100644 --- a/cosmic-panel-button/Cargo.toml +++ b/cosmic-panel-button/Cargo.toml @@ -5,7 +5,7 @@ edition = "2024" license = "GPL-3.0-only" [dependencies] -libcosmic.workspace = true +cosmic.workspace = true rustc-hash.workspace = true tracing.workspace = true tracing-subscriber.workspace = true diff --git a/cosmic-panel-button/src/lib.rs b/cosmic-panel-button/src/lib.rs index 45ee1ca2..132e5dd5 100644 --- a/cosmic-panel-button/src/lib.rs +++ b/cosmic-panel-button/src/lib.rs @@ -48,7 +48,7 @@ impl Button { icon: cosmic::widget::icon::Handle, ) -> cosmic::widget::Button<'a, Message> { let theme = cosmic::theme::active(); - let theme = theme.cosmic(); + let _theme = theme.cosmic(); let suggested = self.core.applet.suggested_size(icon.symbolic); let (major_padding, applet_padding_minor_axis) = diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 79d20990..075062e5 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "1.93" +channel = "1.93.0"