chore: align applets with local stack
This commit is contained in:
parent
bcc8072a3b
commit
82e00a3e16
37 changed files with 292 additions and 440 deletions
559
Cargo.lock
generated
559
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
50
Cargo.toml
50
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"] }
|
||||
|
||||
[profile.release]
|
||||
|
|
@ -81,12 +81,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" }
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"] }
|
||||
|
|
|
|||
|
|
@ -435,6 +435,7 @@ pub enum PopupType {
|
|||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
#[allow(dead_code)]
|
||||
enum Message {
|
||||
Wayland(WaylandUpdate),
|
||||
PinApp(u32),
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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
|
||||
mpris2-zbus = { git = "https://github.com/pop-os/dbus-settings-bindings" }
|
||||
# mpris2-zbus = { path = "../../dbus-settings-bindings/mpris2" }
|
||||
rust-embed.workspace = true
|
||||
|
|
@ -21,5 +21,4 @@ urlencoding = "2.1.3"
|
|||
zbus.workspace = true
|
||||
|
||||
[dependencies.cosmic-settings-sound-subscription]
|
||||
git = "https://github.com/pop-os/cosmic-settings"
|
||||
# path = "../../cosmic-settings/subscriptions/sound"
|
||||
path = "../../cosmic-settings/subscriptions/sound"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ use cosmic::iced::core::Point;
|
|||
|
||||
use cosmic::iced::core::{
|
||||
Clipboard, Element, Layout, Length, Rectangle, Shell, Size, Widget,
|
||||
event::{self, Event},
|
||||
event::Event,
|
||||
layout, mouse, overlay, renderer, touch,
|
||||
widget::{Operation, Tree, tree},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ use cosmic_settings_upower_subscription::{
|
|||
};
|
||||
|
||||
use rustc_hash::FxHashMap;
|
||||
use std::{path::PathBuf, sync::LazyLock, time::Duration};
|
||||
use std::{path::PathBuf, time::Duration};
|
||||
use tokio::sync::mpsc::UnboundedSender;
|
||||
|
||||
// XXX improve
|
||||
|
|
@ -172,6 +172,7 @@ impl CosmicBatteryApplet {
|
|||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
#[allow(dead_code)]
|
||||
enum Message {
|
||||
TogglePopup,
|
||||
CloseRequested(window::Id),
|
||||
|
|
@ -511,7 +512,7 @@ impl cosmic::Application for CosmicBatteryApplet {
|
|||
Task::none()
|
||||
}
|
||||
|
||||
fn view(&self) -> Element<Message> {
|
||||
fn view(&self) -> Element<'_, Message> {
|
||||
let is_horizontal = match self.core.applet.anchor {
|
||||
PanelAnchor::Top | PanelAnchor::Bottom => true,
|
||||
PanelAnchor::Left | PanelAnchor::Right => false,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ use cosmic::{
|
|||
widget::{button, divider, icon, 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,
|
||||
} => {
|
||||
|
|
|
|||
|
|
@ -149,8 +149,6 @@ pub fn bluetooth_subscription<I: 'static + Hash + Copy + Send + Sync + Debug>(
|
|||
},
|
||||
|
||||
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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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" }
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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<cosmic::widget::Id> =
|
||||
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<window::Id>,
|
||||
token_tx: Option<calloop::channel::Sender<TokenRequest>>,
|
||||
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(),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ use cosmic::{
|
|||
iced::{
|
||||
self, Length, Subscription,
|
||||
platform_specific::shell::commands::popup::{destroy_popup, get_popup},
|
||||
theme::Style,
|
||||
window,
|
||||
},
|
||||
surface,
|
||||
|
|
@ -25,6 +24,7 @@ use crate::{
|
|||
};
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
#[allow(dead_code)]
|
||||
pub enum Msg {
|
||||
None,
|
||||
Activate(usize),
|
||||
|
|
@ -577,7 +577,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;
|
||||
|
|
|
|||
|
|
@ -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};
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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" }
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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<Message> {
|
||||
fn time_subscription(mut show_seconds: watch::Receiver<bool>) -> Subscription<Message> {
|
||||
fn time_subscription(show_seconds: watch::Receiver<bool>) -> Subscription<Message> {
|
||||
struct Wrapper {
|
||||
inner: watch::Receiver<bool>,
|
||||
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<Message>| async move {
|
||||
// Mark this receiver's state as changed so that it always receives an initial
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@ impl IcedWorkspacesApplet {
|
|||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
#[allow(dead_code)]
|
||||
enum Message {
|
||||
WorkspaceUpdate(WorkspacesUpdate),
|
||||
WorkspacePressed(ExtWorkspaceHandleV1),
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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) =
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
[toolchain]
|
||||
channel = "1.93"
|
||||
channel = "1.93.0"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue