[Unit]
Description=Lock Omarchy before suspend
# The monitor calls into the running Omarchy shell. Wait until UWSM has imported
# OMARCHY_PATH and WAYLAND_DISPLAY, but keep the default target ordering so the
# monitor starts before graphical-session.target is reached.
After=dbus.socket wayland-session-waitenv.service
Requires=dbus.socket
PartOf=graphical-session.target
ConditionEnvironment=OMARCHY_PATH
ConditionEnvironment=WAYLAND_DISPLAY

[Service]
Type=simple
ExecStart=/usr/bin/omarchy-system-sleep-monitor
Restart=always
RestartSec=2

[Install]
WantedBy=graphical-session.target
