From 685d67d19d2e94fc94ed7334e5e7ab19454426d7 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Mon, 28 Mar 2022 23:27:45 -0600 Subject: Fix things that Hlint is complaining about. --- src/Internal/LayoutDraw.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/Internal/LayoutDraw.hs') diff --git a/src/Internal/LayoutDraw.hs b/src/Internal/LayoutDraw.hs index 8b029bd..131b32b 100644 --- a/src/Internal/LayoutDraw.hs +++ b/src/Internal/LayoutDraw.hs @@ -43,17 +43,17 @@ import qualified XMonad.StackSet as S drawLayout :: X (Bool, String, String) drawLayout = do winset <- X.gets X.windowset - let layout = S.layout $ S.workspace $ S.current $ winset + let layout = S.layout $ S.workspace $ S.current winset -- Gotta reset the layout to a consistent state. - layout' <- foldM (flip ($)) layout $ [ + layout' <- foldM (flip ($)) layout [ handleMessage' $ ModifyWindowBorder $ const $ Border 0 0 0 0, - handleMessage' $ Unzoom + handleMessage' Unzoom ] (cached, xpm) <- drawXpmIO layout' - return $ (cached, X.description layout, printf "" xpm) + return (cached , X.description layout, printf "" xpm) -- Returns true if a point is inside a rectangle (inclusive). pointInRect :: (Dimension, Dimension) -> Rectangle -> Bool @@ -98,14 +98,14 @@ drawXpmIO l = do (S.Workspace "0" l (S.differentiate [1 .. 5])) (Rectangle 0 0 ((w + shrinkAmt) * sf) ((h + shrinkAmt) * sf)) - let rects = flip map rects' $ \(_, (Rectangle x y w h)) -> + let rects = flip map rects' $ \(_, Rectangle x y w h) -> Rectangle (x `div` sf) (y `div` sf) (w `div` sf) (h `div` sf) X.liftIO $ do exists <- doesFileExist iconPath createDirectoryIfMissing True iconCacheDir - when (not exists) $ do + unless exists $ do let xpmText = drawXpm (w, h) (zip (cycle colors) rects) 4 writeFile iconPath xpmText -- cgit