Do you mean window title in Polybar/Xmobar/...? What is the way you output your window title? This is not the answer to your question, just a code snippet of how I deal with window/workspace titles, but I think it might help you in your quest: myLogHook = withWindowSet $ \winset -> do title <- case S.peek winset of Nothing -> pure "" Just window -> runQuery title window >>= \wTitle -> if (length wTitle <= 150) then pure wTitle else runQuery className window >>= \wClassName -> if (wClassName `elem` ["xterm", "st-256color", "urxvt"]) then pure "Terminal" else pure wClassName -- sort' <- getSortByIndex let current = S.currentTag winset sortedWorkspaces = sort' $ S.workspaces winset workspaces = intercalate " " $ sortedWorkspaces <&> \w -> let stack = S.stack w numWindows = length $ S.integrate' stack subscript = toSubscript <$> show numWindows in if | (S.tag w) == current -> if | numWindows > 0 -> "⬤" <> subscript | otherwise -> "⬤" | isJust stack -> "🞊" <> subscript | otherwise -> "🞆" toSubscript = \case '0' -> '₀' '1' -> '₁' '2' -> '₂' '3' -> '₃' '4' -> '₄' '5' -> '₅' '6' -> '₆' '7' -> '₇' '8' -> '₈' '9' -> '₉' '+' -> '₊' '-' -> '₋' '=' -> '₌' '(' -> '₍' ')' -> '₎' _ -> '_' -- withDisplay $ \display -> io $ do let displayStr = X11.displayString display runtimeDir <- getEnv "XDG_RUNTIME_DIR" forM_ [ (title, runtimeDir <> "/window-title-" <> displayStr) , (workspaces, runtimeDir <> "/workspaces-" <> displayStr) ] $ \(out, fifo) -> do fileExists <- doesFileExist fifo when fileExists $ appendFile fifo (out <> "\n") myStartupHook = withDisplay $ \display -> io $ do let displayStr = X11.displayString display runtimeDir <- lookupEnv "XDG_RUNTIME_DIR" >>= \case Just dir -> pure dir Nothing -> do uid <- getEnv "UID" let dir = "/run/user/" <> uid setEnv "XDG_RUNTIME_DIR" dir pure dir forM_ [ runtimeDir <> "/window-title-" <> displayStr , runtimeDir <> "/workspaces-" <> displayStr ] $ \fifo -> do fileExists <- doesFileExist fifo unless fileExists $ safeSpawn "mkfifo" [fifo] Just traverse you window set looking for duplicate window titles and add your custom labels to them when you output it to your status bar. Another solution which I personally use is using a tiny white border to distinguish my current window: ... , focusFollowsMouse = True , clickJustFocuses = False , borderWidth = 1 , normalBorderColor = "black" , focusedBorderColor = "white" ... and using "smartBorders" to hide them when there's only a single window in a workspace: import XMonad.Layout.NoBorders (smartBorders) ... myLayoutHook = smartBorders $