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`.
This commit is contained in:
slotThe
2021-03-28 20:22:56 +02:00
parent 6ece010c01
commit 2469269119
186 changed files with 365 additions and 609 deletions

View File

@@ -8,7 +8,7 @@
-- Stability : unstable
-- Portability : unportable
--
-- Provides IfMax layout, which will run one layout if there are maximum N
-- Provides IfMax layout, which will run one layout if there are maximum N
-- windows on workspace, and another layout, when number of windows is greater
-- than N.
--
@@ -23,16 +23,16 @@ module XMonad.Layout.IfMax
, ifMax
) where
import Control.Arrow
import Control.Arrow ((&&&))
import qualified Data.List as L
import qualified Data.Map as M
import Data.Maybe
import XMonad
import XMonad.Prelude
import qualified XMonad.StackSet as W
-- $usage
-- IfMax layout will run one layout if number of windows on workspace is as
-- IfMax layout will run one layout if number of windows on workspace is as
-- maximum N, and else will run another layout.
--
-- You can use this module by adding folowing in your @xmonad.hs@:
@@ -91,4 +91,3 @@ ifMax :: (LayoutClass l1 w, LayoutClass l2 w)
-> l2 w -- ^ Second layout
-> IfMax l1 l2 w
ifMax n l1 l2 = IfMax n l1 l2