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 with the failing file, line, and message. 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".
The bar is drawn by the sweetnag helper. Changes apply the next time it
appears, so save a broken config to preview them — or run
echo test | sweetnag --bg "#1E2030".
Limits
Sweets streams the message to sweetnag without pausing input or rendering. A
hung helper gets a short shutdown grace period, then is forced closed.
The on-screen message is capped at 64 KiB. Larger errors end with a truncation
notice; the full error stays available through sweetctl config-error.
Run directly, sweetnag accepts at most 64 KiB on stdin and rejects input
containing a NUL byte. Very long messages are ellipsized and the bar is capped
at 1024 logical pixels high. Invalid output dimensions make the helper close
cleanly rather than request an unsafe buffer.
sweetctl config reports the active values as notify_background,
notify_text, notify_accent, and notify_font.