Run breadd as a systemd user service by default
Best practice for the long-running bread daemon: ship an enabled user unit in skel (~/.config/systemd/user/breadd.service + default.target.wants symlink) instead of a bare Hyprland exec-once. Gives crash-restart, journald logging (journalctl --user -u breadd), and proper lifecycle. - ExecStart uses %h so it works for any account created from skel (not a hardcoded home). - RuntimeDirectoryPreserve=yes so restarting breadd doesn't wipe the shared theme.css that bread-theme writes into /run/user/<uid>/bread. - hyprland.lua: replace the `breadd` exec-once with a Wayland-env import (dbus-update-activation-environment) + `systemctl --user restart breadd`, so the service — which autostarts at login before Hyprland exists — picks up HYPRLAND_INSTANCE_SIGNATURE and can drive the compositor.
This commit is contained in:
parent
0a6e220974
commit
adc316fac6
3 changed files with 28 additions and 1 deletions
21
iso/airootfs/etc/skel/.config/systemd/user/breadd.service
Normal file
21
iso/airootfs/etc/skel/.config/systemd/user/breadd.service
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
[Unit]
|
||||
Description=Bread Runtime Daemon
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
# %h = the user's home — works for any account created from this skel.
|
||||
ExecStart=%h/.local/bin/breadd
|
||||
Restart=on-failure
|
||||
RestartSec=2
|
||||
UMask=0077
|
||||
RuntimeDirectory=bread
|
||||
RuntimeDirectoryMode=0700
|
||||
# Keep /run/user/<uid>/bread across restarts so the shared theme.css that
|
||||
# bread-theme writes there (and the daemon socket) survive a `restart breadd`.
|
||||
RuntimeDirectoryPreserve=yes
|
||||
KillSignal=SIGTERM
|
||||
TimeoutStopSec=5
|
||||
Environment=RUST_LOG=info
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
Loading…
Add table
Add a link
Reference in a new issue