Expose applet configs, starting with time applet

This commit is contained in:
Jeremy Soller 2025-05-09 13:27:22 -06:00
parent b6bb982f2d
commit edaf5b994e
6 changed files with 25 additions and 2 deletions

10
Cargo.lock generated
View file

@ -1307,12 +1307,14 @@ version = "0.1.0"
dependencies = [
"chrono",
"chrono-tz",
"cosmic-config",
"i18n-embed",
"i18n-embed-fl",
"icu",
"libcosmic",
"once_cell",
"rust-embed",
"serde",
"timedate-zbus",
"tokio",
"tracing",
@ -1365,6 +1367,14 @@ dependencies = [
"tracing-subscriber",
]
[[package]]
name = "cosmic-applets-config"
version = "0.1.0"
dependencies = [
"cosmic-config",
"serde",
]
[[package]]
name = "cosmic-client-toolkit"
version = "0.1.0"

View file

@ -18,6 +18,7 @@ members = [
"cosmic-panel-button",
"cosmic-applet-input-sources",
"cosmic-applet-a11y",
"cosmic-applets-config",
]
resolver = "2"

View file

@ -5,6 +5,7 @@ edition = "2021"
license = "GPL-3.0-only"
[dependencies]
cosmic-config.workspace = true
chrono = { version = "0.4.39", features = ["clock"] }
chrono-tz = "0.10"
i18n-embed-fl.workspace = true
@ -21,5 +22,6 @@ icu = { version = "1.5.0", features = [
"compiled_data",
"icu_datetime_experimental",
] }
serde.workspace = true
zbus.workspace = true
timedate-zbus = { git = "https://github.com/pop-os/dbus-settings-bindings" }

View file

@ -1,9 +1,9 @@
// Copyright 2023 System76 <info@system76.com>
// SPDX-License-Identifier: GPL-3.0-only
use cosmic::cosmic_config::{self, cosmic_config_derive::CosmicConfigEntry, CosmicConfigEntry};
use cosmic_config::{self, cosmic_config_derive::CosmicConfigEntry, CosmicConfigEntry};
#[derive(Debug, Clone, CosmicConfigEntry, PartialEq, Eq)]
#[derive(Debug, Clone, CosmicConfigEntry, PartialEq, Eq, serde::Deserialize, serde::Serialize)]
#[version = 1]
pub struct TimeAppletConfig {
pub military_time: bool,

View file

@ -0,0 +1,8 @@
[package]
name = "cosmic-applets-config"
version = "0.1.0"
edition = "2024"
[dependencies]
cosmic-config.workspace = true
serde.workspace = true

View file

@ -0,0 +1,2 @@
#[path = "../../cosmic-applet-time/src/config.rs"]
pub mod time;