Users are having trouble with this module all the time. Now that
certain helper functions are undeprecated, we should tell users how they
may use them. It is also worth explaining the scary-looking
`spacingRaw` command a bit further.
Related: https://github.com/xmonad/xmonad-contrib/pull/597
This has been removed already, so remove the link and move the
undeprecated functions out of there.
Related: https://github.com/xmonad/xmonad-contrib/pull/597 (cadb178819fa70b7fc83c69399c11030491de8b9)
These should be undeprecated for several reasons:
- The suggestion to use spacingRaw is pretty ridiculous; the interface
to spacingRaw is very general and flexible, which is great, but I
think that most people probably do not need all of that flexibility,
and one of these convenience functions may suit their needs better.
- There is precendent for having convenience functions like
these (like X.L.Magnifier)
These were deprecated in a rewrite to make X.L.Spacing support a
non-uniform border length, but from a usability perspective wrappers
should always be preferred to such a general interface with rather shaky
documentation.
Related: https://github.com/xmonad/xmonad-contrib/pull/243 (2c53d507ee6c49ab053e17fff0a2149087df3292)
* Explicitly import pure, (<$>), (<*>) and (<$) from Control.Applicative.
* Use DeriveDataTypeable pragma.
* Remove type signature from pattern synonym.
* Reintroduce the original 'ModifySpacing' type and constructor as
deprecated; the new 'ModifySpacing' type was renamed to
'SpacingModifier'. Suggested by @LSLeary.
* Types 'SpacingWithEdge', 'SmartSpacing', and 'SmartSpacingWithEdge'
have been reintroduced as deprecated type synonyms of 'Spacing'. Work
by @LSLeary.
Also 'borderMap' is now exported; it might be useful.
* All the backwards-compatibility functions now accept `Int` rather than
`Integer`: `spacing`, `spacingWithEdge`, `smartSpacing`,
`smartSpacingWithEdge`, `setSpacing`, and `incSpacing`. Work done by
@LSLeary.
* Introduce the new functions `setScreenWindowSpacing`,
`incScreenWindowSpacing`, `decScreenWindowSpacing`. Unlike their
original `setSpacing`, `incSpacing` counterparts, these refresh no
more than once. Requires `sendMessages` from my PR of
`XMonad.Actions.MessageFeedback`. Suggestion by @LSLeary and
implemented so any combination of messages can be sent without
triggering unnecessary refreshes.
Both screen and window borders can now be disabled. Implement missing
messages. The layout now handles windows that are displayed but not part
of the stack, such as those created by 'XMonad.Layout.Decoration'.
Several additional fixes.
The 'smartBorder' now depends on the window/rectangle list resulting
from 'runLayout' rather than the stack, which means that the child
layout will always be called with the screen border. If only a single
window is displayed, it will be expanded into the original layout
rectangle.
These layout have different applications but their names could cause some
confusion since the module names could just as well be swapped. To support this claim,
what we call "spacing" is named "gaps" in i3wm (i3-gaps). Therefore hyperlinks have
been added to inform the reader of the existence of the other module.
Layout.Spacing applies a customizable amount of space around the outside of each
window. At window edges where two windows meet, the total distance between them
is therefore twice the customized value (one space value from each window). At
the edge of the screen, however, the spacing is only applied once. This results
in uneven amounts of spacing and differently-sized gaps on the screen.
This patch extends the Spacing layout to include a further gap all around the
edge of the screen, thus making all spaces around windows equal in size.