1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-11-15 01:34:10 +00:00
starship/src/configs/time.rs

26 lines
609 B
Rust
Raw Normal View History

use crate::config::{ModuleConfig, RootModuleConfig};
use ansi_term::{Color, Style};
use starship_module_config_derive::ModuleConfig;
#[derive(Clone, ModuleConfig)]
pub struct TimeConfig<'a> {
pub use_12hr: bool,
pub format: Option<&'a str>,
pub style: Style,
pub disabled: bool,
pub utc_time_offset: &'a str,
}
impl<'a> RootModuleConfig<'a> for TimeConfig<'a> {
fn new() -> Self {
TimeConfig {
use_12hr: false,
format: None,
style: Color::Yellow.bold(),
disabled: true,
utc_time_offset: "local",
}
}
}