mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
xmonad: reflect IncMaster '<' '>' messages
This commit is contained in:
parent
af6f93779b
commit
d4910ded6b
2 changed files with 4 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue