This can totally be done from your config only without having to modify the core of Xmonad. I found this to be an interesting problem and slapped together a solution that uses XMonad.Util.ExtensibleState.

I added the following to my xmonad.hs:

import qualified XMonad.Util.ExtensibleState as XS
.....
.....
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 1))

toggleMasterPane :: X ()
toggleMasterPane  = do
    flag <- XS.get
    XS.modify(MasterPaneFlag . not . getFlag)
    pickIncrFun (getFlag flag)
.....
.....
--- Add a key binding that calls toggleMasterPane, for me that looks like this
,   ("M-v", toggleMasterPane)


I find the ExtensibleState module allows you to do all sorts of tricks. 


- Chris Wills



On Wed, Oct 1, 2014 at 9:10 PM, Brandon Allbery <allbery.b@gmail.com> wrote:
On Wed, Oct 1, 2014 at 7:03 PM, Devin Mullins <devin.mullins@gmail.com> wrote:

I think another option is to make a new instance of LayoutClass that is just like Tall except for also supporting this message. In fact, you should be able to delegate to Tall for most definitions. Just writing off the cuff - could be wrong.


Delegating to Tall won't work; you'd have to copy the definition and modify it, like I suggested for (|||).

--
brandon s allbery kf8nh                               sine nomine associates
allbery.b@gmail.com                                  ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

_______________________________________________
xmonad mailing list
xmonad@haskell.org
http://www.haskell.org/mailman/listinfo/xmonad