From 37cabe2fea2f86d481516aae6ddaeb14bac2e64f Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 18 Sep 2026 18:20:27 +0200 Subject: feat: add a breaktimer card Replaces the Waybar module that used to show breaktimer.sh with a card on the dashboard. The card's big value is the phase countdown, coloured by phase with the same language the Waybar module used, and two rows name the phase and what the countdown leads to. Data comes from bin/breaktimer-sample.sh, run by conky at execi 5, which reads the daemon's runtime files into a cache. The sampler owns the kill -0 liveness check, because conky's Lua cannot run a process and a dead daemon must read as 'fermo' rather than a stale 'running'. Drops outside the work-hours window freeze the countdown while the phase stays 'working'. The sampler detects this from the remain file's age and the card reads it as 'outside working hours', which also covers a hung daemon. The phase words and colour roles live in data.breaktimer_parse so they are unit-tested; the card only draws the result. --- test/fixtures/breaktimer_cache | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 test/fixtures/breaktimer_cache (limited to 'test/fixtures/breaktimer_cache') diff --git a/test/fixtures/breaktimer_cache b/test/fixtures/breaktimer_cache new file mode 100644 index 0000000..23a147a --- /dev/null +++ b/test/fixtures/breaktimer_cache @@ -0,0 +1,6 @@ +generated 1758200000 +running yes +state running +phase working +remain 1471 +frozen no -- cgit v1.2.3