[Unit]
Description=Notice when a program crashes
Documentation=https://github.com/gibbyb/Panama
# Started per-session by hypr/autostart.lua rather than enabled globally, for
# the same reason as every other Panama unit: graphical-session.target is
# active under GNOME too, and this reports through the Hyprland shell's
# notification server.
#
# PartOf, so it stops with the session that started it. Without it this
# outlived logout -- a journal follower per login, accumulating -- and its
# "once per program per session" dedup silently became once per boot, which is
# the opposite of what it promises: the second crash of the day went unreported
# because the first session had already spoken.
PartOf=graphical-session.target
After=graphical-session.target

[Service]
Type=simple
# Resolved at runtime so a clone at another location still works; bin/ has no
# symlink into ~/.config the way the shell scripts do.
ExecStart=/usr/bin/env sh -c 'exec "${PANAMA_PATH:-$HOME/.local/share/Panama}/bin/panama-crash-watch"'
Restart=on-failure
RestartSec=30
