Cursor cursor[CurLast];
Display *dpy;
DC dc = {0};
-Geom *geom = NULL;
-Layout *lt = NULL;
Window root, barwin;
/* configuration, allows nested code to access above variables */
#include "config.h"
#define TAGSZ (LENGTH(tags) * sizeof(Bool))
-static Bool tmp[LENGTH(tags)];
+Bool tmp[LENGTH(tags)];
+Layout *lt = layouts;
+Geom *geom = geoms;
/* function implementations */
XGetClassHint(dpy, c->win, &ch);
for(i = 0; i < LENGTH(rules); i++) {
r = &rules[i];
- if((r->title && strstr(c->name, r->title))
- || (ch.res_class && r->class && strstr(ch.res_class, r->class))
- || (ch.res_name && r->instance && strstr(ch.res_name, r->instance)))
- {
+ if((!r->title || strstr(c->name, r->title))
+ && (!r->class || (ch.res_class && strstr(ch.res_class, r->class)))
+ && (!r->instance || (ch.res_name && strstr(ch.res_name, r->instance)))) {
c->isfloating = r->isfloating;
if(r->tag) {
c->tags[idxoftag(r->tag)] = True;
Client *c;
for(c = clients; c; c = c->next)
- if((lt->isfloating || !c->floating) && isvisible(c))
+ if((lt->isfloating || !c->isfloating) && isvisible(c))
resize(c, mox, moy, mow - 2 * c->bw, moh - 2 * c->bw, RESIZEHINTS);
}
sh = DisplayHeight(dpy, screen);
bh = dc.font.height + 2;
mfact = MFACT;
- geom = &geoms[0];
geom->apply();
/* init atoms */
prevtags = emallocz(TAGSZ);
seltags[0] = prevtags[0] = True;
- /* init layouts */
- lt = &layouts[0];
-
/* init bar */
for(blw = i = 0; LENGTH(layouts) > 1 && i < LENGTH(layouts); i++) {
w = textw(layouts[i].symbol);
XCloseDisplay(dpy);
return 0;
}
+