pinosaur
/
dwmblocks.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #15 from tomboehmer/issue9
[dwmblocks.git]
/
dwmblocks.c
diff --git
a/dwmblocks.c
b/dwmblocks.c
index
8668f04
..
21c1482
100644
(file)
--- a/
dwmblocks.c
+++ b/
dwmblocks.c
@@
-6,6
+6,7
@@
#include<X11/Xlib.h>
#define LENGTH(X) (sizeof(X) / sizeof (X[0]))
#define CMDLENGTH 50
#include<X11/Xlib.h>
#define LENGTH(X) (sizeof(X) / sizeof (X[0]))
#define CMDLENGTH 50
+#define STATUSLENGTH (LENGTH(blocks) * CMDLENGTH + 1)
typedef struct {
char* icon;
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 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;
static int statusContinue = 1;
static void (*writestatus) () = setroot;