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 = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"chrono-tz",
|
"chrono-tz",
|
||||||
|
"cosmic-config",
|
||||||
"i18n-embed",
|
"i18n-embed",
|
||||||
"i18n-embed-fl",
|
"i18n-embed-fl",
|
||||||
"icu",
|
"icu",
|
||||||
"libcosmic",
|
"libcosmic",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"rust-embed",
|
"rust-embed",
|
||||||
|
"serde",
|
||||||
"timedate-zbus",
|
"timedate-zbus",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tracing",
|
"tracing",
|
||||||
|
|
@ -1365,6 +1367,14 @@ dependencies = [
|
||||||
"tracing-subscriber",
|
"tracing-subscriber",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "cosmic-applets-config"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"cosmic-config",
|
||||||
|
"serde",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cosmic-client-toolkit"
|
name = "cosmic-client-toolkit"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ members = [
|
||||||
"cosmic-panel-button",
|
"cosmic-panel-button",
|
||||||
"cosmic-applet-input-sources",
|
"cosmic-applet-input-sources",
|
||||||
"cosmic-applet-a11y",
|
"cosmic-applet-a11y",
|
||||||
|
"cosmic-applets-config",
|
||||||
]
|
]
|
||||||
|
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ edition = "2021"
|
||||||
license = "GPL-3.0-only"
|
license = "GPL-3.0-only"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
cosmic-config.workspace = true
|
||||||
chrono = { version = "0.4.39", features = ["clock"] }
|
chrono = { version = "0.4.39", features = ["clock"] }
|
||||||
chrono-tz = "0.10"
|
chrono-tz = "0.10"
|
||||||
i18n-embed-fl.workspace = true
|
i18n-embed-fl.workspace = true
|
||||||
|
|
@ -21,5 +22,6 @@ icu = { version = "1.5.0", features = [
|
||||||
"compiled_data",
|
"compiled_data",
|
||||||
"icu_datetime_experimental",
|
"icu_datetime_experimental",
|
||||||
] }
|
] }
|
||||||
|
serde.workspace = true
|
||||||
zbus.workspace = true
|
zbus.workspace = true
|
||||||
timedate-zbus = { git = "https://github.com/pop-os/dbus-settings-bindings" }
|
timedate-zbus = { git = "https://github.com/pop-os/dbus-settings-bindings" }
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
// Copyright 2023 System76 <info@system76.com>
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// 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]
|
#[version = 1]
|
||||||
pub struct TimeAppletConfig {
|
pub struct TimeAppletConfig {
|
||||||
pub military_time: bool,
|
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