dmenu not woring with dwm window manager

Today, 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 in 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 into the code , and found that they were passing an obselete 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 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 };