aboutsummaryrefslogtreecommitdiff
path: root/dwm.c
diff options
context:
space:
mode:
authorAnselm R Garbe <garbeam@gmail.com>2008-03-14 14:35:45 +0000
committerAnselm R Garbe <garbeam@gmail.com>2008-03-14 14:35:45 +0000
commite237b2a76fb3dac1f43b91e5c7b6adb9ef04c9ed (patch)
treeda79e7fb7f8a05c3ec739aca9f62224d7adbbee7 /dwm.c
parentdd9ee6d248397dcd3483131808e5c967bad3900f (diff)
some changes towards 4.9
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/dwm.c b/dwm.c
index a54329a..3f896dc 100644
--- a/dwm.c
+++ b/dwm.c
@@ -99,7 +99,9 @@ typedef struct {
} Layout;
typedef struct {
- const char *prop;
+ const char *class;
+ const char *instance;
+ const char *title;
const char *tag;
Bool isfloating;
} Rule;
@@ -161,7 +163,7 @@ void restack(void);
void run(void);
void scan(void);
void setclientstate(Client *c, long state);
-void setdefaultgeoms(void);
+void setdefgeoms(void);
void setlayout(const char *arg);
void setup(void);
void spawn(const char *arg);
@@ -224,7 +226,6 @@ Display *dpy;
DC dc = {0};
Layout *lt = NULL;
Window root, barwin;
-void (*setgeoms)(void) = setdefaultgeoms;
/* configuration, allows nested code to access above variables */
#include "config.h"
@@ -244,9 +245,9 @@ applyrules(Client *c) {
XGetClassHint(dpy, c->win, &ch);
for(i = 0; i < LENGTH(rules); i++) {
r = &rules[i];
- if(strstr(c->name, r->prop)
- || (ch.res_class && strstr(ch.res_class, r->prop))
- || (ch.res_name && strstr(ch.res_name, r->prop)))
+ if(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)))
{
c->isfloating = r->isfloating;
if(r->tag) {
@@ -1051,7 +1052,7 @@ maprequest(XEvent *e) {
}
void
-monocle(void) {
+monocle(void) {
Client *c;
for(c = clients; c; c = c->next)
@@ -1390,7 +1391,7 @@ setclientstate(Client *c, long state) {
}
void
-setdefaultgeoms(void) {
+setdefgeoms(void) {
/* screen dimensions */
sx = 0;