cosmic-applets/cosmic-applets-config/src/time.rs
2025-05-20 17:00:56 +02:00

26 lines
747 B
Rust

// Copyright 2023 System76 <info@system76.com>
// SPDX-License-Identifier: GPL-3.0-only
use cosmic_config::{self, CosmicConfigEntry, cosmic_config_derive::CosmicConfigEntry};
#[derive(Debug, Clone, CosmicConfigEntry, PartialEq, Eq, serde::Deserialize, serde::Serialize)]
#[version = 1]
pub struct TimeAppletConfig {
pub military_time: bool,
pub show_seconds: bool,
pub first_day_of_week: u8,
pub show_date_in_top_panel: bool,
pub show_weekday: bool,
}
impl Default for TimeAppletConfig {
fn default() -> Self {
Self {
military_time: false,
show_seconds: false,
first_day_of_week: 6,
show_date_in_top_panel: true,
show_weekday: false,
}
}
}