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
(Minimized -> Minimized -> Bool)
-> (Minimized -> Minimized -> Bool) -> Eq Minimized
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Minimized -> Minimized -> Bool
== :: Minimized -> Minimized -> Bool
$c/= :: Minimized -> Minimized -> Bool
/= :: Minimized -> Minimized -> Bool
Eq, ReadPrec [Minimized]
ReadPrec Minimized
Int -> ReadS Minimized
ReadS [Minimized]
(Int -> ReadS Minimized)
-> ReadS [Minimized]
-> ReadPrec Minimized
-> ReadPrec [Minimized]
-> Read Minimized
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS Minimized
readsPrec :: Int -> ReadS Minimized
$creadList :: ReadS [Minimized]
readList :: ReadS [Minimized]
$creadPrec :: ReadPrec Minimized
readPrec :: ReadPrec Minimized
$creadListPrec :: ReadPrec [Minimized]
readListPrec :: ReadPrec [Minimized]
Read, Int -> Minimized -> ShowS
[Minimized] -> ShowS
Minimized -> String
(Int -> Minimized -> ShowS)
-> (Minimized -> String)
-> ([Minimized] -> ShowS)
-> Show Minimized
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Minimized -> ShowS
showsPrec :: Int -> Minimized -> ShowS
$cshow :: Minimized -> String
show :: Minimized -> String
$cshowList :: [Minimized] -> ShowS
showList :: [Minimized] -> ShowS
Show)
instance ExtensionClass Minimized where
initialValue :: Minimized
initialValue = Minimized { rectMap :: RectMap
rectMap = RectMap
forall k a. Map k a
M.empty
, minimizedStack :: [Window]
minimizedStack = []
}
extensionType :: Minimized -> StateExtension
extensionType = Minimized -> StateExtension
forall a. (Read a, Show a, ExtensionClass a) => a -> StateExtension
PersistentExtension