title: Xmonad: when floating a window, move or resize it
body: <p>I prefer to use the keyboard to float or sink windows.  Unfortunately, when floated, windows aren't moved or resized, so there is little visual indication that they aren't still tiled.  Ideally, upon shifting to the float layer, I'd have them move to the center of the screen and/or resize.</p>
  
  <p>The best solution would work together with the function below (or something similar), which I call with a keybind -- I'd like floating via mouse click to still work normally.</p>
  
  <pre><code>toggleFloat = withFocused (\windowId -&gt; do
                                { floats &lt;- gets (W.floating . windowset);
                                  if windowId `M.member` floats
                                  then withFocused $ windows . W.sink
                                  else float windowId })
  </code></pre>
  
  <p>(Code stolen, I still have no grasp of Haskell :c)</p>
  
  <p>Edit: the keysMoveWindowTo stuff in the modified code below can actually just replace "float windowId", which it makes superfluous.</p>