Error bar
The sweets.notify block — styling the on-screen config-error bar.
sweets.notify({ ... }) styles the bar shown when your config fails to load. The
bar spans the top of every monitor. It separates the error category, failing
file and best-effort line, message, and full source path so long diagnostics are
easy to scan. See Error reporting for
the behavior.
Every field is optional. Omit the block to keep the default red look.
sweets.notify({
background = "#420F0F", -- bar background
text = "#FFFFFF", -- title and message text
accent = "#ED4545", -- left accent stripe
font = "Monospace 10", -- message font; the title is the same, bolded
})Fields
| Field | Type | Default | Description |
|---|---|---|---|
background | #RRGGBB[AA] | #6B1212 | Bar background. Alpha below FF makes it translucent. |
text | #RRGGBB[AA] | #FFFFFF | Title and message color. The dismiss hint uses it dimmed. |
accent | #RRGGBB[AA] | #ED4545 | Stripe down the left edge. |
font | Pango font string | Monospace 10 | Message font. The title reuses it in bold. |
font takes a Pango font description
— family, optional style, and size. For example "Sans 11" or
"JetBrains Mono 10". Rendering clamps the effective size to 6–72 logical
pixels to keep malformed or extreme font descriptions bounded.
The bar uses the last valid configuration. A broken edit cannot replace its own warning style.
Limits
Sweets draws the bar itself. The title and source are emphasized, and the dim recovery hint sits immediately before the category badge. The message wraps inside a subtle accent-colored panel. Messages use at most five lines before ellipsizing; long paths use middle ellipsis. On narrow outputs, the hint shortens from the beginning so the shortcut remains visible. Text rasterization runs on a bounded worker, so a font lookup cannot pause input or rendering. Diagnostic text is never treated as Pango markup, and buffer sizes are capped.
The bar appears above applications and panels. It is included in output captures but hidden by the secure lock screen. It does not reserve work area.
A valid reload clears the bar. Press MOD+Shift+E to dismiss it without
clearing the recorded error. The next failed reload shows the newest error
again. Inspect the retained diagnostic with:
sweets msg config