Expose applet configs, starting with time applet
This commit is contained in:
parent
b6bb982f2d
commit
edaf5b994e
6 changed files with 25 additions and 2 deletions
10
Cargo.lock
generated
10
Cargo.lock
generated
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ members = [
|
|||
"cosmic-panel-button",
|
||||
"cosmic-applet-input-sources",
|
||||
"cosmic-applet-a11y",
|
||||
"cosmic-applets-config",
|
||||
]
|
||||
|
||||
resolver = "2"
|
||||
|
|
|
|||
|
|
@ -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" }
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
8
cosmic-applets-config/Cargo.toml
Normal file
8
cosmic-applets-config/Cargo.toml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
[package]
|
||||
name = "cosmic-applets-config"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
cosmic-config.workspace = true
|
||||
serde.workspace = true
|
||||
2
cosmic-applets-config/src/lib.rs
Normal file
2
cosmic-applets-config/src/lib.rs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
#[path = "../../cosmic-applet-time/src/config.rs"]
|
||||
pub mod time;
|
||||
Loading…
Add table
Add a link
Reference in a new issue