diff --git a/src/bin/work.rs b/src/bin/work.rs index 8f9701b..1b99ace 100644 --- a/src/bin/work.rs +++ b/src/bin/work.rs @@ -30,18 +30,30 @@ fn main() { // Realtime upload/download rate for a interface bar.push(NetworkSpeedWidget::new(&opts.nic, 6)); - bar.push(DateTimeWidget::tz( + let mut dt = DateTimeWidget::tz( "%H:%M %Z".to_string(), "Europe/London".to_string(), - )); - let mut dt = DateTimeWidget::new("%m/%d %H:%M".to_string()); + ); dt.set_colors(&vec![ TimeColor { start: NaiveTime::from_hms(13, 0, 0), color: ColorRGB::yellow(), }, TimeColor { - start: NaiveTime::from_hms(14, 0, 0), + start: NaiveTime::from_hms(16, 0, 0), + color: ColorRGB::red(), + }, + ]); + bar.push(dt); + + let mut dt = DateTimeWidget::new("%m/%d %H:%M".to_string()); + dt.set_colors(&vec![ + TimeColor { + start: NaiveTime::from_hms(15, 0, 0), + color: ColorRGB::yellow(), + }, + TimeColor { + start: NaiveTime::from_hms(16, 0, 0), color: ColorRGB::red(), }, ]);