From b5a31508adba95be67ba10acd8fd900716087750 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Fri, 27 Mar 2020 15:35:37 -0400 Subject: [PATCH] REF make this cleaner --- bin/xmonad.hs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bin/xmonad.hs b/bin/xmonad.hs index e45562b..a6c99a3 100644 --- a/bin/xmonad.hs +++ b/bin/xmonad.hs @@ -529,10 +529,7 @@ myGimpClass :: String myGimpClass = "Gimp-2.10" wsOccupied :: Eq a1 => a1 -> W.StackSet a1 l a2 sid sd -> Bool -wsOccupied tag ws = elem tag - $ map W.tag - -- TODO there is likely a much better way to do this... - $ filter (\w -> case W.stack w of { Nothing -> False; _ -> True } ) +wsOccupied tag ws = elem tag $ map W.tag $ filter (isJust . W.stack) -- list of all workspaces with windows on them -- TODO is there not a better way to do this? $ W.workspace (W.current ws) : W.hidden ws ++ map W.workspace (W.visible ws)