diff options
author | David Roundy <droundy@darcs.net> | 2007-05-23 17:38:41 +0200 |
---|---|---|
committer | David Roundy <droundy@darcs.net> | 2007-05-23 17:38:41 +0200 |
commit | ab5d6ed970317c336ab1ac476b6829b53723bcd7 (patch) | |
tree | 120531b03d553cd38c169fd64e99d52668d9bedb /SwapFocus.hs | |
parent | afda9c67a343c112823503fa67b8d8bc434fe251 (diff) | |
download | XMonadContrib-ab5d6ed970317c336ab1ac476b6829b53723bcd7.tar.gz XMonadContrib-ab5d6ed970317c336ab1ac476b6829b53723bcd7.tar.xz XMonadContrib-ab5d6ed970317c336ab1ac476b6829b53723bcd7.zip |
remove SwapFocus (which is no longer possible)
This module depended on the focus stack.
darcs-hash:20070523153841-72aca-0c49b9f141afaeee725da5617384744dedbaccef.gz
Diffstat (limited to '')
-rw-r--r-- | SwapFocus.hs | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/SwapFocus.hs b/SwapFocus.hs deleted file mode 100644 index 0c715ba..0000000 --- a/SwapFocus.hs +++ /dev/null @@ -1,30 +0,0 @@ -module XMonadContrib.SwapFocus ( swapFocus ) where - --- swaps focus with last-focussed window. - --- To use: --- import XMonadContrib.SwapFocus ( swapFocus ) - --- , ((modMask .|. shiftMask, xK_Tab), swapFocus) - -import Control.Monad.State - -import Operations ( refresh ) -import XMonad ( X, WindowSet, windowset ) -import StackSet ( StackSet, peekStack, popFocus, pushFocus, current ) - -sf :: (Integral i, Integral j, Ord a) => StackSet i j a -> Maybe (StackSet i j a) -sf w = do let i = current w - f1 <- peekStack i w - f2 <- peekStack i $ popFocus i f1 w - return $ pushFocus i f2 $ pushFocus i f1 w - -swapFocus :: X () -swapFocus = smartwindows sf - --- | smartwindows. Modify the current window list with a pure function, and only refresh if necesary -smartwindows :: (WindowSet -> Maybe WindowSet) -> X () -smartwindows f = do w <- gets windowset - case (f w) of Just f' -> do modify $ \s -> s { windowset = f' } - refresh - Nothing -> return () |