mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 11:30:22 -07:00
ShowWName: show the name of empty layouts too
This commit is contained in:
parent
07c2c3e7f9
commit
d32fa5ae21
@ -68,9 +68,9 @@ defaultSWNConfig =
|
|||||||
}
|
}
|
||||||
|
|
||||||
instance LayoutModifier ShowWName a where
|
instance LayoutModifier ShowWName a where
|
||||||
redoLayout (SWN True c (Just (_,w))) r _ wrs = deleteWindow w >> flashName c r wrs
|
redoLayout sn r _ wrs = doShow sn r wrs
|
||||||
redoLayout (SWN True c Nothing ) r _ wrs = flashName c r wrs
|
|
||||||
redoLayout (SWN False _ _ ) _ _ wrs = return (wrs, Nothing)
|
emptyLayoutMod sn r wrs = doShow sn r wrs
|
||||||
|
|
||||||
handleMess (SWN _ c (Just (i,w))) m
|
handleMess (SWN _ c (Just (i,w))) m
|
||||||
| Just e <- fromMessage m = handleTimer i e (deleteWindow w >> return Nothing)
|
| Just e <- fromMessage m = handleTimer i e (deleteWindow w >> return Nothing)
|
||||||
@ -81,6 +81,11 @@ instance LayoutModifier ShowWName a where
|
|||||||
| Just Hide <- fromMessage m = return . Just $ SWN True c s
|
| Just Hide <- fromMessage m = return . Just $ SWN True c s
|
||||||
| otherwise = return Nothing
|
| otherwise = return Nothing
|
||||||
|
|
||||||
|
doShow :: ShowWName a -> Rectangle -> [(a,Rectangle)] -> X ([(a, Rectangle)], Maybe (ShowWName a))
|
||||||
|
doShow (SWN True c (Just (_,w))) r wrs = deleteWindow w >> flashName c r wrs
|
||||||
|
doShow (SWN True c Nothing ) r wrs = flashName c r wrs
|
||||||
|
doShow (SWN False _ _ ) _ wrs = return (wrs, Nothing)
|
||||||
|
|
||||||
flashName :: SWNConfig -> Rectangle -> [(a, Rectangle)] -> X ([(a, Rectangle)], Maybe (ShowWName a))
|
flashName :: SWNConfig -> Rectangle -> [(a, Rectangle)] -> X ([(a, Rectangle)], Maybe (ShowWName a))
|
||||||
flashName c (Rectangle _ _ wh ht) wrs = do
|
flashName c (Rectangle _ _ wh ht) wrs = do
|
||||||
d <- asks display
|
d <- asks display
|
||||||
|
Loading…
x
Reference in New Issue
Block a user