Snapping

Drag a window, hold a trigger, drop it into a zone.

The first placement mode, alongside tiling and scrolling. You keep dragging windows the way you already do. Holding a trigger mid-drag paints the screen with the zones of the current layout, and dropping into one sizes the window to it. Nothing moves unless you move it.

This page is about configuring the mode. The zones themselves are shapes on a grid, and the ones that ship in-box are in the layout gallery. Every key named here has its type, default, and accepted range on the settings reference.

The model

A layout is a set of zones, each a rectangle expressed as a fraction of the screen so the same layout fits any monitor. A screen has one active layout at a time. Drag a window and hold the activation trigger, and the zones of that layout are drawn over the screen. The one under your cursor highlights, and releasing the window fits it to that zone.

Snapping is assigned per screen, per virtual desktop, and per activity, so one monitor can snap while another tiles. Meta+Shift+T cycles the focused screen through the modes you have enabled, and Snapping.Enabled takes the mode out of that rotation entirely.

A window that is snapped is not trapped. Dragging it out restores the size it had before, keyboard shortcuts move it between zones, and Meta+F floats it above the placed windows.

Activation

What summons the overlay is a trigger list, Snapping.Behavior.Triggers, rather than a single modifier. Each entry pairs a modifier with an optional mouse button, and any entry matching brings the zones up. That lets you keep Alt as the habit and add a thumb button for the times your other hand is busy.

The default is one entry, Alt with no mouse button. In config.json that reads:

"Triggers": [ { "modifier": 3, "mouseButton": 0 } ]

The modifier field is not a Qt modifier bitmask, which is the natural assumption and the wrong one. It is a small enumeration:

ValueModifierNotes
0DisabledThe overlay never appears for this trigger.
1Shift
2Ctrl
3AltThe default for drag activation.
4Meta
5Ctrl+Alt
6Ctrl+Shift
7Alt+Shift
8Always activeEvery drag pops the overlay, with nothing held.
9Alt+Meta
10Ctrl+Alt+Meta
11Meta+Shift
12Ctrl+Meta

mouseButton is a Qt button bit, and 0 means no button is required. The left button is not on the list because it is the one already dragging the window.

ValueButton
2Right
4Middle
8Back
16Forward
32Extra 3
64Extra 4
128Extra 5

Two settings change the shape of the gesture rather than what starts it. ToggleActivation makes the trigger a tap to turn the overlay on and a second tap to turn it off, instead of something held. ReleaseGraceMs keeps the overlay alive briefly after the trigger lifts, which matters more than it sounds: with a mouse-button trigger, the same hand releases the button and drops the window, and the button usually lifts a few milliseconds first. Without the grace period that drop would miss.

Setting the modifier to Always active (8) makes every drag show the zones with nothing held. It is the same switch as "Activate on every drag" in the settings app, and it is a modifier value rather than a separate toggle.

Snap assist

After a window lands in a zone, the empty zones can offer thumbnails of your other windows so the rest of the layout fills with a click each. Three settings under Snapping.Behavior.SnapAssist control it, and they stack:

Zone span

A window does not have to take exactly one zone. Holding the span trigger while dragging paints across adjacent zones, and the window is fitted to their combined rectangle on release, so a three-column layout also gives you every two-column pairing without another layout.

The span trigger works like the activation trigger, with its own list, toggle mode, and grace period. There is one wrinkle worth knowing before you hand-edit anything. Snapping.Behavior.ZoneSpan exposes both a Modifier and a Triggers list that hold the same thing. Triggers is the real setting. Modifier is a single-modifier view kept for compatibility. Writing it syncs the value into the first trigger entry, and a config with no stored trigger list has its list synthesized from it. Set one or the other, not both.

The span keyboard shortcuts are a different mechanism from the drag modifier. Ctrl+Alt with an arrow key extends the focused window across the neighbouring zone, and once the span reaches the edge of the layout the same key starts pulling the opposite edge in.

Overlay appearance

The overlay is drawn by a shader, so the zone colours, opacity, borders, and labels are all yours to set. Colours live under Snapping.Zones.Colors. Leaving one empty is not a missing value. It means the zone follows your Plasma colour scheme, which is why they ship empty.

For the shader itself rather than its colours, the overlay shader gallery has the 27 packs that ship in-box and the parameters each exposes.

What happens to windows

Snapping.Behavior.WindowHandling is the group that decides what snapping does to a window over its life, and it is where most surprises get resolved.

Windows you never want touched are better handled globally than per mode. Exclusions holds a minimum width and height, plus a toggle for transient windows such as dialogs, popups, and toolbars. It applies to every placement mode at once.

The edge picker

Dragging a window to a screen edge can open a picker of layouts, so switching the whole screen's layout is part of the same drag that places the window. Snapping.ZoneSelector.TriggerDistance is how close to the edge you have to come, and Position puts the picker anywhere in a three-by-three grid on the screen.

Preview size is automatic unless SizeMode is set to manual. With PreviewLockAspect on, the height follows the width using the screen's own aspect ratio, so the previews are shaped like the screen they represent.

Next