diff --git a/XMonad/Hooks/DynamicLog.hs b/XMonad/Hooks/DynamicLog.hs index 8e9dcdcf..c13a2fb5 100644 --- a/XMonad/Hooks/DynamicLog.hs +++ b/XMonad/Hooks/DynamicLog.hs @@ -398,7 +398,11 @@ xmobarColor fg bg = wrap t "" -- | Strip xmobar markup, specifically the , and tags and -- the matching tags like . xmobarStrip :: String -> String -xmobarStrip = xmobarStripTags ["fc","icon","action"] where +xmobarStrip = converge (xmobarStripTags ["fc","icon","action"]) where + +converge :: (Eq a) => (a -> a) -> a -> a +converge f a = let xs = iterate f a + in fst $ head $ dropWhile (uncurry (/=)) $ zip xs $ tail xs xmobarStripTags :: [String] -- ^ tags -> String -> String -- ^ with all ... removed