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 =.
Neither argument can contain NUL bytes. If the same name is set twice, the later
value wins.
Variables are applied at startup, so they override inherited values and every
spawn action inherits them. An empty value exports the name as an empty
string; it does not unset it.
Reload stages all environment changes together. A successful reload applies the new values and unsets names the previous config managed but the new one omits. If anything fails, Sweets restores the exact prior environment and keeps the previous config active.
Config sections reject unknown fields, wrong types, invalid ranges, and
invalid colors. A failed reload keeps the entire previous config, so a typo
cannot partially apply a section. Border fields once in sweets.layout now
belong in sweets.border, and sweets.layout({ gaps = ... }) is now
sweets.gaps.