screen-locker/early-bird-workout-check.timer
Krzysztof kuhy Rudnicki 67a8cf5b17 Add heat-skip feature and fix early-bird 9:00 re-check gap
Heat skip: if Warsaw temperature >= 32°C at locker startup, a fullscreen
dark-themed dialog asks the user to confirm skipping. Temperature is always
fetched from wttr.in automatically (user cannot self-report). Fail-closed:
API unavailable → no dialog, normal lock. Placed before skip-credit
consumption so credits are preserved when heat skip is used instead.
Logs a heat_skip entry (with temperature) to workout_log.json; does not
count toward weekly minimum. Visible in --status as "Heat skips (month)".

Early-bird gap fix: the re-check timer now fires at both 08:30 (normal
5:00–8:30 window) and 09:05 (extended 5:00–9:00 window earned by 5+
workout weeks). Previously the 08:30 run would see the window still active
on extended weeks and never re-check after 9:00.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015QCx1roriuXzFgrzFXtugb
2026-06-29 11:23:19 +02:00

18 lines
562 B
SYSTEMD
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[Unit]
Description=Re-check workout after early bird grace period expires (08:30 normal, 09:05 extended)
After=graphical-session.target
[Timer]
# Fires at 08:30 for the normal early-bird window (5:008:30).
# Also fires at 09:05 to catch the extended window (5:009:00) earned by 5+ workout weeks.
# Both runs are idempotent: the service handles "already logged" and "window still active".
OnCalendar=*-*-* 08:30:00
OnCalendar=*-*-* 09:05:00
Unit=workout-locker.service
Persistent=false
AccuracySec=1s
RandomizedDelaySec=0
[Install]
WantedBy=timers.target