------------------------------------------------------------------------------- |-- Module : XMonad.Actions.WithAll-- License : BSD3-style (see LICENSE)-- Stability : unstable-- Portability : unportable---- Provides functions for performing a given action on all windows of-- the current workspace.-----------------------------------------------------------------------------moduleXMonad.Actions.WithAll(-- * Usage-- $usagesinkAll,withAll,withAll',killAll)whereimportData.Foldablehiding(foldr)importXMonadimportXMonad.CoreimportXMonad.OperationsimportXMonad.StackSet-- $usage---- You can use this module with the following in your @~\/.xmonad\/xmonad.hs@:---- > import XMonad.Actions.WithAll---- 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 the current workspace.withAll'::(Window->WindowSet->WindowSet)->X()withAll'f=windows$\ws->letall'=integrate'.stack.workspace.current$wsinfoldrfwsall'-- | Execute an 'X' action for each window on the current workspace.withAll::(Window->X())->X()withAllf=withWindowSet$\ws->letall'=integrate'.stack.workspace.current$wsinforM_all'f-- | Kill all the windows on the current workspace.killAll::X()killAll=withAllkillWindow