X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=dwmblocks.c;fp=dwmblocks.c;h=21c14825f9ddc595d49481701899a79e1d732b8c;hb=d2e6d20ebf269f1074e7afc206d4c3d3b556fc9f;hp=8668f042d77bea8510570564fe82f78de5bc5463;hpb=1b2e50c6c53c5d539c04b0e30c7d7cd5f08a5a3a;p=dwmblocks.git diff --git a/dwmblocks.c b/dwmblocks.c index 8668f04..21c1482 100644 --- a/dwmblocks.c +++ b/dwmblocks.c @@ -6,6 +6,7 @@ #include #define LENGTH(X) (sizeof(X) / sizeof (X[0])) #define CMDLENGTH 50 +#define STATUSLENGTH (LENGTH(blocks) * CMDLENGTH + 1) typedef struct { char* icon; @@ -33,7 +34,7 @@ static Display *dpy; static int screen; static Window root; static char statusbar[LENGTH(blocks)][CMDLENGTH] = {0}; -static char statusstr[2][256]; +static char statusstr[2][STATUSLENGTH]; static int statusContinue = 1; static void (*writestatus) () = setroot;