5

I am trying to set up XMonad so that multiple windows have gaps between them. The relevant part of my config file is as follows

import XMonad.Layout.Spacing

followed later by

myLayout = tiled ||| Mirror tiled ||| Full
  where
    tiled = spacing 5 $ Tall nmaster delta ratio
    nmaster = 1
    ratio = 1/2
    delta = 3/100

The problem is that when one window occupied the whole screen there are gaps along the border. Is there a way to adjust my configuration so that these gaps do not appear when there is only one window?

Brian Fitzpatrick
  • 2,755
  • 3
  • 23
  • 43

1 Answers1

7

Have a look at smartSpacing: (see Xmonad Spacing Docs)

Surrounds all windows with blank space, except when the window is the only visible window on the current workspace.

I.e., changing

tiled = spacing 5 $ Tall nmaster delta ratio

to

tiled = smartSpacing 5 $ Tall nmaster delta ratio

should to the trick.

Psirus
  • 417
  • 2
  • 7
  • spacingRaw should be used now: http://hackage.haskell.org/package/xmonad-contrib-0.16/docs/XMonad-Layout-Spacing.html – Ankush Jul 31 '20 at 15:21