diff options
Diffstat (limited to 'src/configs/cmd_duration.rs')
-rw-r--r-- | src/configs/cmd_duration.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/configs/cmd_duration.rs b/src/configs/cmd_duration.rs new file mode 100644 index 000000000..2cf7a85af --- /dev/null +++ b/src/configs/cmd_duration.rs @@ -0,0 +1,23 @@ +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 disabled: bool, +} + +impl<'a> RootModuleConfig<'a> for CmdDurationConfig<'a> { + fn new() -> Self { + CmdDurationConfig { + min_time: 2, + prefix: "took ", + style: Color::Yellow.bold(), + disabled: false, + } + } +} |