{-# LANGUAGE TypeSynonymInstances, MultiParamTypeClasses #-}
module XMonad.Layout.MultiToggle.Instances (
StdTransformers(..)
) where
import XMonad.Layout.MultiToggle
import XMonad
import XMonad.Layout.NoBorders
import XMonad.Layout.LayoutModifier
data StdTransformers = FULL
| NBFULL
| MIRROR
| NOBORDERS
| SMARTBORDERS
deriving (ReadPrec [StdTransformers]
ReadPrec StdTransformers
Int -> ReadS StdTransformers
ReadS [StdTransformers]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StdTransformers]
$creadListPrec :: ReadPrec [StdTransformers]
readPrec :: ReadPrec StdTransformers
$creadPrec :: ReadPrec StdTransformers
readList :: ReadS [StdTransformers]
$creadList :: ReadS [StdTransformers]
readsPrec :: Int -> ReadS StdTransformers
$creadsPrec :: Int -> ReadS StdTransformers
Read, Int -> StdTransformers -> ShowS
[StdTransformers] -> ShowS
StdTransformers -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StdTransformers] -> ShowS
$cshowList :: [StdTransformers] -> ShowS
show :: StdTransformers -> String
$cshow :: StdTransformers -> String
showsPrec :: Int -> StdTransformers -> ShowS
$cshowsPrec :: Int -> StdTransformers -> ShowS
Show, StdTransformers -> StdTransformers -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StdTransformers -> StdTransformers -> Bool
$c/= :: StdTransformers -> StdTransformers -> Bool
== :: StdTransformers -> StdTransformers -> Bool
$c== :: StdTransformers -> StdTransformers -> Bool
Eq)
instance Transformer StdTransformers Window where
transform :: forall (l :: * -> *) b.
LayoutClass l Window =>
StdTransformers
-> l Window
-> (forall (l' :: * -> *).
LayoutClass l' Window =>
l' Window -> (l' Window -> l Window) -> b)
-> b
transform StdTransformers
FULL l Window
x forall (l' :: * -> *).
LayoutClass l' Window =>
l' Window -> (l' Window -> l Window) -> b
k = forall (l' :: * -> *).
LayoutClass l' Window =>
l' Window -> (l' Window -> l Window) -> b
k forall a. Full a
Full (forall a b. a -> b -> a
const l Window
x)
transform StdTransformers
NBFULL l Window
x forall (l' :: * -> *).
LayoutClass l' Window =>
l' Window -> (l' Window -> l Window) -> b
k = forall (l' :: * -> *).
LayoutClass l' Window =>
l' Window -> (l' Window -> l Window) -> b
k (forall (l :: * -> *).
LayoutClass l Window =>
l Window -> ModifiedLayout WithBorder l Window
noBorders forall a. Full a
Full) (forall a b. a -> b -> a
const l Window
x)
transform StdTransformers
MIRROR l Window
x forall (l' :: * -> *).
LayoutClass l' Window =>
l' Window -> (l' Window -> l Window) -> b
k = forall (l' :: * -> *).
LayoutClass l' Window =>
l' Window -> (l' Window -> l Window) -> b
k (forall (l :: * -> *) a. l a -> Mirror l a
Mirror l Window
x) (\(Mirror l Window
x') -> l Window
x')
transform StdTransformers
NOBORDERS l Window
x forall (l' :: * -> *).
LayoutClass l' Window =>
l' Window -> (l' Window -> l Window) -> b
k = forall (l' :: * -> *).
LayoutClass l' Window =>
l' Window -> (l' Window -> l Window) -> b
k (forall (l :: * -> *).
LayoutClass l Window =>
l Window -> ModifiedLayout WithBorder l Window
noBorders l Window
x) (\(ModifiedLayout WithBorder Window
_ l Window
x') -> l Window
x')
transform StdTransformers
SMARTBORDERS l Window
x forall (l' :: * -> *).
LayoutClass l' Window =>
l' Window -> (l' Window -> l Window) -> b
k = forall (l' :: * -> *).
LayoutClass l' Window =>
l' Window -> (l' Window -> l Window) -> b
k (forall (l :: * -> *) a.
LayoutClass l a =>
l a -> ModifiedLayout SmartBorder l a
smartBorders l Window
x) (\(ModifiedLayout SmartBorder Window
_ l Window
x') -> l Window
x')