diff options
Diffstat (limited to 'src/modules/cmd_duration.rs')
-rw-r--r-- | src/modules/cmd_duration.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/modules/cmd_duration.rs b/src/modules/cmd_duration.rs index 7b31c80c3..938549f64 100644 --- a/src/modules/cmd_duration.rs +++ b/src/modules/cmd_duration.rs @@ -1,4 +1,4 @@ -use super::{Context, Module}; +use super::{Context, Module, SegmentConfig}; use crate::config::RootModuleConfig; use crate::configs::cmd_duration::CmdDurationConfig; @@ -36,10 +36,8 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> { }; module.set_style(module_color); - module.new_segment( - "cmd_duration", - &format!("{}{}", config.prefix, render_time(elapsed)), - ); + let cmd_duration_stacked = &format!("{}{}", config.prefix, render_time(elapsed)); + module.create_segment("cmd_duration", &SegmentConfig::new(&cmd_duration_stacked)); module.get_prefix().set_value(""); Some(module) |