XMonad – Clickable workspaces

August 8, 2013

One feature DWM has which is missing in XMonad is the clickable workspaces in status bar. There is a very good reason for this, which is that statusbars in XMonad are external applications i.e. XMobar and Dzen2.

To achieve clickable workspaces in XMonad with Dzen2 the following is needed:

– dzen2 (the latest SVN chekout which includes the ^ca functionality)
– XMonad
– xdotool

Include these modules in your xmonad.hs:

import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import Data.List

Comment out your current workspace listing and enter following instead:

If you have any redirects in your ManageHook change them accordingly:

If this does not work report back here: ** regj arch-ed dot dk **

Reference: McManiac @ http://bbs.archlinux.org/viewtopic.php?id=40637&p=8