mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 03:20:21 -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:
parent
0c6fdf4e75
commit
7a2001cfa2
@ -302,6 +302,11 @@
|
||||
|
||||
* Add support for GHC 9.0.1.
|
||||
|
||||
* `XMonad.Actions.WithAll`
|
||||
|
||||
- Added `killOthers`, which kills all unfocused windows on the
|
||||
current workspace.
|
||||
|
||||
* `XMonad.Prompt.XMonad`
|
||||
|
||||
- Added `xmonadPromptCT`, which allows you to create an XMonad
|
||||
|
@ -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
|
||||
|
@ -336,8 +336,8 @@ edit your key bindings.
|
||||
Experimental rewrite of "XMonad.Layout.WindowNavigation".
|
||||
|
||||
* "XMonad.Actions.WithAll":
|
||||
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.
|
||||
|
||||
* "XMonad.Actions.Workscreen":
|
||||
A workscreen permits to display a set of workspaces on several screens. In
|
||||
|
Loading…
x
Reference in New Issue
Block a user