diff options
| author | Raúl Benencia <id@rbenencia.name> | 2026-01-06 08:55:32 -0300 |
|---|---|---|
| committer | Raúl Benencia <id@rbenencia.name> | 2026-01-06 08:55:32 -0300 |
| commit | 7f8822dd3f0d92b9ebcf5faedc02abeebe09b38a (patch) | |
| tree | 86dff248604753f1901406f766883ba060c2f927 | |
| parent | 7026c1c423f1a6320c885bb50fce6393e65167f6 (diff) | |
Reset active streak after suspend
This avoids starting a session at 2 minutes.
| -rw-r--r-- | org-tempus.el | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/org-tempus.el b/org-tempus.el index 94d1733..190bd46 100644 --- a/org-tempus.el +++ b/org-tempus.el @@ -568,6 +568,9 @@ A session does not reset when switching tasks within (since-last (and last-check (float-time (time-subtract now last-check))))) (setq org-tempus--last-idle-check-time now) + (when (and (numberp since-last) + (> since-last (* 2 org-tempus-idle-check-interval))) + (setq org-tempus--idle-active-streak 0)) (when (and since-last org-tempus-auto-clock-enabled (org-clock-is-active) |
