Skip to content
Search

XMonad.Layout.Spacing

lastmod 2026-11-10created 2020-12-012 edits

XMonad.Layout.Spacing is an xmonad contrib module, a layout modifier that adds empty gaps between tiled windows and at the screen edges. It wraps an existing layout, as in spacing n, to add margins in pixels; in recent versions, spacingRaw lets you set the screen border and window border margins separately and turn off the gap when there is only one window. It is used for decoration, to visually separate window borders.

Example

import XMonad.Layout.Spacing(spacing)

opmLayout = avoidStruts (tabbed shrinkText opmTabConfig ||| tiled ||| Mirror tiled ||| Full)
    where
        -- default tiling algorithm partitions the screen into two panes
        tiled = spacing 2 $ Tall nmaster delta ratio

        -- The default number of windows in the master pane
        nmaster = 1

        -- Default proportion of screen occupied by master pane
        ratio = 1/2

        -- Percent of screen to increment by when resizing panes
        delta = 3/100

See also

author Zer0, MCPBot sitemap