Sweets
Running

Window Management

How Sweets moves, resizes, and decorates windows, and how taskbars and switchers integrate.

Sweets is a dynamic tiling compositor. Windows tile automatically, and you can move, resize, and float them with the keyboard or the mouse.

Move and resize

Move — hold Super and drag with the left mouse button. A floating window keeps its new position; a tiled window snaps into its slot on release.

Resize — hold Super and drag with the right mouse button. A floating window resizes freely from the nearest corner. A tiled window moves the master/stack split horizontally and trades height with its neighbour vertically.

Tiled resize keeps the last complete frame visible while clients redraw, so partially updated buffers never leave empty regions. Apps that drag their own titlebars work too.

For the full drag-to-reorder mechanics and the drag_center_cursor option, see Mouse Bindings.

Borders and decorations

Each window has a border, and the focused window's is highlighted. Width and colors are configurable — see Layout.

Sweets draws the frame, so clients are asked to drop their own titlebars via xdg-decoration.

Fullscreen and maximize

Toggle fullscreen on the focused window with Super + F. The window covers its output above every other layer.

When another window arrives

Bringing a window onto a workspace that already has a fullscreen or maximized window depends on who set that mode.

  • You toggled it (Super + F or Super + Shift + F) — the mode exits and the arriving window takes focus. Launching something onto a fullscreen terminal drops you straight onto it.
  • The client requested it — games, video players, or a window rule with fullscreen = true — the window keeps the screen and focus, and the newcomer joins in the background. A stray launch cannot yank you out of a game.

A window that explicitly asks for attention through xdg-activation, or a rule with focus = true, is focused either way.

Focus while fullscreen

A fullscreen or maximized window owns keyboard focus on its workspace. The focus-movement keys will not move focus to a window hidden behind it.

Directional focus can still cross to another output, so such a window never traps focus to one screen. Moving focus back onto that monitor lands on the visible window, not one hidden behind it.

The window-movement keys do nothing while a window is fullscreen or maximized — there is no visible reorder. Exit the mode to rearrange.

Focus-follows-mouse does not pull focus away from a focused fullscreen window. Use the focus keys or a click to leave it deliberately.

Focus behavior

Directional focus remembers where you were in a branch. When several windows share the edge you cross, focus lands on the nearest tree-adjacent window by default, and returns to the last window you used in that branch if you have been there.

In Dwindle, focus_right from the master goes to the top-right window. But if you last used the window below it, focus returns there instead. This keeps navigation predictable in both tall stacks and nested splits.

Focus-follows-mouse changes focus when the pointer moves onto a different window, not on every motion within the current one. An explicit keyboard focus survives a stationary or jittering pointer. This matters most with pointer.follow_focus off, where the cursor does not track keyboard focus.

Moving windows across monitors

A window moved onto another monitor lands on the edge it entered from. Moving right makes it the master of that monitor and shifts existing windows back; moving left drops it at the far end of the stack.

Cross-monitor moves remember their place. Send a stacked window to another monitor and move it back, and it returns to the same slot it left. If that slot no longer makes sense — its old neighbor closed, or you moved it elsewhere in between — it lands at the top of the stack.

Pointer behavior

Sweets keeps the pointer with keyboard focus. It can follow focus changes, new windows, and workspace switches, and optionally hide itself after an automatic move.

All of this is configurable in sweets.pointer{ ... }.

Taskbars and window switchers

Sweets implements wlr-foreign-toplevel-management-unstable-v1, so taskbars, launchers, and switchers can list normal windows and request actions.

It reports title, app-id, output, focused state, fullscreen, maximized, and minimized state. Clients may request activate, close, fullscreen, maximize, and minimize.

Minimizing hides a window from the layout and focus while keeping its taskbar entry. Restore it from the taskbar, with the unminimize key action, or with the unminimize IPC command.

Restoring works from any workspace. A window minimized on one workspace can be restored while you are on another, and it reappears on the current one.

Sweets also implements ext-workspace-v1. Panels that support it can list the 10 configured workspaces per output and request activation. Workspaces are static for now — create, remove, assign, and deactivate requests are ignored.

On this page