tenseleyflow/hyprkvm / c2c40ea

Browse files

chore: add systemd user service file

Provides a user service for managing the hyprkvm daemon via systemd.
Configured to auto-restart on exit code 75 (direction change).

Install to ~/.config/systemd/user/hyprkvm.service
Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
c2c40ea10620cca847eb43dc81d20696fc20a652
Parents
e6efc58
Tree
98f5c0e

1 changed file

StatusFile+-
A contrib/systemd/hyprkvm.service 25 0
contrib/systemd/hyprkvm.serviceadded
@@ -0,0 +1,25 @@
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
+# Adjust the path below to match your installation:
9
+#   - If installed via cargo: %h/.cargo/bin/hyprkvm
10
+#   - If built from source: /path/to/hyprKVM/target/release/hyprkvm
11
+ExecStart=%h/.cargo/bin/hyprkvm daemon
12
+Restart=on-failure
13
+RestartSec=1
14
+
15
+# Exit code 75 (EX_TEMPFAIL) triggers restart for direction changes
16
+# When a peer notifies us of a direction change, the daemon updates
17
+# its config and exits with code 75 so systemd restarts it with
18
+# the new edge barrier configuration.
19
+RestartForceExitStatus=75
20
+
21
+# Wayland environment - adjust WAYLAND_DISPLAY if needed
22
+Environment=WAYLAND_DISPLAY=wayland-1
23
+
24
+[Install]
25
+WantedBy=graphical-session.target