bhh1988
bhh1988

Reputation: 1290

How to get the list of visible workspaces in XMonad?

How do you get a list of visible workspaces (workspaces that are currently displayed on the monitors) in xmonad? Currently in my xmonad.hs config file the command (XMonad.workspaces conf) gives me the list of all workspaces. I'm not very familiar with Haskell and so I'm having trouble understanding the documentation like this: http://xmonad.org/xmonad-docs/xmonad/XMonad-StackSet.html

Upvotes: 3

Views: 2547

Answers (1)

Chris Stryczynski
Chris Stryczynski

Reputation: 34041

visibleWorkspaces :: X [WorkspaceId]
visibleWorkspaces = do
  ws <- gets windowset
  return $ map W.tag $ W.current ws : W.visible ws

Upvotes: 0

Related Questions