Sweets

Visual Effects

Window opacity, dimming, shadows, and backdrop blur

Set effects for every window here, then change them per app with window rules or layer rules. Changes apply on reload.

Window opacity

-- Unfocused windows are slightly see-through.
sweets.window({ opacity = { focused = 1.0, unfocused = 0.92 } })

-- mpv is always fully opaque.
sweets.window_rule({ app_id = "mpv", opacity = 1.0 })
FormMeaning
opacity = 0.88Same for every state
opacity = { focused = 0.95, unfocused = 0.8 }Per state
opacity = { dragged = 0.7 }While you drag the window
opacity = { fullscreen = 1.0 }While fullscreen covers the monitor

Values go from 0.0 to 1.0. Borders and menus aren't affected. To fade between values, use animations.window_opacity.

A fullscreen value overrides the other states while fullscreen covers the monitor. Without it, the usual focus or drag value applies. Maximized and windowed fullscreen windows keep their usual opacity.

sweets.window({ opacity = { focused = 0.9, unfocused = 0.8, fullscreen = 1.0 } })

A number sets every state. Each table field changes only that state. An app's own transparency remains, even at 1.0.

Dragged windows

Make a window see-through while you drag it, so you can see where it lands:

sweets.window({ opacity = { dragged = 0.7 } })

Without dragged, a window keeps its normal opacity while dragged.

Dimming inactive windows

dim_inactive darkens windows that don't have focus. Unlike opacity, the window stays easy to read.

sweets.window({ dim_inactive = 0.15 })

-- A tinted dim. The alpha sets the strength.
sweets.window_rule({ app_id = "foot", dim_inactive = "#30105066" })

-- Never dim mpv.
sweets.window_rule({ app_id = "mpv", dim_inactive = false })

A number from 0.0 to 1.0 dims with black. Fullscreen windows never dim.

Dialog parents

Darken a window while it has a dialog open, and send clicks on it to the dialog:

sweets.window({ modal_parent = { dim = "#00000066", focus = "dialog" } })
FieldDefaultEffect
dimfalseDarken the parent window, like dim_inactive
focus"parent""dialog" moves focus to the dialog when you click the parent

This works only with apps that mark their dialogs as modal.

Window shadows

Shadows are off by default.

sweets.shadow({
  enabled = true,
  range = 20,
  offset = { 0, 6 },
  color = "#000000B0",
  color_inactive = "#00000060",
})
FieldDefaultEffect
enabledfalseTurn shadows on
range0Shadow size in pixels, 0–100
render_power3How fast it fades, 1–4
offset{ 0, 0 }Move the shadow, { x, y }
scale1.0Grow or shrink the shadow
sharpfalseA hard edge instead of a soft fade
floating_onlyfalseOnly floating windows get shadows
color"#000000B0"Shadow color
color_inactiveunsetColor for unfocused windows

Tiled windows next to each other can darken the gap between them twice. Set floating_only = true to avoid that.

Turn shadows off for one app with shadow = false in a window rule. Panels and launchers get a shadow only from a layer rule.

Backdrop blur

Blur the desktop behind see-through windows. Turn it on globally, then per app:

sweets.blur({
  enabled = true,
  strength = 8,
  saturation = 1.4,
})

sweets.window_rule({ app_id = "foot", blur = true })
FieldDefaultEffect
enabledfalseTurn blur on
mode"optimized""optimized" or "scene"
strength8Blur amount, 1–15
noise0.02Grain, 0.0–0.25
saturation1.0Color strength, 0.0–4.0
brightness1.0Brightness, 0.0–2.0
contrast1.0Contrast, 0.0–2.0
ModeBlursCost
"optimized"Only the wallpaper and bottom panelsLow, even with many windows
"scene"Everything behind the window, other windows includedHigher

A saturation of 1.2–1.5 makes blur over a dark wallpaper look like frosted glass instead of fog.

The window itself must be see-through for blur to show. Set opacity below 1, or use an app with a transparent background.

Some apps ask for blur on their own. That works too, as long as enabled is on.

On this page