mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-07-31 20:21:51 -07:00
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:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user