mirror of
https://github.com/kuhyx/wake-alarm.git
synced 2026-07-04 11:43:02 +02:00
Rewrites python_pkg.wake_alarm imports to wake_alarm, vendors the shared configure_logging helper, drops the monorepo PYTHONPATH from install.sh and the systemd unit (package is now pip-installed), and untracks wake_state.json (runtime HMAC state, now gitignored). Scaffolds standalone lint/test config copied from the already-corrected diet_guard scaffold (pylint --fail-under=10 with tests excluded and the use-implicit-booleaness/consider-using-with disables, mypy's actual disabled-error-code set, ruff ALL, bandit, 100% branch coverage), plus the wave.Wave_write generated-members fix this package's _audio.py needs.
21 lines
682 B
Desktop File
21 lines
682 B
Desktop File
[Unit]
|
|
Description=Weekend Wake Alarm
|
|
After=graphical-session.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
# DISPLAY mirrors workout-locker.service: without DISPLAY the alarm crashes
|
|
# on cold boot with "no display name and no $DISPLAY" (Tk can't open the X
|
|
# server) before systemd retries. The short sleep lets the X session export
|
|
# DISPLAY into the user environment first.
|
|
# No PYTHONPATH needed: wake_alarm is pip-installed (see install.sh /
|
|
# README), so /usr/bin/python finds it via user site-packages.
|
|
Environment=DISPLAY=:0
|
|
ExecStartPre=/bin/sleep 1
|
|
ExecStart=/usr/bin/python -m wake_alarm._alarm --production
|
|
Restart=on-failure
|
|
RestartSec=10
|
|
|
|
[Install]
|
|
WantedBy=graphical-session.target
|