From fda90fa08a9c54ba635c328458f0be413b643fc1 Mon Sep 17 00:00:00 2001 From: Ivan Kanakarakis Date: Tue, 20 Dec 2011 01:55:36 +0200 Subject: add SHCMD helper for easily spawning shell commands --- config.def.h | 3 +++ config.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/config.def.h b/config.def.h index 63f4523..b90a9ef 100644 --- a/config.def.h +++ b/config.def.h @@ -49,6 +49,9 @@ static const AppRule rules[] = { \ { "Chromium", 0, False }, /* last desktop, 0 is always the fist */ }; +/* helper for spawning shell commands */ +#define SHCMD(cmd) {.com = (const char*[]){"/bin/bash", "-c", cmd, NULL}} + /** commands **/ static const char *termcmd[] = { "xterm", NULL }; static const char *dmenucmd[] = { "dmenu", NULL }; diff --git a/config.h b/config.h index ce3bb02..7399872 100644 --- a/config.h +++ b/config.h @@ -48,6 +48,9 @@ static const AppRule rules[] = { \ { "MPlayer", 3, True }, }; +/* helper for spawning shell commands */ +#define SHCMD(cmd) {.com = (const char*[]){"/bin/bash", "-c", cmd, NULL}} + /** commands **/ static const char *termcmd[] = { "urxvt", NULL }; static const char *dmenucmd[] = { "dmn", NULL }; -- cgit v1.3.1