Sweets
Configuration

Recent Windows

A held-modifier switcher over the windows you actually used

Hold a modifier and step through your windows, most recently used first. Letting the modifier go focuses the selection.

sweets.bind("Alt+Tab", "recent_next", "workspace")
sweets.bind("Alt+Shift+Tab", "recent_previous", "workspace")

recent_next selects the runner-up first, so a quick tap swaps the two windows you were using. Each further press moves the selection, and the walk wraps. recent_previous walks the other way.

Scope

Each action accepts an optional scope:

ScopeWindows offered
workspaceThe selected workspace, including a pinned window carried onto it
monitorEvery numbered workspace owned by the selected monitor
allEvery workspace and monitor, including hidden special workspaces

all is the default, so existing bindings without an argument keep their behavior. A hidden populated workspace remains part of its monitor scope in both shared and per-monitor workspace modes. A special workspace belongs to a monitor only while it is shown there.

The scope is resolved when the switcher opens. Changing focus or pressing a binding with another scope while the walk is open does not rebuild its frozen list.

The switcher stays open while any modifier from the chord is still held. Releasing the Shift of Alt+Shift+Tab does not end an Alt walk.

A binding with no modifier has nothing to hold, so it selects and commits in one press. That makes it a one-shot cycle rather than a switcher.

Options

sweets.recent_windows({
  debounce = 750,
  open_delay = 150,
  max_windows = 12,
})
FieldTypeDefaultEffect
enabledbooleantrueWhether the two actions do anything
debouncems750How long a window must be focused to count as recently used
open_delayms150How long the panel is held back after the switcher opens
max_windows1–6412How many windows the list offers
icon_size0–12832Icon edge in logical pixels; 0 draws no icons
backgroundcolor#1C1F26F2Panel background
textcolor#E6E9F0Window titles
secondarycolor#989FB0Application identity beneath each title
selectioncolor#4C7DFFRow highlight
fontstringSans 11Pango font description

The two delays

debounce decides what is in the list. A window focused for less than it, and never typed or clicked in, keeps the place it already had — so windows you passed through on the way somewhere else do not push the one you want down the list. Typing or clicking in a window counts immediately. Set 0 to record every focus.

open_delay decides whether the panel is drawn at all. A tap shorter than it commits without the overlay appearing, which is what you want when you are just swapping between two windows.

The panel

The panel is drawn by the compositor, centered on the selected monitor. It takes no input, reserves no space, and appears in screenshots and screen sharing.

Each row shows the window's title and its application identity. Icons come from the icon the window itself published, so a window that publishes none draws none.

When it refuses

The switcher will not open while the session is locked, while a pointer grab is active, or while a workspace is sliding on the selected monitor. It closes without changing focus if the session locks, a client grabs your shortcuts, a binding mode changes, the session pauses, or you reload with a changed sweets.recent_windows.

Reloading otherwise affects the next switcher only. It never retargets one you are holding open.

On this page