{-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-} module Leanamonad.Layout.ResizableTile ( module XMonad.Layout.ResizableTile , RTFixDescription(..) ) where import XMonad import qualified XMonad.StackSet as W import XMonad.Layout.ResizableTile newtype RTFixDescription a = RTFixDescription { unwrapRT :: ResizableTall a } deriving (Read, Show) instance LayoutClass RTFixDescription a where runLayout (W.Workspace t l s) = let ws' = W.Workspace t (unwrapRT l) s in fmap (fmap (fmap RTFixDescription)) . runLayout ws' handleMessage (RTFixDescription l) m = fmap (fmap RTFixDescription) $ handleMessage l m description (RTFixDescription l) = description l <> " " <> show (_nmaster l)