mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-11-09 23:00:55 +00:00
26 lines
624 B
Rust
26 lines
624 B
Rust
use crate::config::{ModuleConfig, RootModuleConfig};
|
|
|
|
use ansi_term::{Color, Style};
|
|
use starship_module_config_derive::ModuleConfig;
|
|
|
|
#[derive(Clone, ModuleConfig)]
|
|
pub struct CmdDurationConfig<'a> {
|
|
pub min_time: i64,
|
|
pub prefix: &'a str,
|
|
pub style: Style,
|
|
pub show_milliseconds: bool,
|
|
pub disabled: bool,
|
|
}
|
|
|
|
impl<'a> RootModuleConfig<'a> for CmdDurationConfig<'a> {
|
|
fn new() -> Self {
|
|
CmdDurationConfig {
|
|
min_time: 2_000,
|
|
prefix: "took ",
|
|
show_milliseconds: false,
|
|
style: Color::Yellow.bold(),
|
|
disabled: false,
|
|
}
|
|
}
|
|
}
|