How do I make the xmonad workspace name display the number of windows?

Good evening, sorry to bother you with the main question.

I recently switched to xmonad. I am very new to haskell and am trying to learn it gradually. I want the workspace name in xmonad to display the number of open windows. I will give an example for better understanding.

I have 3 workspaces, say "ws1", "ws2" and "ws3". I hope I can do it.

| ws1 (n1) | ws2 (n2) | ws3 (n3) |

      

where ws is the name of the workspace and n is the number of windows in each workspace. When I have 3 windows open in ws1, 2 windows will open in ws2 and window 0 will open in ws3, it will be like this.

| ws1 (3) | ws2 (2) | ws3 (0) |

      

I don't know how to set it up in xmonad. Some people on xmonad channel told me that in fact I can display it with

map (\ws -> (w.tag ws ,length . w.integrate . w.stack $ ws) w.workspaces `fmap` withwindowset 

      

but I don't know where I should put this code.

Sorry for my english. I appreciate any help if someone knows how to do this. Thank.

+3


source to share





All Articles