Are there some elegant way to write a "ManageHook" that inserts a new window conditionally above or below, similar to "insertPosition" in xmonad-contrib? I want it to insert above when there is one window (replace the master), but insert below where there are more windows. Here's what I have tried 1. Have a "Query Bool" that reads the window stack and determines which "ManageHook" to run. Concretely, something like "manageHook = if hasOneWindow then insertPosition ... else mempty". This doesn't work because I need to access "Stack" of the "Workspace" of the "StackSet", and I can't pull that data out of "Query Bool" because I only have it in the context of "Query (Endo WindowSet)". 1. Adapt the "insertPosition" module in xmonad-contrib so that it does either insert above or below depending on the window count. I think this could work, I haven't got it working. It seems like my calculation of amount of windows is flawed because I'm finding the workspace before the new window is inserted. (skill issue) Thanks :)