vanadium: move xmonad config

This commit is contained in:
Primrose 2025-05-19 18:07:02 +02:00
parent ef4aa7d5db
commit 0342f5e87c
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
6 changed files with 4 additions and 1 deletions

View file

@ -0,0 +1,28 @@
{-# LANGUAGE NegativeLiterals #-}
module Leanamonad.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)