module XMonad.Util.Minimize
( RectMap
, Minimized(..)
) where
import XMonad
import qualified XMonad.StackSet as W
import qualified Data.Map as M
type RectMap = M.Map Window (Maybe W.RationalRect)
data Minimized = Minimized
{ Minimized -> RectMap
rectMap :: RectMap
, Minimized -> [Window]
minimizedStack :: [Window]
}
deriving (Minimized -> Minimized -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Minimized -> Minimized -> Bool
$c/= :: Minimized -> Minimized -> Bool
== :: Minimized -> Minimized -> Bool
$c== :: Minimized -> Minimized -> Bool
Eq, ReadPrec [Minimized]
ReadPrec Minimized
Int -> ReadS Minimized
ReadS [Minimized]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Minimized]
$creadListPrec :: ReadPrec [Minimized]
readPrec :: ReadPrec Minimized
$creadPrec :: ReadPrec Minimized
readList :: ReadS [Minimized]
$creadList :: ReadS [Minimized]
readsPrec :: Int -> ReadS Minimized
$creadsPrec :: Int -> ReadS Minimized
Read, Int -> Minimized -> ShowS
[Minimized] -> ShowS
Minimized -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Minimized] -> ShowS
$cshowList :: [Minimized] -> ShowS
show :: Minimized -> String
$cshow :: Minimized -> String
showsPrec :: Int -> Minimized -> ShowS
$cshowsPrec :: Int -> Minimized -> ShowS
Show)
instance ExtensionClass Minimized where
initialValue :: Minimized
initialValue = Minimized { rectMap :: RectMap
rectMap = forall k a. Map k a
M.empty
, minimizedStack :: [Window]
minimizedStack = []
}
extensionType :: Minimized -> StateExtension
extensionType = forall a. (Read a, Show a, ExtensionClass a) => a -> StateExtension
PersistentExtension