xmonad-contrib/MagicFocus.hs
2007-06-13 03:53:23 +00:00

11 lines
300 B
Haskell

module XMonadContrib.MagicFocus (magicFocus) where
import XMonad
import StackSet
magicFocus l = l { doLayout = \s -> (doLayout l) s . swap
, modifyLayout = \x -> fmap magicFocus `fmap` modifyLayout l x }
swap :: Stack a -> Stack a
swap (Stack f u d) = Stack f [] (reverse u ++ d)