Tags: patch
Severity: wishlist

Now we have a useful command ‘window-swap-states’ whose only drawback is that
it operates on a random window, i.e. a next window in some mystic cyclic ordering
whose logic I've never been able to understand.

To simplify its logic, windmove could be extended to support directional swapping
where the user can point at the window whose state should be swapped
with the selected window.

As a funny effect, when windows are arranged as 4x4 square tiles, e.g.

(window-state-put
 '(()
   hc
   (vc
    (leaf (buffer "1"))
    (leaf (buffer "5"))
    (leaf (buffer "9"))
    (leaf (buffer "13")))
   (vc
    (leaf (buffer "2"))
    (leaf (buffer "6"))
    (leaf (buffer "10"))
    (leaf (buffer "14")))
   (vc
    (leaf (buffer "3"))
    (leaf (buffer "7"))
    (leaf (buffer "11"))
    (leaf (buffer "15")))
   (vc
    (leaf (buffer "4"))
    (leaf (buffer "8"))
    (leaf (buffer "12"))
    (leaf (buffer " "))))
 (frame-root-window))

sliding them has the same feeling like solving the 15 puzzle :)