
I prefer Devin's solution to mine but just for completeness here is an
updated version of my method which works no matter how many master windows
have been manually added or removed with mod-, or mod-. by resetting the
layout (effectively setting the number of master windows to 1). Thanks to
Brandon for pointing out some silliness I was doing.
data MasterPaneFlag = MasterPaneFlag { getFlag :: Bool }
deriving (Show, Typeable)
instance ExtensionClass MasterPaneFlag where
initialValue = MasterPaneFlag False
pickIncrFun :: Bool -> X ()
pickIncrFun flag = if flag then (sendMessage (IncMasterN (1))) else
(sendMessage (IncMasterN 0))
toggleMasterPane :: X ()
toggleMasterPane = do
flag <- XS.get
XS.modify(MasterPaneFlag . not . getFlag)
asks config >>= \c -> setLayout (XMonad.layoutHook c) >> pickIncrFun
(getFlag flag)
On Thu, Oct 2, 2014 at 3:57 PM, Mike Meyer
Thanks to all for the help. I've now got it done as a configuration using an extension of Tall. I added a note to the issue ( http://code.google.com/p/xmonad/issues/detail?id=577&q=message#makechanges) that it can be closed.
Final question - is there a writeup somewhere on extending the builtin Layouts as Devin showed here?
_______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad