chore: align applets with local stack
This commit is contained in:
parent
c117f172cb
commit
b4fbfe168a
35 changed files with 96 additions and 71 deletions
50
Cargo.toml
50
Cargo.toml
|
|
@ -25,11 +25,11 @@ resolver = "3"
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
anyhow = "1.0.102"
|
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-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",
|
"client",
|
||||||
], rev = "d0e95be" }
|
]}
|
||||||
|
|
||||||
futures = "0.3"
|
futures = "0.3"
|
||||||
futures-util = "0.3"
|
futures-util = "0.3"
|
||||||
|
|
@ -38,7 +38,7 @@ i18n-embed = { version = "0.16.0", features = [
|
||||||
"desktop-requester",
|
"desktop-requester",
|
||||||
] }
|
] }
|
||||||
i18n-embed-fl = "0.10"
|
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",
|
||||||
"applet-token",
|
"applet-token",
|
||||||
"dbus-config",
|
"dbus-config",
|
||||||
|
|
@ -58,7 +58,7 @@ tracing-subscriber = { version = "0.3.22", features = ["env-filter"] }
|
||||||
tracing-log = "0.2.0"
|
tracing-log = "0.2.0"
|
||||||
tokio = { version = "1.49.0", features = ["full"] }
|
tokio = { version = "1.49.0", features = ["full"] }
|
||||||
# cosmic-config = { path = "../libcosmic/cosmic-config" }
|
# 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"] }
|
serde = { version = "1.0.228", features = ["derive"] }
|
||||||
zlink = "0.5.0"
|
zlink = "0.5.0"
|
||||||
|
|
||||||
|
|
@ -82,12 +82,48 @@ ignored = ["libcosmic"]
|
||||||
# winit = { git = "https://github.com/rust-windowing/winit.git", rev = "241b7a80bba96c91fa3901729cd5dec66abb9be4" }
|
# winit = { git = "https://github.com/rust-windowing/winit.git", rev = "241b7a80bba96c91fa3901729cd5dec66abb9be4" }
|
||||||
# winit = { path = "../winit" }
|
# 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"]
|
[patch."https://github.com/smithay/client-toolkit.git"]
|
||||||
sctk = { package = "smithay-client-toolkit", version = "0.20.0" }
|
sctk = { package = "smithay-client-toolkit", version = "0.20.0" }
|
||||||
|
|
||||||
[patch."https://github.com/pop-os/cosmic-protocols"]
|
[patch."https://github.com/pop-os/cosmic-protocols"]
|
||||||
cosmic-protocols = { git = "https://github.com/pop-os/cosmic-protocols//", branch = "main" }
|
cosmic-protocols = { path = "/home/lionel/Projets/COSMIC/cosmic-protocols" }
|
||||||
cosmic-client-toolkit = { git = "https://github.com/pop-os/cosmic-protocols//", branch = "main" }
|
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']
|
# [patch.'https://github.com/pop-os/dbus-settings-bindings']
|
||||||
# cosmic-dbus-networkmanager = { path = "../dbus-settings-bindings/networkmanager" }
|
# cosmic-dbus-networkmanager = { path = "../dbus-settings-bindings/networkmanager" }
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ futures.workspace = true
|
||||||
i18n-embed.workspace = true
|
i18n-embed.workspace = true
|
||||||
i18n-embed-fl.workspace = true
|
i18n-embed-fl.workspace = true
|
||||||
image = { version = "0.25.9", default-features = false }
|
image = { version = "0.25.9", default-features = false }
|
||||||
libcosmic.workspace = true
|
cosmic.workspace = true
|
||||||
memmap2 = "0.9.10"
|
memmap2 = "0.9.10"
|
||||||
fastrand = "2.3.0"
|
fastrand = "2.3.0"
|
||||||
rust-embed.workspace = true
|
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
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
libcosmic.workspace = true
|
cosmic.workspace = true
|
||||||
serde = { workspace = true, features = ["derive"] }
|
serde = { workspace = true, features = ["derive"] }
|
||||||
|
|
|
||||||
|
|
@ -435,6 +435,7 @@ pub enum PopupType {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
|
#[allow(dead_code)]
|
||||||
enum Message {
|
enum Message {
|
||||||
Wayland(WaylandUpdate),
|
Wayland(WaylandUpdate),
|
||||||
PinApp(u32),
|
PinApp(u32),
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ cctk.workspace = true
|
||||||
cosmic-protocols.workspace = true
|
cosmic-protocols.workspace = true
|
||||||
i18n-embed-fl.workspace = true
|
i18n-embed-fl.workspace = true
|
||||||
i18n-embed.workspace = true
|
i18n-embed.workspace = true
|
||||||
libcosmic.workspace = true
|
cosmic.workspace = true
|
||||||
rust-embed.workspace = true
|
rust-embed.workspace = true
|
||||||
tokio.workspace = true
|
tokio.workspace = true
|
||||||
tracing-log.workspace = true
|
tracing-log.workspace = true
|
||||||
|
|
@ -17,9 +17,7 @@ tracing-subscriber.workspace = true
|
||||||
tracing.workspace = true
|
tracing.workspace = true
|
||||||
|
|
||||||
[dependencies.cosmic-settings-a11y-manager-subscription]
|
[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]
|
[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::{
|
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 cosmic_settings_accessibility_subscription::{self as accessibility};
|
||||||
use std::sync::LazyLock;
|
|
||||||
use tokio::sync::mpsc::UnboundedSender;
|
use tokio::sync::mpsc::UnboundedSender;
|
||||||
|
|
||||||
pub fn run() -> cosmic::iced::Result {
|
pub fn run() -> cosmic::iced::Result {
|
||||||
|
|
@ -52,6 +51,7 @@ struct CosmicA11yApplet {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
|
#[allow(dead_code)]
|
||||||
enum Message {
|
enum Message {
|
||||||
TogglePopup,
|
TogglePopup,
|
||||||
CloseRequested(window::Id),
|
CloseRequested(window::Id),
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,12 @@
|
||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use anyhow;
|
use anyhow;
|
||||||
use cctk::sctk::reexports::calloop::{self, channel::SyncSender};
|
use cctk::sctk::reexports::calloop::{self};
|
||||||
use cosmic::iced::{
|
use cosmic::iced::{
|
||||||
self, Subscription,
|
self, Subscription,
|
||||||
futures::{self, SinkExt, StreamExt, channel::mpsc},
|
futures::{self, SinkExt},
|
||||||
stream,
|
stream,
|
||||||
};
|
};
|
||||||
use cosmic_protocols::a11y::v1::client::cosmic_a11y_manager_v1::Filter;
|
|
||||||
use cosmic_settings_a11y_manager_subscription::{
|
use cosmic_settings_a11y_manager_subscription::{
|
||||||
self as thread, AccessibilityEvent, AccessibilityRequest,
|
self as thread, AccessibilityEvent, AccessibilityRequest,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ license = "GPL-3.0-only"
|
||||||
futures.workspace = true
|
futures.workspace = true
|
||||||
i18n-embed-fl.workspace = true
|
i18n-embed-fl.workspace = true
|
||||||
i18n-embed.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 = { git = "https://github.com/pop-os/dbus-settings-bindings" }
|
||||||
rust-embed.workspace = true
|
rust-embed.workspace = true
|
||||||
serde.workspace = true
|
serde.workspace = true
|
||||||
|
|
@ -23,5 +23,5 @@ zlink.workspace = true
|
||||||
intmap = "3.1.3"
|
intmap = "3.1.3"
|
||||||
|
|
||||||
[dependencies.cosmic-settings-audio-client]
|
[dependencies.cosmic-settings-audio-client]
|
||||||
git = "https://github.com/pop-os/cosmic-settings-daemon"
|
path = "../../cosmic-settings-daemon/audio-client"
|
||||||
features = ["codec"]
|
features = ["codec"]
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ drm = "0.14.1"
|
||||||
futures.workspace = true
|
futures.workspace = true
|
||||||
i18n-embed-fl.workspace = true
|
i18n-embed-fl.workspace = true
|
||||||
i18n-embed.workspace = true
|
i18n-embed.workspace = true
|
||||||
libcosmic.workspace = true
|
cosmic.workspace = true
|
||||||
rust-embed.workspace = true
|
rust-embed.workspace = true
|
||||||
rustc-hash.workspace = true
|
rustc-hash.workspace = true
|
||||||
tokio.workspace = true
|
tokio.workspace = true
|
||||||
|
|
@ -24,9 +24,7 @@ zbus.workspace = true
|
||||||
serde.workspace = true
|
serde.workspace = true
|
||||||
|
|
||||||
[dependencies.cosmic-settings-upower-subscription]
|
[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]
|
[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"
|
|
||||||
|
|
|
||||||
|
|
@ -186,6 +186,7 @@ impl CosmicBatteryApplet {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
|
#[allow(dead_code)]
|
||||||
enum Message {
|
enum Message {
|
||||||
TogglePopup,
|
TogglePopup,
|
||||||
CloseRequested(window::Id),
|
CloseRequested(window::Id),
|
||||||
|
|
@ -525,7 +526,7 @@ impl cosmic::Application for CosmicBatteryApplet {
|
||||||
Task::none()
|
Task::none()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn view(&self) -> Element<Message> {
|
fn view(&self) -> Element<'_, Message> {
|
||||||
let is_horizontal = match self.core.applet.anchor {
|
let is_horizontal = match self.core.applet.anchor {
|
||||||
PanelAnchor::Top | PanelAnchor::Bottom => true,
|
PanelAnchor::Top | PanelAnchor::Bottom => true,
|
||||||
PanelAnchor::Left | PanelAnchor::Right => false,
|
PanelAnchor::Left | PanelAnchor::Right => false,
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ bluer = { version = "0.17", features = ["bluetoothd", "id"] }
|
||||||
futures.workspace = true
|
futures.workspace = true
|
||||||
i18n-embed-fl.workspace = true
|
i18n-embed-fl.workspace = true
|
||||||
i18n-embed.workspace = true
|
i18n-embed.workspace = true
|
||||||
libcosmic.workspace = true
|
cosmic.workspace = true
|
||||||
fastrand = "2.3.0"
|
fastrand = "2.3.0"
|
||||||
rust-embed.workspace = true
|
rust-embed.workspace = true
|
||||||
rustc-hash.workspace = true
|
rustc-hash.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ use cosmic::{
|
||||||
widget::{button, divider, icon, indeterminate_circular, scrollable, text},
|
widget::{button, divider, icon, indeterminate_circular, scrollable, text},
|
||||||
};
|
};
|
||||||
use futures::FutureExt;
|
use futures::FutureExt;
|
||||||
use std::{collections::HashMap, sync::LazyLock, time::Duration};
|
use std::{collections::HashMap, time::Duration};
|
||||||
use tokio::sync::mpsc::Sender;
|
use tokio::sync::mpsc::Sender;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
|
|
@ -63,6 +63,7 @@ impl CosmicBluetoothApplet {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
|
#[allow(dead_code)]
|
||||||
enum Message {
|
enum Message {
|
||||||
TogglePopup,
|
TogglePopup,
|
||||||
CloseRequested(window::Id),
|
CloseRequested(window::Id),
|
||||||
|
|
@ -145,7 +146,7 @@ impl cosmic::Application for CosmicBluetoothApplet {
|
||||||
}
|
}
|
||||||
Message::BluetoothEvent(e) => match e {
|
Message::BluetoothEvent(e) => match e {
|
||||||
BluerEvent::RequestResponse {
|
BluerEvent::RequestResponse {
|
||||||
req,
|
req: _,
|
||||||
state,
|
state,
|
||||||
err_msg,
|
err_msg,
|
||||||
} => {
|
} => {
|
||||||
|
|
|
||||||
|
|
@ -149,8 +149,6 @@ pub fn bluetooth_subscription<I: 'static + Hash + Copy + Send + Sync + Debug>(
|
||||||
},
|
},
|
||||||
|
|
||||||
BluerSessionEvent::AgentEvent(e) => BluerEvent::AgentEvent(e),
|
BluerSessionEvent::AgentEvent(e) => BluerEvent::AgentEvent(e),
|
||||||
|
|
||||||
_ => return,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
_ = output.send(message).await;
|
_ = output.send(message).await;
|
||||||
|
|
@ -199,6 +197,7 @@ pub enum BluerRequest {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub enum BluerEvent {
|
pub enum BluerEvent {
|
||||||
RequestResponse {
|
RequestResponse {
|
||||||
req: BluerRequest,
|
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" }
|
cosmic-comp-config = { git = "https://github.com/pop-os/cosmic-comp.git", rev = "5eb5af4" }
|
||||||
i18n-embed-fl.workspace = true
|
i18n-embed-fl.workspace = true
|
||||||
i18n-embed.workspace = true
|
i18n-embed.workspace = true
|
||||||
libcosmic.workspace = true
|
cosmic.workspace = true
|
||||||
rust-embed.workspace = true
|
rust-embed.workspace = true
|
||||||
tokio.workspace = true
|
tokio.workspace = true
|
||||||
tracing-log.workspace = true
|
tracing-log.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
|
|
||||||
mod localize;
|
mod localize;
|
||||||
|
|
||||||
use cosmic::iced::{Alignment, Length};
|
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
app,
|
app,
|
||||||
app::Core,
|
app::Core,
|
||||||
|
|
@ -14,16 +13,14 @@ use cosmic::{
|
||||||
iced::{
|
iced::{
|
||||||
Rectangle, Task,
|
Rectangle, Task,
|
||||||
platform_specific::shell::commands::popup::{destroy_popup, get_popup},
|
platform_specific::shell::commands::popup::{destroy_popup, get_popup},
|
||||||
widget::{column, row},
|
|
||||||
window::Id,
|
window::Id,
|
||||||
},
|
},
|
||||||
iced::{core::window, runtime::Appearance},
|
iced::core::window,
|
||||||
prelude::*,
|
prelude::*,
|
||||||
surface, theme,
|
surface, theme,
|
||||||
widget::{
|
widget::{
|
||||||
self, autosize,
|
self, autosize,
|
||||||
rectangle_tracker::{RectangleTracker, RectangleUpdate, rectangle_tracker_subscription},
|
rectangle_tracker::{RectangleTracker, RectangleUpdate, rectangle_tracker_subscription},
|
||||||
space,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
use cosmic_comp_config::CosmicCompConfig;
|
use cosmic_comp_config::CosmicCompConfig;
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ anyhow.workspace = true
|
||||||
i18n-embed-fl.workspace = true
|
i18n-embed-fl.workspace = true
|
||||||
i18n-embed.workspace = true
|
i18n-embed.workspace = true
|
||||||
image = { version = "0.25.9", default-features = false }
|
image = { version = "0.25.9", default-features = false }
|
||||||
libcosmic.workspace = true
|
cosmic.workspace = true
|
||||||
memmap2 = "0.9.10"
|
memmap2 = "0.9.10"
|
||||||
rust-embed.workspace = true
|
rust-embed.workspace = true
|
||||||
rustix.workspace = true
|
rustix.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -316,7 +316,7 @@ impl cosmic::Application for Minimize {
|
||||||
} else {
|
} else {
|
||||||
(cross_padding, major_padding)
|
(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| {
|
let icon_buttons = self.apps[..max_icon_count].iter().map(|app| {
|
||||||
self.core
|
self.core
|
||||||
.applet
|
.applet
|
||||||
|
|
@ -420,7 +420,7 @@ impl cosmic::Application for Minimize {
|
||||||
(cross_padding, major_padding)
|
(cross_padding, major_padding)
|
||||||
};
|
};
|
||||||
let theme = self.core.system_theme().cosmic();
|
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| {
|
let icon_buttons = self.apps[max_icon_count..].iter().map(|app| {
|
||||||
tooltip(
|
tooltip(
|
||||||
Element::from(crate::window_image::WindowImage::new(
|
Element::from(crate::window_image::WindowImage::new(
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ futures.workspace = true
|
||||||
futures-util.workspace = true
|
futures-util.workspace = true
|
||||||
i18n-embed-fl.workspace = true
|
i18n-embed-fl.workspace = true
|
||||||
i18n-embed.workspace = true
|
i18n-embed.workspace = true
|
||||||
libcosmic = { workspace = true, features = [
|
cosmic = { workspace = true, features = [
|
||||||
"applet",
|
"applet",
|
||||||
"applet-token",
|
"applet-token",
|
||||||
"tokio",
|
"tokio",
|
||||||
|
|
@ -34,5 +34,4 @@ nmrs = "3.1.3"
|
||||||
|
|
||||||
|
|
||||||
[dependencies.cosmic-settings-network-manager-subscription]
|
[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-util = { git = "https://github.com/pop-os/cosmic-notifications" }
|
||||||
cosmic-notifications-config = { git = "https://github.com/pop-os/cosmic-notifications" }
|
cosmic-notifications-config = { git = "https://github.com/pop-os/cosmic-notifications" }
|
||||||
anyhow.workspace = true
|
anyhow.workspace = true
|
||||||
libcosmic.workspace = true
|
cosmic.workspace = true
|
||||||
tokio.workspace = true
|
tokio.workspace = true
|
||||||
# cosmic-notifications-util = { path = "../../cosmic-notifications-daemon/cosmic-notifications-util" }
|
# cosmic-notifications-util = { path = "../../cosmic-notifications-daemon/cosmic-notifications-util" }
|
||||||
# cosmic-notifications-config = { path = "../../cosmic-notifications-daemon/cosmic-notifications-config" }
|
# cosmic-notifications-config = { path = "../../cosmic-notifications-daemon/cosmic-notifications-config" }
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ license = "GPL-3.0-only"
|
||||||
[dependencies]
|
[dependencies]
|
||||||
i18n-embed-fl.workspace = true
|
i18n-embed-fl.workspace = true
|
||||||
i18n-embed.workspace = true
|
i18n-embed.workspace = true
|
||||||
libcosmic.workspace = true
|
cosmic.workspace = true
|
||||||
logind-zbus = "5.3.2"
|
logind-zbus = "5.3.2"
|
||||||
rust-embed.workspace = true
|
rust-embed.workspace = true
|
||||||
rustix.workspace = true
|
rustix.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,8 @@ use cosmic::{
|
||||||
window,
|
window,
|
||||||
},
|
},
|
||||||
surface, theme,
|
surface, theme,
|
||||||
widget::{Space, button, divider, icon, space, text},
|
widget::{button, divider, icon, space, text},
|
||||||
};
|
};
|
||||||
use std::sync::LazyLock;
|
|
||||||
|
|
||||||
use logind_zbus::{
|
use logind_zbus::{
|
||||||
manager::ManagerProxy,
|
manager::ManagerProxy,
|
||||||
|
|
@ -35,9 +34,6 @@ pub mod session_manager;
|
||||||
|
|
||||||
use crate::{cosmic_session::CosmicSessionProxy, session_manager::SessionManagerProxy};
|
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 {
|
pub fn run() -> cosmic::iced::Result {
|
||||||
localize::localize();
|
localize::localize();
|
||||||
|
|
||||||
|
|
@ -49,7 +45,6 @@ struct Power {
|
||||||
icon_name: String,
|
icon_name: String,
|
||||||
popup: Option<window::Id>,
|
popup: Option<window::Id>,
|
||||||
token_tx: Option<calloop::channel::Sender<TokenRequest>>,
|
token_tx: Option<calloop::channel::Sender<TokenRequest>>,
|
||||||
subsurface_id: window::Id,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy)]
|
#[derive(Debug, Clone, Copy)]
|
||||||
|
|
@ -75,6 +70,7 @@ impl PowerAction {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
|
#[allow(dead_code)]
|
||||||
enum Message {
|
enum Message {
|
||||||
Action(PowerAction),
|
Action(PowerAction),
|
||||||
TogglePopup,
|
TogglePopup,
|
||||||
|
|
@ -104,7 +100,6 @@ impl cosmic::Application for Power {
|
||||||
Self {
|
Self {
|
||||||
core,
|
core,
|
||||||
icon_name: "system-shutdown-symbolic".to_string(),
|
icon_name: "system-shutdown-symbolic".to_string(),
|
||||||
subsurface_id: window::Id::unique(),
|
|
||||||
token_tx: None,
|
token_tx: None,
|
||||||
popup: Option::default(),
|
popup: Option::default(),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ license = "GPL-3.0-only"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
futures.workspace = true
|
futures.workspace = true
|
||||||
libcosmic.workspace = true
|
cosmic.workspace = true
|
||||||
serde.workspace = true
|
serde.workspace = true
|
||||||
rustc-hash.workspace = true
|
rustc-hash.workspace = true
|
||||||
tokio.workspace = true
|
tokio.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ use crate::{
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub enum Msg {
|
pub enum Msg {
|
||||||
None,
|
None,
|
||||||
Activate(usize),
|
Activate(usize),
|
||||||
|
|
@ -637,7 +638,7 @@ fn menu_icon_button<'a>(
|
||||||
let icon = menu.icon_handle().clone();
|
let icon = menu.icon_handle().clone();
|
||||||
|
|
||||||
let theme = cosmic::theme::active();
|
let theme = cosmic::theme::active();
|
||||||
let theme = theme.cosmic();
|
let _theme = theme.cosmic();
|
||||||
|
|
||||||
let suggested = applet.suggested_size(true);
|
let suggested = applet.suggested_size(true);
|
||||||
let padding = applet.suggested_padding(true).1;
|
let padding = applet.suggested_padding(true).1;
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ use cosmic::{
|
||||||
iced,
|
iced,
|
||||||
widget::icon::{self, IconFallback},
|
widget::icon::{self, IconFallback},
|
||||||
};
|
};
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::Path;
|
||||||
|
|
||||||
use crate::subscriptions::status_notifier_item::{IconUpdate, Layout, StatusNotifierItem};
|
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
|
//! can be socket-activated and not conflict with anything else running as a status notifier
|
||||||
//! watcher.
|
//! watcher.
|
||||||
//!
|
//!
|
||||||
//! The daemon runs as long as as there is at least one client still connected. Which it checks
|
//! The daemon runs as long as there is at least one client still connected.
|
||||||
//! for every `REFRESH_INTERVAL`.
|
|
||||||
|
|
||||||
use crate::subscriptions::status_notifier_watcher::server::create_service;
|
use crate::subscriptions::status_notifier_watcher::server::create_service;
|
||||||
use crate::unique_names::UniqueNames;
|
use crate::unique_names::UniqueNames;
|
||||||
|
|
||||||
use futures::StreamExt;
|
use futures::StreamExt;
|
||||||
use std::{collections::HashSet, time::Duration};
|
use std::collections::HashSet;
|
||||||
use zbus::fdo;
|
use zbus::fdo;
|
||||||
use zbus::message::Header;
|
use zbus::message::Header;
|
||||||
|
|
||||||
const DBUS_NAME: &str = "com.system76.CosmicStatusNotifierWatcher";
|
const DBUS_NAME: &str = "com.system76.CosmicStatusNotifierWatcher";
|
||||||
const OBJECT_PATH: &str = "/CosmicStatusNotifierWatcher";
|
const OBJECT_PATH: &str = "/CosmicStatusNotifierWatcher";
|
||||||
const REFRESH_INTERVAL: Duration = Duration::from_secs(60);
|
|
||||||
|
|
||||||
/// Run daemon
|
/// Run daemon
|
||||||
pub fn run() -> cosmic::iced::Result {
|
pub fn run() -> cosmic::iced::Result {
|
||||||
if let Err(err) = run_inner() {
|
if let Err(err) = run_inner() {
|
||||||
|
|
@ -42,7 +39,7 @@ pub async fn cosmic_register(conn: &zbus::Connection) -> zbus::Result<()> {
|
||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
while let Some(value) = stream.next().await {
|
while let Some(value) = stream.next().await {
|
||||||
if let Some(_unique_name) = value {
|
if let Some(_unique_name) = value {
|
||||||
/// Register with new owner
|
// Register with new owner.
|
||||||
let _ = cosmic_watcher.register_applet().await;
|
let _ = cosmic_watcher.register_applet().await;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ edition = "2024"
|
||||||
license = "GPL-3.0-only"
|
license = "GPL-3.0-only"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
libcosmic.workspace = true
|
cosmic.workspace = true
|
||||||
anyhow.workspace = true
|
anyhow.workspace = true
|
||||||
cctk.workspace = true
|
cctk.workspace = true
|
||||||
cosmic-comp-config = { git = "https://github.com/pop-os/cosmic-comp.git", rev = "5eb5af4" }
|
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_comp_config::{CosmicCompConfig, TileBehavior};
|
||||||
use cosmic_protocols::workspace::v2::client::zcosmic_workspace_handle_v2::TilingState;
|
use cosmic_protocols::workspace::v2::client::zcosmic_workspace_handle_v2::TilingState;
|
||||||
use std::{thread, time::Instant};
|
use std::thread;
|
||||||
use tracing::error;
|
use tracing::error;
|
||||||
|
|
||||||
const ID: &str = "com.system76.CosmicAppletTiling";
|
const ID: &str = "com.system76.CosmicAppletTiling";
|
||||||
|
|
@ -46,6 +46,7 @@ pub struct Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub enum Message {
|
pub enum Message {
|
||||||
TogglePopup,
|
TogglePopup,
|
||||||
PopupClosed(Id),
|
PopupClosed(Id),
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ cosmic-applets-config.workspace = true
|
||||||
jiff = "0.2"
|
jiff = "0.2"
|
||||||
i18n-embed-fl.workspace = true
|
i18n-embed-fl.workspace = true
|
||||||
i18n-embed.workspace = true
|
i18n-embed.workspace = true
|
||||||
libcosmic.workspace = true
|
cosmic.workspace = true
|
||||||
rust-embed.workspace = true
|
rust-embed.workspace = true
|
||||||
tokio.workspace = true
|
tokio.workspace = true
|
||||||
tracing-log.workspace = true
|
tracing-log.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,7 @@ pub struct Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub enum Message {
|
pub enum Message {
|
||||||
TogglePopup,
|
TogglePopup,
|
||||||
CloseRequested(window::Id),
|
CloseRequested(window::Id),
|
||||||
|
|
@ -361,7 +362,7 @@ impl cosmic::Application for Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn subscription(&self) -> Subscription<Message> {
|
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 {
|
struct Wrapper {
|
||||||
inner: watch::Receiver<bool>,
|
inner: watch::Receiver<bool>,
|
||||||
id: &'static str,
|
id: &'static str,
|
||||||
|
|
@ -376,7 +377,7 @@ impl cosmic::Application for Window {
|
||||||
inner: show_seconds,
|
inner: show_seconds,
|
||||||
id: "time-sub",
|
id: "time-sub",
|
||||||
},
|
},
|
||||||
|Wrapper { inner, id }| {
|
|Wrapper { inner, id: _ }| {
|
||||||
let mut show_seconds = inner.clone();
|
let mut show_seconds = inner.clone();
|
||||||
stream::channel(1, move |mut output: mpsc::Sender<Message>| async move {
|
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
|
// 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"
|
license = "GPL-3.0-only"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
libcosmic.workspace = true
|
cosmic.workspace = true
|
||||||
cctk.workspace = true
|
cctk.workspace = true
|
||||||
tracing.workspace = true
|
tracing.workspace = true
|
||||||
tracing-subscriber.workspace = true
|
tracing-subscriber.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,7 @@ impl IcedWorkspacesApplet {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
|
#[allow(dead_code)]
|
||||||
enum Message {
|
enum Message {
|
||||||
WorkspaceUpdate(WorkspacesUpdate),
|
WorkspaceUpdate(WorkspacesUpdate),
|
||||||
WorkspacePressed(ExtWorkspaceHandleV1),
|
WorkspacePressed(ExtWorkspaceHandleV1),
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ cosmic-applet-time = { path = "../cosmic-applet-time" }
|
||||||
cosmic-applet-workspaces = { path = "../cosmic-applet-workspaces" }
|
cosmic-applet-workspaces = { path = "../cosmic-applet-workspaces" }
|
||||||
cosmic-applet-input-sources = { path = "../cosmic-applet-input-sources" }
|
cosmic-applet-input-sources = { path = "../cosmic-applet-input-sources" }
|
||||||
cosmic-panel-button = { path = "../cosmic-panel-button" }
|
cosmic-panel-button = { path = "../cosmic-panel-button" }
|
||||||
libcosmic.workspace = true
|
cosmic.workspace = true
|
||||||
tracing.workspace = true
|
tracing.workspace = true
|
||||||
tracing-subscriber.workspace = true
|
tracing-subscriber.workspace = true
|
||||||
tracing-log.workspace = true
|
tracing-log.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ edition = "2024"
|
||||||
license = "GPL-3.0-only"
|
license = "GPL-3.0-only"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
libcosmic.workspace = true
|
cosmic.workspace = true
|
||||||
rustc-hash.workspace = true
|
rustc-hash.workspace = true
|
||||||
tracing.workspace = true
|
tracing.workspace = true
|
||||||
tracing-subscriber.workspace = true
|
tracing-subscriber.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ impl Button {
|
||||||
icon: cosmic::widget::icon::Handle,
|
icon: cosmic::widget::icon::Handle,
|
||||||
) -> cosmic::widget::Button<'a, Message> {
|
) -> cosmic::widget::Button<'a, Message> {
|
||||||
let theme = cosmic::theme::active();
|
let theme = cosmic::theme::active();
|
||||||
let theme = theme.cosmic();
|
let _theme = theme.cosmic();
|
||||||
|
|
||||||
let suggested = self.core.applet.suggested_size(icon.symbolic);
|
let suggested = self.core.applet.suggested_size(icon.symbolic);
|
||||||
let (major_padding, applet_padding_minor_axis) =
|
let (major_padding, applet_padding_minor_axis) =
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "1.93"
|
channel = "1.93.0"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue