testsAndMisc/python_pkg/morning_routine/morning-routine.service
Krzysztof kuhy Rudnicki c80f7cc112 morning_routine: unified alarm+lock orchestrator, fix alarm audio/reliability
- New python_pkg/morning_routine package: sequential orchestrator runs wake
  alarm then workout lock as blocking subprocesses (one fullscreen owner at
  a time). Deployed as morning-routine.service; sleep hook updated to start
  it on hibernate-resume instead of the standalone wake-alarm.service.

- wake_alarm: force G27Q HDMI card profile on at alarm time, poll up to 6s
  for sink to appear, set as default + unmute 100%. Alarm now persists until
  the typeable code is entered (no more silent 30-min give-up). Service gets
  DISPLAY=:0 + ExecStartPre sleep 1 to fix cold-boot Tkinter crash.

- phone_focus_mode/config.sh: whitelist Revolut, mObywatel, VaultKitBypass.

- 100% branch coverage maintained across wake_alarm and morning_routine.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25 18:55:27 +02:00

21 lines
784 B
Desktop File

[Unit]
Description=Unified Morning Routine (wake alarm + workout lock)
After=graphical-session.target
[Service]
Type=simple
# Started by the systemd-sleep hook on resume (NOT auto-started at login), so
# there is intentionally no [Install] WantedBy=graphical-session.target: the
# alarm must only run on a real wake, never on an ordinary evening login.
# DISPLAY/PYTHONPATH mirror workout-locker.service so Tk can open the X server;
# the short sleep lets the resumed session export DISPLAY first.
Environment=DISPLAY=:0
Environment=PYTHONPATH=%h/testsAndMisc
ExecStartPre=/bin/sleep 1
ExecStart=/usr/bin/python -m python_pkg.morning_routine._orchestrator --with-alarm --production
WorkingDirectory=%h/testsAndMisc
Restart=on-failure
RestartSec=2s
RestartPreventExitStatus=0
User=%u