On Jan 06, 2010 at 10:06 AM, Thayer Williams <thay...@gmail.com> wrote:
> What does this line do exactly?
> 
> /* helper for spawning shell commands in the pre dwm-5.0 fashion */
> #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
> 
> I always assumed it was a way of launching applications without needing to
> define each application explicitly as a separate command, but the more I look
> at it, I'm thinking it's what actually defines the execution of the commands
> below it, for example *dmenucmd[] and *termcmd[] 
> 
> Is this about right?

I guess my first assumption was correct.  Should have spent a bit more time
digging through the ML archives. In case anyone else has wondered about it,
the proper syntax for SHCMD is as follows:

{ MODKEY,   XK_z,   spawn,  BASHCMD("commandname") },

PS: Sorry for omitting [dwm] in the original subject...old habits and all
that.


Reply via email to