mirror of
https://github.com/kuhyx/screen-locker.git
synced 2026-11-10 20:27:13 +01:00
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AwtowrowDXx6ccmWVPkCaF
23 lines
1.2 KiB
Desktop File
23 lines
1.2 KiB
Desktop File
[Unit]
|
|
Description=Pull phone workouts into the screen-locker log (crdt_sync)
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
# No WorkingDirectory/PYTHONPATH needed: screen_locker is pip-installed
|
|
# (pip install --user --break-system-packages -e .), so /usr/bin/python3
|
|
# finds it via user site-packages. Run as a module for the same reason the
|
|
# fit check is (see dd233b2) -- it works where nothing is installed.
|
|
#
|
|
# --sync-only is headless: no DISPLAY, no Tk, no lock screen. It pulls other
|
|
# devices' workouts and applies their credit, which the locker itself only
|
|
# did once per process start -- so a workout finished after login was invisible
|
|
# until the next login.
|
|
ExecStart=/usr/bin/python3 -m screen_locker.screen_lock --sync-only
|
|
# Piggyback the arming check on this already-healthy 15-minute timer rather
|
|
# than adding another timer that could itself be silently disabled -- which is
|
|
# the exact failure this check exists to catch (2026-08-04: an ordering cycle
|
|
# disabled early-bird-workout-check.timer and nothing noticed for 13 days).
|
|
# ExecStartPost without "-" means a disarmed locker marks this unit failed, so
|
|
# it surfaces in `systemctl --user --failed` instead of scrolling past.
|
|
ExecStartPost=/usr/bin/python3 %h/src/screen-locker/scripts/check_enforcement_armed.py --quiet
|