xmonad: reflect IncMaster '<' '>' messages

This commit is contained in:
Primrose 2025-03-02 00:04:40 +01:00
parent af6f93779b
commit d4910ded6b
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
2 changed files with 4 additions and 5 deletions

View file

@ -1,6 +1,9 @@
{-# LANGUAGE NegativeLiterals #-}
module Leanamonad.Layouts.ReflectMsg where
import XMonad (
IncMasterN (IncMasterN),
Resize (Expand, Shrink),
SomeMessage (SomeMessage),
fromMessage,
@ -20,6 +23,7 @@ instance LayoutModifier ReflectMsg a where
handleMessOrMaybeModifyIt m mess
| Just Shrink <- fromMessage mess = return . Just . Right $ SomeMessage Expand
| Just Expand <- fromMessage mess = return . Just . Right $ SomeMessage Shrink
| Just (IncMasterN n) <- fromMessage mess = return . Just . Right $ SomeMessage (IncMasterN (n * -1))
-- Handle the rest by passing it on
| otherwise = do
mm <- handleMess m mess