Startup Programs
Start programs once when a Sweets session becomes ready
sweets.exec_once(command) starts a program once per session.
sweets.exec_once("waybar")
sweets.exec_once("veila")
sweets.exec_once("awww-daemon")Commands run in order once the Wayland socket and IPC are up. They inherit
WAYLAND_DISPLAY, SWEETS_SOCKET, and your
sweets.env variables.
Reloading changes the commands for the next session. It never launches, stops, or restarts anything in the current one.
Cleanup on logout
On systemd, each program runs in a per-session slice
(sweets-session-<WAYLAND_DISPLAY>.slice) and stops at logout, forked daemons
included. This needs a real login session started by sweets-session from a TTY
or display manager — a nested Sweets run spawns programs directly.
Without systemd, Sweets supervises the process group, asks it to stop on shutdown, and forces termination after a timeout. A command that fully daemonizes into a new session escapes this and may need its own logout script.
A systemd session also runs XDG autostart entries. Configure each program in
one place only — its .desktop file or sweets.exec_once — or it starts
twice.