diff options
author | Don Stewart <dons@cse.unsw.edu.au> | 2007-04-11 09:34:56 +0200 |
---|---|---|
committer | Don Stewart <dons@cse.unsw.edu.au> | 2007-04-11 09:34:56 +0200 |
commit | cb0fe85e5bf43ea2076bb5328ae77dada32439e6 (patch) | |
tree | 7e31c8f2fdee2d831d3bce803457e7464e588536 /Operations.hs | |
parent | e33a440f2457661ac6e1ac80fc523fd7be3e8091 (diff) | |
download | xmonad-cb0fe85e5bf43ea2076bb5328ae77dada32439e6.tar.gz xmonad-cb0fe85e5bf43ea2076bb5328ae77dada32439e6.tar.xz xmonad-cb0fe85e5bf43ea2076bb5328ae77dada32439e6.zip |
Change semantics of 'promote'.
Previously 'promote' would move the currently focused window into the
master position in tiled mode. This was *almost* a cycle of the windows,
but not quite (depending on where the focus was, it was in fact a
cycle).
Now we do the obvious generalisation, and just cycle the current window
stack. Simpler to understand, simpler to reason about.
darcs-hash:20070411073456-9c5c1-3ee88f9ac46e2301b4c803ec4fd66798e6fee91d.gz
Diffstat (limited to 'Operations.hs')
-rw-r--r-- | Operations.hs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/Operations.hs b/Operations.hs index b181414..6118593 100644 --- a/Operations.hs +++ b/Operations.hs @@ -34,7 +34,7 @@ refresh = do mapM_ (\(w, rect) -> io $ moveWindowInside d w rect) $ case layoutType fl of Full -> fmap (flip (,) sc) $ maybeToList $ W.peekStack n ws - Tall -> tile (tileFraction fl) sc $ W.index n ws + Tall -> tile (tileFraction fl) sc $ W.index n ws Wide -> vtile (tileFraction fl) sc $ W.index n ws whenJust (W.peekStack n ws) (io . raiseWindow d) whenJust (W.peek ws) setFocus @@ -192,13 +192,9 @@ setBorder w p = withDisplay $ \d -> io $ setWindowBorder d w p raise :: Ordering -> X () raise = windows . W.rotate --- | promote. Make the focused window the master window in its --- workspace --- --- TODO: generic cycling clockwise and anticlockwise --- +-- | promote. Cycle the current tiling order clockwise. promote :: X () -promote = windows $ \w -> maybe w (\k -> W.promote k w) (W.peek w) +promote = windows W.promote -- | Kill the currently focused client kill :: X () |