aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad
diff options
context:
space:
mode:
Diffstat (limited to 'XMonad')
-rw-r--r--XMonad/Actions/GridSelect.hs14
1 files changed, 13 insertions, 1 deletions
diff --git a/XMonad/Actions/GridSelect.hs b/XMonad/Actions/GridSelect.hs
index c83de8b..91735ed 100644
--- a/XMonad/Actions/GridSelect.hs
+++ b/XMonad/Actions/GridSelect.hs
@@ -280,8 +280,20 @@ updateAllElements =
state <- get
updateElements (td_elementmap state)
+grayoutAllElements :: TwoD a ()
+grayoutAllElements =
+ do
+ state <- get
+ updateElementsWithColorizer grayOnly (td_elementmap state)
+ where grayOnly _ _ = return ("#808080", "#808080")
+
updateElements :: TwoDElementMap a -> TwoD a ()
updateElements elementmap = do
+ state <- get
+ updateElementsWithColorizer (gs_colorizer (td_gsconfig state)) elementmap
+
+updateElementsWithColorizer :: (a -> Bool -> X (String, String)) -> TwoDElementMap a -> TwoD a ()
+updateElementsWithColorizer colorizer elementmap = do
TwoDState { td_curpos = curpos,
td_drawingWin = win,
td_gsconfig = gsconfig,
@@ -293,7 +305,7 @@ updateElements elementmap = do
paneX' = div (paneX-cellwidth) 2
paneY' = div (paneY-cellheight) 2
updateElement (pos@(x,y),(text, element)) = liftX $ do
- colors <- gs_colorizer gsconfig element (pos == curpos)
+ colors <- colorizer element (pos == curpos)
drawWinBox win font
colors
cellheight