Client *nexttiled(Client *c);
void propertynotify(XEvent *e);
void quit(const char *arg);
-void reapply(const char *arg);
void resize(Client *c, int x, int y, int w, int h, Bool sizehints);
void resizemouse(Client *c);
void restack(void);
void run(void);
void scan(void);
void setclientstate(Client *c, long state);
-void setlayout(const char *arg);
void setmfact(const char *arg);
void setup(void);
void spawn(const char *arg);
void tilev(void);
void tilevstack(unsigned int n);
void togglefloating(const char *arg);
+void togglelayout(const char *arg);
void toggletag(const char *arg);
void toggleview(const char *arg);
void unban(Client *c);
void
applyrules(Client *c) {
- unsigned int i, j;
+ unsigned int i;
Bool matched = False;
Rule *r;
XClassHint ch = { 0 };
&& (!r->instance || (ch.res_name && strstr(ch.res_name, r->instance)))) {
c->isfloating = r->isfloating;
if(r->tag) {
- if(r->tag[0] == '*' && r->tag[1] == 0)
- for(j = 0; j < LENGTH(tags); i++)
- c->tags[j] = True;
- else
- c->tags[idxoftag(r->tag)] = True;
+ c->tags[idxoftag(r->tag)] = True;
matched = True;
}
}
}
}
if((ev->x < x + blw) && ev->button == Button1)
- setlayout(NULL);
+ togglelayout(NULL);
}
else if((c = getclient(ev->window))) {
focus(c);
}
void
-reapply(const char *arg) {
- Client *c;
-
- for(c = clients; c; c = c->next) {
- memset(c->tags, 0, TAGSZ);
- applyrules(c);
- }
- arrange();
-}
-
-void
resize(Client *c, int x, int y, int w, int h, Bool sizehints) {
XWindowChanges wc;
}
void
-setlayout(const char *arg) {
- unsigned int i;
-
- if(!arg) {
- if(++lt == &layouts[LENGTH(layouts)])
- lt = &layouts[0];
- }
- else {
- for(i = 0; i < LENGTH(layouts); i++)
- if(!strcmp(arg, layouts[i].symbol))
- break;
- if(i == LENGTH(layouts))
- return;
- lt = &layouts[i];
- }
- if(sel)
- arrange();
- else
- drawbar();
-}
-
-void
setmfact(const char *arg) {
double d;
}
void
+togglelayout(const char *arg) {
+ unsigned int i;
+
+ if(!arg) {
+ if(++lt == &layouts[LENGTH(layouts)])
+ lt = &layouts[0];
+ }
+ else {
+ for(i = 0; i < LENGTH(layouts); i++)
+ if(!strcmp(arg, layouts[i].symbol))
+ break;
+ if(i == LENGTH(layouts))
+ return;
+ lt = &layouts[i];
+ }
+ if(sel)
+ arrange();
+ else
+ drawbar();
+}
+
+void
toggletag(const char *arg) {
unsigned int i, j;