[xmonad] Using dzen's new ^ca functionality to switch workspaces with left clicks on dzen's statusbar.

Rasmus Jorgensen siredgar at gmail.com
Sat Feb 14 16:14:36 EST 2009


Hi XMonad users and devs,

I have been using XMonad for a year and a half and being a previous dwm user
I always wanted to have the "left click on ws-tab takes me to ws"
functionality. First step was to hack together bash script and using several
small tools to get the wanted functionality. Can be found here if anyones
interested: http://bbs.archlinux.org/viewtopic.php?id=60665 (It's ugly but
it works)

Well, this script has now become redundant with the dzen svn 251 "^ca"
functionality - checkout dzen 251 with the following command:

svn checkout http://dzen.googlecode.com/svn/trunk/ dzen

Putting the following ^ca escape sequences with corresponding scripts in
your workspace list provides the functionality that I want:

workspaces        =
"^ca(1,ws1)abc^ca()":"^ca(1,ws2)def^ca()":"^ca(1,ws3)ghi^ca()":[],

The ws* scripts contain the following:

xdotool key <modkey>+<ws-number>

My ws1 script contains:

xdotool key alt+1

Adding dzen escape sequences to the workspace list is not optimal since it
looks messy and your workspace names does not get recognized by the
manageHook. Hence

, className =? "Gran Paradiso"  --> doF (W.shift "abc")

does not work. One has to put in "doF (W.shift "^ca(1,ws1)abc^ca()")" to get
it to work. No big problem, but it's not pretty.

I'm not a very good at programming in general and Haskell is something I'm
trying to learn the basics of at the moment. So I was thinking if anyone
would be interested in expanding the Util.Dzen module or write a new module
to include this functionality, so that (workspace shifting)commands can be
bound to workspace tabs in the dzen statusbar? Perhaps even without calling
external scripts.

If anything of the above needs to be expanded upon please say so.

I hope I have woken your interest.

Thanks,
Rasmus Edgar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/xmonad/attachments/20090214/64113e92/attachment.htm


More information about the xmonad mailing list