dmenu not woring with dwm window manager

oday, I was trying to setup dwm, in my arch Linux, and kind of liked it very much. You have to manually build the source and install it, to make it work. A sample .xinitrc file is provided on the internet which is a good start. I played with some of the settings and was able to set things up quickly. But the dmenu (the menu launcher) didn’t work as expected. Ah!, i tried to build the source of dmenu (that was mentioned in the website as supported version) but still cannot make it work. Ok, then I started to take a look at the code , and found that they were passing an obsolete parameter to dmenu_run (i.e -m option) which kind of screwed up the whole thing. I fixed it and then started to work, and things seemed to work like a charm. :). The trick is as follows.


static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
static const char *dmenucmd[] = { "dmenu_run",NULL, NULL, "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };