aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Actions/SinkAll.hs
diff options
context:
space:
mode:
authorBrent Yorgey <byorgey@cis.upenn.edu>2009-01-27 23:23:55 +0100
committerBrent Yorgey <byorgey@cis.upenn.edu>2009-01-27 23:23:55 +0100
commit612619d57711601d13c9d65fa7077c281c6c09f1 (patch)
treebfcf6121789dd9a52ebbc02ee070a9821868faa6 /XMonad/Actions/SinkAll.hs
parent3ba5c6f5e274c2c909b579e647f62290c78e4351 (diff)
downloadXMonadContrib-612619d57711601d13c9d65fa7077c281c6c09f1.tar.gz
XMonadContrib-612619d57711601d13c9d65fa7077c281c6c09f1.tar.xz
XMonadContrib-612619d57711601d13c9d65fa7077c281c6c09f1.zip
move XMonad.Actions.SinkAll functionality to more general XMonad.Actions.WithAll, and re-export sinkAll from X.A.SinkAll for backwards compatibility
darcs-hash:20090127222355-1e371-a7beafc93e557a5c5af0a4b224ac0f55f1e37a18.gz
Diffstat (limited to 'XMonad/Actions/SinkAll.hs')
-rw-r--r--XMonad/Actions/SinkAll.hs45
1 files changed, 7 insertions, 38 deletions
diff --git a/XMonad/Actions/SinkAll.hs b/XMonad/Actions/SinkAll.hs
index ada069a..34a104f 100644
--- a/XMonad/Actions/SinkAll.hs
+++ b/XMonad/Actions/SinkAll.hs
@@ -5,48 +5,17 @@
-- Stability : unstable
-- Portability : unportable
--
--- Provides a simple binding that pushes all floating windows on the current
--- workspace back into tiling.
+-- Provides a simple binding that pushes all floating windows on the
+-- current workspace back into tiling. Note that the functionality of
+-- this module has been folded into the more general
+-- "XMonad.Actions.WithAll"; this module simply re-exports the
+-- 'sinkAll' function for backwards compatibility.
-----------------------------------------------------------------------------
module XMonad.Actions.SinkAll (
-- * Usage
-- $usage
- sinkAll, withAll,
- withAll', killAll) where
-import Data.Foldable hiding (foldr)
+ sinkAll) where
-import XMonad
-import XMonad.Core
-import XMonad.Operations
-import XMonad.StackSet
-
--- $usage
---
--- You can use this module with the following in your @~\/.xmonad\/xmonad.hs@:
---
--- > import XMonad.Actions.SinkAll
---
--- then add a keybinding; for example:
---
--- , ((modMask x .|. shiftMask, xK_t), sinkAll)
---
--- For detailed instructions on editing your key bindings, see
--- "XMonad.Doc.Extending#Editing_key_bindings".
-
--- | Un-float all floating windows on the current workspace.
-sinkAll :: X ()
-sinkAll = withAll' sink
-
--- | Apply a function to all windows on current workspace.
-withAll' :: (Window -> WindowSet -> WindowSet) -> X ()
-withAll' f = windows $ \ws -> let all' = integrate' . stack . workspace . current $ ws
- in foldr f ws all'
-
-withAll :: (Window -> X ()) -> X()
-withAll f = withWindowSet $ \ws -> let all' = integrate' . stack . workspace . current $ ws
- in forM_ all' f
-
-killAll :: X()
-killAll = withAll killWindow \ No newline at end of file
+import XMonad.Actions.WithAll (sinkAll)