xmonad: refactor module path

This commit is contained in:
Primrose 2025-03-01 23:54:42 +01:00
parent efed662511
commit af6f93779b
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
3 changed files with 3 additions and 3 deletions

View file

@ -1,26 +0,0 @@
module XMonad.Leana.Layouts.ReflectMsg where
import XMonad (
Resize (Expand, Shrink),
SomeMessage (SomeMessage),
fromMessage,
)
import XMonad.Layout.LayoutModifier (
LayoutModifier (handleMess, handleMessOrMaybeModifyIt),
ModifiedLayout (ModifiedLayout),
)
data ReflectMsg a = ReflectMsg deriving (Show, Read)
reflectMsg :: l a -> ModifiedLayout ReflectMsg l a
reflectMsg = ModifiedLayout ReflectMsg
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
-- Handle the rest by passing it on
| otherwise = do
mm <- handleMess m mess
return (Left <$> mm)