diff --git a/blocks.def.h b/blocks.def.h index dbb33054..dda84c0e 100644 --- a/blocks.def.h +++ b/blocks.def.h @@ -9,3 +9,6 @@ static const Block blocks[] = { //sets delimiter between status commands. NULL character ('\0') means no delimiter. static char delim[] = " | "; static unsigned int delimLen = 5; + +/* Maximum length of status text */ +#define CMDLENGTH 50 diff --git a/dwmblocks.c b/dwmblocks.c index befd252d..3fde45dc 100644 --- a/dwmblocks.c +++ b/dwmblocks.c @@ -14,9 +14,7 @@ #define SIGMINUS SIGRTMIN #endif #define LENGTH(X) (sizeof(X) / sizeof (X[0])) -#define CMDLENGTH 50 #define MIN( a, b ) ( ( a < b) ? a : b ) -#define STATUSLENGTH (LENGTH(blocks) * CMDLENGTH + 1) typedef struct { char* icon; @@ -49,6 +47,7 @@ static void (*writestatus) () = pstdout; #include "blocks.h" +#define STATUSLENGTH (LENGTH(blocks) * CMDLENGTH + 1) static char statusbar[LENGTH(blocks)][CMDLENGTH] = {0}; static char statusstr[2][STATUSLENGTH];