mirror of
https://github.com/kuhyx/screen-locker.git
synced 2026-11-10 20:07:16 +01:00
Some checks are pending
dependency freshness / dependencies on newest stable (push) Waiting to run
md-naming / markdown naming convention (push) Waiting to run
pre-commit / pre-commit (push) Waiting to run
Tests / test (push) Waiting to run
Tests / lock-popup-safety (push) Waiting to run
release-apk / release (APK) (push) Waiting to run
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
27 lines
925 B
Desktop File
27 lines
925 B
Desktop File
[Unit]
|
|
Description=Workout Screen Locker
|
|
After=graphical-session.target
|
|
# Backstop for any crash the code does not turn into a clean exit 0. The
|
|
# 2026-08-30 no-display loop restarted ~1695 times in three hours at ~6.3s
|
|
# apart -- 1.6 per 10s, which slips under systemd's DEFAULT 5-per-10s limit
|
|
# forever. Over five minutes that same rate trips this and the unit stops,
|
|
# so a restart storm becomes a visibly failed unit instead of a silent one.
|
|
StartLimitIntervalSec=300
|
|
StartLimitBurst=5
|
|
|
|
[Service]
|
|
Type=simple
|
|
# 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.
|
|
Environment=DISPLAY=:0
|
|
ExecStartPre=/bin/sleep 1
|
|
ExecStart=/usr/bin/python3 -m screen_locker.screen_lock --production
|
|
Restart=on-failure
|
|
RestartSec=2s
|
|
RestartPreventExitStatus=0
|
|
User=%u
|
|
|
|
[Install]
|
|
WantedBy=graphical-session.target
|