tracing and changes

This commit is contained in:
2026-09-13 16:25:47 +01:00
parent 74f59be3f8
commit 57201bc0ff
17 changed files with 306 additions and 47 deletions
+3 -2
View File
@@ -29,7 +29,7 @@ pub struct Clock {
#[derive(Deserialize, Default)]
struct ClockConfig {
#[serde(default)]
format: bool,
show_seconds: bool,
}
impl Clock {
@@ -37,7 +37,7 @@ impl Clock {
match config_clock(config) {
Some(x) => Self {
value: "--:--:--".to_string(),
show_seconds: x.format,
show_seconds: x.show_seconds,
},
None => Self::default(),
}
@@ -102,6 +102,7 @@ impl BarModule for Clock {
match msg.downcast::<ClockMsg>() {
Some(ClockMsg::ToggleSeconds) => {
self.show_seconds = !self.show_seconds;
tracing::debug!(show_seconds = self.show_seconds, "clock toggle");
let want = if self.show_seconds {
ClockKind::Seconds
} else {