added nsz' patch
d662f98d
2 file(s) · +3 −1
| 40 | 40 | { MODKEY|ShiftMask, KEY, tag, TAG }, \ |
|
| 41 | 41 | { MODKEY|ControlMask|ShiftMask, KEY, toggletag, TAG }, |
|
| 42 | 42 | ||
| 43 | + | /* helper for spawning shell commands */ |
|
| 44 | + | #define SHCMD(cmd) { .v = (char*[]){ "/bin/sh", "-c", cmd, NULL } } |
|
| 45 | + | ||
| 43 | 46 | static Key keys[] = { |
|
| 44 | 47 | /* modifier key function argument */ |
|
| 45 | 48 | { MODKEY, XK_p, spawn, {.v = (char *[]){"dmenu_run", "-fn", FONT, "-nb", NORMBGCOLOR, "-nf", NORMFGCOLOR, "-sb", SELBGCOLOR, "-sf", SELFGCOLOR, NULL}} }, |
| 51 | 51 | #define LENGTH(x) (sizeof x / sizeof x[0]) |
|
| 52 | 52 | #define MAXTAGLEN 16 |
|
| 53 | 53 | #define MOUSEMASK (BUTTONMASK|PointerMotionMask) |
|
| 54 | - | #define SHCMD(cmd) { .v = (char*[]){ "/bin/sh", "-c", cmd, NULL } } |
|
| 55 | 54 | #define TAGMASK ((int)((1LL << LENGTH(tags)) - 1)) |
|
| 56 | 55 | #define TEXTW(x) (textnw(x, strlen(x)) + dc.font.height) |
|
| 57 | 56 |