| 1 | [Unit] |
| 2 | Description=HyprKVM Daemon - Hyprland-native software KVM switch |
| 3 | After=graphical-session.target |
| 4 | PartOf=graphical-session.target |
| 5 | |
| 6 | [Service] |
| 7 | Type=simple |
| 8 | # For system-installed binaries (AUR, RPM, etc.) |
| 9 | ExecStart=/usr/bin/hyprkvm daemon |
| 10 | Restart=on-failure |
| 11 | RestartSec=1 |
| 12 | |
| 13 | # Exit code 75 (EX_TEMPFAIL) triggers restart for direction changes |
| 14 | # When a peer notifies us of a direction change, the daemon updates |
| 15 | # its config and exits with code 75 so systemd restarts it with |
| 16 | # the new edge barrier configuration. |
| 17 | RestartForceExitStatus=75 |
| 18 | |
| 19 | # Wayland environment - adjust WAYLAND_DISPLAY if needed |
| 20 | Environment=WAYLAND_DISPLAY=wayland-1 |
| 21 | |
| 22 | [Install] |
| 23 | WantedBy=graphical-session.target |