33 lines
1.0 KiB
Desktop File
33 lines
1.0 KiB
Desktop File
[Unit]
|
|
Description=monitor-lets-go — automatic monitor layout daemon
|
|
Documentation=https://github.com/mat/monitor-lets-go
|
|
|
|
# Ensure the daemon starts after the graphical session is ready and
|
|
# stops when the session ends.
|
|
PartOf=graphical-session.target
|
|
After=graphical-session.target
|
|
Requires=graphical-session.target
|
|
|
|
[Service]
|
|
# Type=notify with WatchdogSec: the daemon periodically reports health.
|
|
# If it hangs, systemd kills and restarts it — critical for recovering
|
|
# from a black-screen state (restart re-evaluates monitors and applies
|
|
# the correct layout).
|
|
Type=notify
|
|
WatchdogSec=30
|
|
|
|
ExecStart=%h/.local/bin/monitor-lets-go -config %h/.config/monitor-lets-go/config.yaml
|
|
|
|
# Fast restart on failure: if the daemon crashes during docked mode,
|
|
# it will be restarted within 1 second and immediately apply the
|
|
# correct layout for the current hardware state.
|
|
Restart=on-failure
|
|
RestartSec=1
|
|
|
|
# Allow up to 5 seconds for graceful shutdown (portable layout restore).
|
|
KillSignal=SIGTERM
|
|
TimeoutStopSec=5
|
|
|
|
[Install]
|
|
WantedBy=graphical-session.target
|