31 Commits

Author SHA1 Message Date
brandon s allbery kf8nh
2cf0a10f5b warn about use of avoidStruts with spacing modifiers 2021-12-22 16:38:11 -05:00
Tomas Janousek
8197cd9105 Fix -Wincomplete-uni-patterns warnings
I am not proud of this.
2021-11-05 10:14:20 +00:00
slotThe
38c11c1e3c Add "Description" field to module headers
Fixes: https://github.com/xmonad/xmonad-contrib/issues/592
2021-09-26 14:15:54 +02:00
slotThe
34af6ebed1 X.L.Spacing: Extend documentation
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
2021-08-29 10:10:49 +02:00
slotThe
4a63999df6 X.L.Spacing: Reorder export list 2021-08-29 10:03:01 +02:00
slotThe
d8f4f841a0 X.L.Spacing: Remove link to backwards compatibility section
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)
2021-08-29 09:37:28 +02:00
Ivan Malison
cadb178819 Undeprecate spacing convenience functions
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)
2021-08-28 10:45:00 +02:00
Joan Milev
f732082fdc Remove all derivations of Typeable
Typeable has been automatically derived for every type since GHC 7.10,
so remove these obsolete derivations.  This also allows us to get rid of
the `DeriveDataTypeable` pragma quite naturally.

Related: https://github.com/xmonad/xmonad/pull/299 (xmonad/xmonad@9e5b16ed8a)
Related: bd5b969d9ba24236c0d5ef521c0397390dbc4b37
Fixes: https://github.com/xmonad/xmonad-contrib/issues/548
2021-06-18 14:10:23 +02:00
slotThe
bd5b969d9b Apply hlint hints
All hints are applied in one single commit, as a commit per hint would
result in 80+ separate commits—tihs is really just too much noise.

Related: https://github.com/xmonad/xmonad-contrib/issues/537
2021-06-06 18:59:05 +02:00
slotThe
538089db83 X.H.EwmhDesktops, X.L.Spacing: Use PatternGuards
Fixes a GHC warning about non-standard pattern guards.

Related: https://github.com/xmonad/xmonad-contrib/issues/537
2021-05-20 17:32:04 +02:00
L. S. Leary
4f23016e54 GHC 7.8 compatibility:
* Explicitly import pure, (<$>), (<*>) and (<$) from Control.Applicative.
 * Use DeriveDataTypeable pragma.
 * Remove type signature from pattern synonym.
2018-07-30 22:50:03 +12:00
Yclept Nemo
3e68036360 XMonad.Layout.Spacing: extreme compatibility
* 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.
2018-07-19 15:06:35 -04:00
Yclept Nemo
2fde742e7a 'XMonad.Layout.Spacing': compatibility tweaks
* 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.
2018-06-14 13:10:19 -04:00
Yclept Nemo
2c53d507ee 'XMonad.Layout.Spacing': backwards compatibility 2018-04-21 11:43:53 -04:00
Yclept Nemo
fdccc873de 'XMonad.Layout.Spacing': the finished product.
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.
2018-04-20 12:55:08 -04:00
Yclept Nemo
f1ed0a5edb 'Layout.Spacing': Improve the smart screen border:
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.
2018-04-20 12:55:08 -04:00
Yclept Nemo
6ae7c2c8b4 Rewrite of 'XMonad.Layout.Spacing':
* Independent screen/window borders
* Configurable top/bottom/right/left borders
2018-04-20 12:55:08 -04:00
Xander Rémon van der Goot
cad6bb7769 X.L.Spacing + X.L.Gaps: add mutual hyperlink
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.
2017-07-03 21:27:58 +02:00
Luc DUZAN
b4e7ab3d37 Add ModifySpacing message handling to SmartPacing and SmartSpacingWithEdge 2017-03-15 17:53:02 +01:00
bb-h8
baf1dd9251 Added missing boundary check in Layout.Spacing.shrinkRect 2016-01-26 21:27:49 +01:00
Adam Vogt
d82bfc6baf adjust an import to fix the build 2015-03-10 18:24:03 +00:00
Adam Vogt
e4fde08a0a merge conflicts in X.L.Spacing
I should have just applied Anton Pirogov March 4 patch.
2015-03-10 18:20:46 +00:00
anton.pirogov
0857f71938 Added messages to adjust the gap dynamically 2015-03-04 08:25:20 +00:00
Adam Vogt
80348bb4b7 X.L.Spacing needs -XPatternGuards now 2015-03-10 18:12:48 +00:00
anton.pirogov
20e69af48b Added messages to adjust the gap dynamically 2015-03-03 21:01:43 +00:00
Felix Crux
6c410a8a00 Layout.Spacing: Outer window edges now get as much spacing as inner ones
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.
2014-12-19 22:36:46 +00:00
daedalusinfinity
4da5da430e Added smart spacing to the spacing module
Added smart spacing to the spacing module, which adds spacing to all windows,
except to windows on singleton workspaces.
2012-09-23 03:45:27 +00:00
Adam Vogt
067ccb950e Export types to reduce haddock warnings. 2010-10-23 19:57:55 +00:00
Adam Vogt
758094e4c7 L.Spacing use imported fi 2011-06-12 19:23:39 +00:00
Adam Vogt
5cd48cac7c Remove trailing whitespace from many modules 2009-07-05 20:12:05 +00:00
Brent Yorgey
2eb98c1437 new layout module X.L.Spacing, put blank space around each window 2009-05-14 21:55:52 +00:00