[xmonad] how do I get a layout like this?

Karl Hasselström kha-xmonad at hemma.treskal.com
Wed Jan 21 17:06:29 EST 2009


On 2009-01-21 08:50:14 -0700, Wirt Wolff wrote:

> -- cycle unfocused windows toward the master doing nothing on empty workspaces
> nextUnfocused :: X ()
> nextUnfocused = windows $ W.modify' towardMaster
>
> -- cycle unfocused windows away from the master doing nothing on empty workspaces
> prevUnfocused :: X ()
> prevUnfocused = windows $ W.modify' awayFromMaster
>
> -- cycle unfocused toward master on a Stack
> towardMaster:: W.Stack a -> W.Stack a
> towardMaster(W.Stack t [] rs) =
>     case rs of []   -> W.Stack t [] rs
>                x:xs -> W.Stack t [] (xs ++ [x])
> towardMaster(W.Stack t ls rs) =
>     case rs of []   -> W.Stack t (reverse $ vs ++ [v]) []
>                x:xs -> W.Stack t (reverse $ vs ++ [x]) (xs ++ [v])
>             where (v:vs) = reverse ls
>
> -- cycle unfocused away from master on a Stack
> awayFromMaster :: W.Stack a -> W.Stack a
> awayFromMaster = reverseStack . towardMaster . reverseStack
>     where reverseStack (W.Stack t ls rs) = W.Stack t rs ls

Hmm, I'd like to do something like this, but cycle through the windows
that are currently not _visible_. I've looked through the
documentation, but I can't find any way to tell if a given window is
currently visible.

-- 
Karl Hasselström, kha at treskal.com
      www.treskal.com/kalle


More information about the xmonad mailing list