mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-07-31 20:21:51 -07:00
add new LayoutCombinators module.
This commit is contained in:
3
Combo.hs
3
Combo.hs
@@ -17,7 +17,8 @@
|
||||
module XMonadContrib.Combo (
|
||||
-- * Usage
|
||||
-- $usage
|
||||
combo, combineTwo
|
||||
combo, combineTwo,
|
||||
CombineTwo
|
||||
) where
|
||||
|
||||
import Control.Arrow ( first )
|
||||
|
41
LayoutCombinators.hs
Normal file
41
LayoutCombinators.hs
Normal file
@@ -0,0 +1,41 @@
|
||||
{-# OPTIONS_GHC -fglasgow-exts #-} -- For deriving Data/Typeable
|
||||
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, PatternGuards #-}
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
-- |
|
||||
-- Module : XMonadContrib.LayoutCombinators
|
||||
-- Copyright : (c) David Roundy <droundy@darcs.net>
|
||||
-- License : BSD
|
||||
--
|
||||
-- Maintainer : David Roundy <droundy@darcs.net>
|
||||
-- Stability : unstable
|
||||
-- Portability : portable
|
||||
--
|
||||
-- A module for combining Layouts
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
module XMonadContrib.LayoutCombinators (
|
||||
-- * Usage
|
||||
-- $usage
|
||||
(<|>), (</>), (<||>), (<//>)
|
||||
) where
|
||||
|
||||
import XMonad
|
||||
import Operations ( Tall(..), Mirror(..) )
|
||||
import XMonadContrib.Combo
|
||||
import XMonadContrib.DragPane
|
||||
|
||||
-- $usage
|
||||
-- Use LayoutCombinators to easily combine Layouts.
|
||||
|
||||
(<||>), (<//>) :: (Read a, Eq a, LayoutClass l1 a, LayoutClass l2 a) =>
|
||||
l1 a -> l2 a -> CombineTwo DragPane l1 l2 a
|
||||
(<|>) :: (Read a, Eq a, LayoutClass l1 a, LayoutClass l2 a)
|
||||
=> l1 a -> l2 a -> CombineTwo Tall l1 l2 a
|
||||
(</>) :: (Read a, Eq a, LayoutClass l1 a, LayoutClass l2 a)
|
||||
=> l1 a -> l2 a -> CombineTwo (Mirror Tall) l1 l2 a
|
||||
|
||||
(<||>) = combineTwo (dragPane Vertical 0.1 0.5)
|
||||
(<//>) = combineTwo (dragPane Horizontal 0.1 0.5)
|
||||
(<|>) = combineTwo (Tall 1 0.1 0.5)
|
||||
(</>) = combineTwo (Mirror $ Tall 1 0.1 0.5)
|
@@ -44,6 +44,7 @@ import XMonadContrib.FocusNth ()
|
||||
import XMonadContrib.Grid ()
|
||||
import XMonadContrib.Invisible ()
|
||||
-- import XMonadContrib.HintedTile ()
|
||||
import XMonadContrib.LayoutCombinators ()
|
||||
import XMonadContrib.LayoutModifier ()
|
||||
import XMonadContrib.LayoutHints ()
|
||||
import XMonadContrib.LayoutScreens ()
|
||||
|
Reference in New Issue
Block a user