mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 22:59:15 +00:00
vanadium: move xmonad config
This commit is contained in:
parent
ef4aa7d5db
commit
0342f5e87c
6 changed files with 4 additions and 1 deletions
|
|
@ -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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue