Merge pull request #774 from slotThe/nsp/exclusive

X.U.NamedScratchpad: Add exclusive scratchpad capabilities
This commit is contained in:
Tony Zorman
2022-11-11 21:06:10 +01:00
committed by GitHub
6 changed files with 282 additions and 70 deletions

View File

@@ -30,10 +30,11 @@ module XMonad.Layout.IM (
) where
import XMonad
import qualified XMonad.StackSet as S
import XMonad.Layout.Grid
import XMonad.Layout.LayoutModifier
import XMonad.Prelude
import XMonad.Util.WindowProperties
import qualified XMonad.StackSet as S
import Control.Arrow (first)
@@ -110,11 +111,6 @@ applyIM ratio prop wksp rect = do
return (first ((w, masterRect) :) wrs)
Nothing -> runLayout wksp rect
-- | Like find, but works with monadic computation instead of pure function.
findM :: Monad m => (a -> m Bool) -> [a] -> m (Maybe a)
findM _ [] = return Nothing
findM f (x:xs) = do { b <- f x; if b then return (Just x) else findM f xs }
-- | This is for compatibility with old configs only and will be removed in future versions!
data IM a = IM Rational Property deriving (Read, Show)
instance LayoutClass IM Window where