17 Commits

Author SHA1 Message Date
slotThe
673f727206 Fix GHC warning: -Wname-shadowing
Related: https://github.com/xmonad/xmonad-contrib/issues/537
2021-05-20 17:32:03 +02:00
slotThe
2469269119 New module: XMonad.Prelude
This is a convenience module in order to have less import noise.  It
re-exports the following:

  a) Commonly used modules in full (Data.Foldable, Data.Applicative, and
     so on); though only those that play nicely with each other, so that
     XMonad.Prelude can be imported unqualified without any problems.
     This prevents things like `Prelude.(.)` and `Control.Category.(.)`
     fighting with each other.

  b) Helper functions that don't necessarily fit in any other module;
     e.g., the often used abbreviation `fi = fromIntegral`.
2021-05-13 17:44:47 +02:00
Tomas Janousek
b989655cea Add Typeable constraint to a few LayoutClass instances
This enables adding the Typeable constraint to LayoutClass itself
(https://github.com/xmonad/xmonad/pull/242) which in turn enables
querying the current layout state. That might be useful to e.g. show the
current X.L.WorkspaceDir in xmobar.

This is a preparation commit that fixes the compile failures that would
result in merging that change to xmonad. For this to be generally useful
we first need to merge (and ideally also release) that xmonad change,
and then we'll need some documentation and perhaps a type class to help
find the right LayoutModifier in the tree of ModifiedLayouts and
Choices. That will come later.
2020-11-09 16:37:30 +00:00
slotThe
53b57eba14 Replace liftM and fmap with <$> 2019-10-08 10:33:56 +02:00
Daniel Schoepe
2ee34742ca Add a way to update the modifier in X.L.LayoutModifier
This patch adds the possibility to update the state of a layout modifier when
modifying the underlying layout before it is run(i.e. using modifyLayout). 
The modified state is also passed to the subsequent call of redoLayout, whose 
return takes precedence if both functions return modified states of the layout 
modifier.
2009-08-22 21:39:58 +00:00
Adam Vogt
54f030faf8 Replace most -fglasgow-exts with specific LANGUAGE pragmas 2009-06-26 02:54:57 +00:00
Joachim Breitner
2480ba1f02 Merge emptyLayoutMod into redoLayout
This removes the emptyLayoutMod method from the LayoutModifier class, and
change the Stack parameter to redoLayout to a Maybe Stack one. It also changes
all affected code. This should should be a refactoring without any change in
program behaviour.
2008-10-05 19:02:20 +00:00
David Roundy
1f2162781f remove myself as maintainer from modules I don't maintain or use. 2008-08-28 15:18:30 +00:00
Brent Yorgey
1f53383e2e XMonad.Layout.LayoutModifier: add a metric crapload of documentation 2008-03-25 20:50:06 +00:00
Andrea Rossato
3ca4966b06 LayoutModifier: reimplement ModifiedLayout using runLayout and more
- change modifyLayout type to get the Workspace
- updated ResizeScreen and ManageDocks accordingly.
2008-02-23 07:56:10 +00:00
Andrea Rossato
6912227914 LayoutModifier: add modifyDescription for completely override the modified layout description 2008-01-28 16:06:14 +00:00
Andrea Rossato
0f0a99e355 LayoutModifier add a modifyLayout
Many layouts are written as layout modifiers because they need to
change the stack of the rectangle before executing doLayout.

This is a major source of bugs. all layout modifiers should be using the
LayoutModifier class. This method (modifyLayout) can be used to
manipulate the rectangle and the stack before running doLayout by the
layout modifier.
2008-01-27 14:02:19 +00:00
Andrea Rossato
e9f0f05217 LayoutModifier: add emptyLayoutMod for dealing with empty workspaces 2008-01-24 01:56:05 +00:00
Andrea Rossato
efc4ad95b8 LayoutModifier: add pureMess and pureModifier to the LayoutModifier class 2008-01-22 11:13:19 +00:00
Spencer Janssen
dc11825588 Remove redundant imports 2007-12-07 23:38:27 +00:00
Andrea Rossato
ec0d5129a3 LayouModifier: haddock docs 2007-11-23 14:25:19 +00:00
Spencer Janssen
cd1884466a Hierarchify 2007-11-01 20:10:59 +00:00