Sweets

Settings Tools

Managed settings and config metadata for tools that edit Sweets settings

This page is for authors of settings apps. You don't need it to configure Sweets by hand.

Managed settings

A settings tool can write managed.lua beside sweets.lua. Sweets recognizes it when the first line is -- Generated by Sweets settings. It currently supports sweets.gaps, sweets.border, and window shadows. Sweets loads it automatically, so leave it out of your includes.

Check a proposed replacement before saving it:

sweets --check-config --managed /path/to/candidate.lua

The check uses the candidate in place of the saved managed file and leaves both files unchanged. Deleting managed.lua restores the values from the other layers.

After replacing the file, check which layer supplied each accepted value. A personal override can keep the effective value the same. Accepted settings

Export settings metadata

sweets --dump-config-schema

This prints versioned JSON with the types, limits, and built-in defaults for sweets.gaps, sweets.border, and sweets.shadow. It works without reading your config or starting Sweets.

On this page