mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-01 04:31:52 -07:00
X.A.WithAll: Add killOthers
This adds the function `killOthers`, which kills all unfocused windows on the current workspace. As discussed in the PR itself [1], the module suffix `WithAll` is not quite optimal at this point, as we are acting on window _groups_ and not necessarily just all window on a workspace. However, in order to keep this commit atomic, this consideration is postponed until another day. [1]: https://github.com/xmonad/xmonad-contrib/pull/602
This commit is contained in:
committed by
slotThe
parent
0c6fdf4e75
commit
7a2001cfa2
@@ -5,15 +5,16 @@
|
||||
-- Stability : unstable
|
||||
-- Portability : unportable
|
||||
--
|
||||
-- Provides functions for performing a given action on all windows of
|
||||
-- the current workspace.
|
||||
-- Provides functions for performing a given action on all or certain
|
||||
-- groups of windows on the current workspace.
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
module XMonad.Actions.WithAll (
|
||||
-- * Usage
|
||||
-- $usage
|
||||
sinkAll, withAll,
|
||||
withAll', killAll) where
|
||||
withAll', killAll,
|
||||
killOthers) where
|
||||
|
||||
import XMonad.Prelude hiding (foldr)
|
||||
|
||||
@@ -50,3 +51,7 @@ withAll f = withWindowSet $ \ws -> let all' = integrate' . stack . workspace . c
|
||||
-- | Kill all the windows on the current workspace.
|
||||
killAll :: X()
|
||||
killAll = withAll killWindow
|
||||
|
||||
-- | Kill all the unfocused windows on the current workspace.
|
||||
killOthers :: X ()
|
||||
killOthers = withUnfocused killWindow
|
||||
|
Reference in New Issue
Block a user