summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dwm.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/dwm.c b/dwm.c
index 2597f4f..3168ee0 100644
--- a/dwm.c
+++ b/dwm.c
@@ -194,20 +194,16 @@ static int xerrordummy(Display *dsply, XErrorEvent *ee);
194static int xerrorstart(Display *dsply, XErrorEvent *ee); 194static int xerrorstart(Display *dsply, XErrorEvent *ee);
195static void zoom(const char *arg); 195static void zoom(const char *arg);
196 196
197#include "config.h"
198
199/* variables */ 197/* variables */
200static char stext[256]; 198static char stext[256];
201static double mwfact = MWFACT; 199static double mwfact;
202static int screen, sx, sy, sw, sh, wax, way, waw, wah; 200static int screen, sx, sy, sw, sh, wax, way, waw, wah;
203static int (*xerrorxlib)(Display *, XErrorEvent *); 201static int (*xerrorxlib)(Display *, XErrorEvent *);
204static unsigned int bh; 202static unsigned int bh, bpos, ntags;
205static unsigned int blw = 0; 203static unsigned int blw = 0;
206static unsigned int bpos = BARPOS;
207static unsigned int ltidx = 0; /* default */ 204static unsigned int ltidx = 0; /* default */
208static unsigned int nlayouts = 0; 205static unsigned int nlayouts = 0;
209static unsigned int nrules = 0; 206static unsigned int nrules = 0;
210static unsigned int ntags;
211static unsigned int numlockmask = 0; 207static unsigned int numlockmask = 0;
212static void (*handler[LASTEvent]) (XEvent *) = { 208static void (*handler[LASTEvent]) (XEvent *) = {
213 [ButtonPress] = buttonpress, 209 [ButtonPress] = buttonpress,
@@ -237,6 +233,9 @@ static DC dc = {0};
237static Window barwin, root; 233static Window barwin, root;
238static Regs *regs = NULL; 234static Regs *regs = NULL;
239 235
236/* configuration, allows nested code to work on above variables */
237#include "config.h"
238
240static void 239static void
241eprint(const char *errstr, ...) { 240eprint(const char *errstr, ...) {
242 va_list ap; 241 va_list ap;
@@ -1806,6 +1805,11 @@ main(int argc, char *argv[]) {
1806 eprint("dwm-"VERSION", © 2006-2007 A. R. Garbe, S. van Dijk, J. Salmi, P. Hruby, S. Nagy\n"); 1805 eprint("dwm-"VERSION", © 2006-2007 A. R. Garbe, S. van Dijk, J. Salmi, P. Hruby, S. Nagy\n");
1807 else if(argc != 1) 1806 else if(argc != 1)
1808 eprint("usage: dwm [-v]\n"); 1807 eprint("usage: dwm [-v]\n");
1808
1809 /* macros from config.h can be used beginning within main() */
1810 mwfact = MWFACT;
1811 bpos = BARPOS;
1812
1809 setlocale(LC_CTYPE, ""); 1813 setlocale(LC_CTYPE, "");
1810 if(!(dpy = XOpenDisplay(0))) 1814 if(!(dpy = XOpenDisplay(0)))
1811 eprint("dwm: cannot open display\n"); 1815 eprint("dwm: cannot open display\n");