Re: darcs patch: add XMonad.Hooks.PlaceNext
Ben Boeckel <mathstuf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: <snip> Hi, Sorry for the self-reply, but I reworked the code to be more general and support toggling of any ManageHook. I also have a patch for X.H.FocusNext if it isn't going to be deprecated (unsure of whether a module which just curry's another module's functions and re-export is worth hanging around). X.H.InsertPosition could also be rewritten or deprecated as well. It is probably worth keeping around because of the ``workaround'' I had to do to get dependent ManageHooks to interact properly. Probably worth documenting as well. myManageHook = composeAll [ goBelow =? False --> (toggleHook hFocus $ doF W.focusDown) , goBelow --> (toggleHook hFocus $ doF W.focusUp) , toggleHook hBelow $ doF W.swapDown ] where goBelow = liftX $ willHook hBelow Since the above/below hook swaps how the focus should be changed, it needs to be meta-conditioned as to which direction to swap the focus. Maybe an operator should be added to go along with (-->) to do if/then/else rather than just if/then. An operator similar to <!> might also be nice. I can write these patches up if so. --Ben
Oops, attaching the patch would be nice I guess. --Ben
participants (1)
-
Ben Boeckel