aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Roundy <droundy@darcs.net>2007-05-23 17:38:41 +0200
committerDavid Roundy <droundy@darcs.net>2007-05-23 17:38:41 +0200
commitab5d6ed970317c336ab1ac476b6829b53723bcd7 (patch)
tree120531b03d553cd38c169fd64e99d52668d9bedb
parentafda9c67a343c112823503fa67b8d8bc434fe251 (diff)
downloadXMonadContrib-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
-rw-r--r--SwapFocus.hs30
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 ()