Sweets
Configuration

Environment

Export environment variables to commands launched by Sweets with sweets.env.

sweets.env(name, value) adds an environment variable for commands launched by Sweets.

sweets.env("MOZ_ENABLE_WAYLAND", "1")
sweets.env("GTK_IM_MODULE", "fcitx")
sweets.env("QT_QPA_PLATFORM", "wayland;xcb")

Both arguments must be strings. name must be non-empty and cannot contain =, and neither argument can contain embedded NUL bytes. If the same name is configured more than once, the later value wins.

Environment entries are applied during startup and after a successful config reload, so future spawn actions inherit them. A failed reload keeps the previous configuration and environment active.

Configuration sections reject unknown fields, wrong value types, invalid ranges, and invalid colors. A failed reload keeps the complete previous configuration active, so a typo cannot partially apply a section. Border fields formerly placed in sweets.layout must be moved to sweets.border, and the former sweets.layout({ gaps = ... }) field must be replaced with sweets.gaps.