diff options
| author | Anselm R Garbe <garbeam@gmail.com> | 2008-03-14 14:35:45 +0000 |
|---|---|---|
| committer | Anselm R Garbe <garbeam@gmail.com> | 2008-03-14 14:35:45 +0000 |
| commit | e237b2a76fb3dac1f43b91e5c7b6adb9ef04c9ed (patch) | |
| tree | da79e7fb7f8a05c3ec739aca9f62224d7adbbee7 | |
| parent | Added tag 4.8 for changeset 607015ddb091 (diff) | |
| download | dwm-e237b2a76fb3dac1f43b91e5c7b6adb9ef04c9ed.tar.gz dwm-e237b2a76fb3dac1f43b91e5c7b6adb9ef04c9ed.zip | |
some changes towards 4.9
| -rw-r--r-- | config.anselm.h | 37 | ||||
| -rw-r--r-- | config.def.h | 13 | ||||
| -rw-r--r-- | config.mk | 2 | ||||
| -rw-r--r-- | dwm.c | 17 |
4 files changed, 38 insertions, 31 deletions
diff --git a/config.anselm.h b/config.anselm.h index aef5947..09cccd1 100644 --- a/config.anselm.h +++ b/config.anselm.h | |||
| @@ -14,24 +14,15 @@ | |||
| 14 | const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; | 14 | const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; |
| 15 | 15 | ||
| 16 | Rule rules[] = { | 16 | Rule rules[] = { |
| 17 | /* class:instance:title substr tags ref isfloating */ | 17 | /* class instance title tags ref isfloating */ |
| 18 | { "Firefox", tags[8], False }, | 18 | { NULL, NULL, "Firefox", tags[8], False }, |
| 19 | { "Gimp", NULL, True }, | 19 | { NULL, NULL, "Gimp", NULL, True }, |
| 20 | { "MPlayer", NULL, True }, | 20 | { NULL, NULL, "MPlayer", NULL, True }, |
| 21 | { "Acroread", NULL, True }, | 21 | { NULL, NULL, "Acroread", NULL, True }, |
| 22 | }; | 22 | }; |
| 23 | 23 | ||
| 24 | /* layout(s) */ | 24 | /* geometry function */ |
| 25 | #define RESIZEHINTS True /* False - respect size hints in tiled resizals */ | 25 | void (*setgeoms)(void) = setdefgeoms; |
| 26 | #define SNAP 32 /* snap pixel */ | ||
| 27 | |||
| 28 | Layout layouts[] = { | ||
| 29 | /* symbol function isfloating */ | ||
| 30 | { "[]|", tileh, False }, /* first entry is default */ | ||
| 31 | { "[]=", tilev, False }, | ||
| 32 | { "><>", floating, True }, | ||
| 33 | { "[M]", monocle, True }, | ||
| 34 | }; | ||
| 35 | 26 | ||
| 36 | void | 27 | void |
| 37 | setanselmgeoms(void) { | 28 | setanselmgeoms(void) { |
| @@ -83,12 +74,24 @@ anselmgeoms(const char *arg) { | |||
| 83 | 74 | ||
| 84 | void | 75 | void |
| 85 | defgeoms(const char *arg) { | 76 | defgeoms(const char *arg) { |
| 86 | setgeoms = setdefaultgeoms; | 77 | setgeoms = setdefgeoms; |
| 87 | setgeoms(); | 78 | setgeoms(); |
| 88 | updatebarpos(); | 79 | updatebarpos(); |
| 89 | setlayout("[]="); | 80 | setlayout("[]="); |
| 90 | } | 81 | } |
| 91 | 82 | ||
| 83 | /* layout(s) */ | ||
| 84 | #define RESIZEHINTS True /* False - respect size hints in tiled resizals */ | ||
| 85 | #define SNAP 32 /* snap pixel */ | ||
| 86 | |||
| 87 | Layout layouts[] = { | ||
| 88 | /* symbol function isfloating */ | ||
| 89 | { "[]|", tileh, False }, /* first entry is default */ | ||
| 90 | { "[]=", tilev, False }, | ||
| 91 | { "><>", floating, True }, | ||
| 92 | { "[M]", monocle, True }, | ||
| 93 | }; | ||
| 94 | |||
| 92 | /* key definitions */ | 95 | /* key definitions */ |
| 93 | #define MODKEY Mod1Mask | 96 | #define MODKEY Mod1Mask |
| 94 | Key keys[] = { | 97 | Key keys[] = { |
diff --git a/config.def.h b/config.def.h index c1eedd4..4254c43 100644 --- a/config.def.h +++ b/config.def.h | |||
| @@ -14,13 +14,16 @@ | |||
| 14 | const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; | 14 | const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; |
| 15 | 15 | ||
| 16 | Rule rules[] = { | 16 | Rule rules[] = { |
| 17 | /* class:instance:title substr tags ref isfloating */ | 17 | /* class instance title tags ref isfloating */ |
| 18 | { "Firefox", tags[8], False }, | 18 | { NULL, NULL, "Firefox", tags[8], False }, |
| 19 | { "Gimp", NULL, True }, | 19 | { NULL, NULL, "Gimp", NULL, True }, |
| 20 | { "MPlayer", NULL, True }, | 20 | { NULL, NULL, "MPlayer", NULL, True }, |
| 21 | { "Acroread", NULL, True }, | 21 | { NULL, NULL, "Acroread", NULL, True }, |
| 22 | }; | 22 | }; |
| 23 | 23 | ||
| 24 | /* geometry function */ | ||
| 25 | void (*setgeoms)(void) = setdefgeoms; | ||
| 26 | |||
| 24 | /* layout(s) */ | 27 | /* layout(s) */ |
| 25 | #define RESIZEHINTS True /* False - respect size hints in tiled resizals */ | 28 | #define RESIZEHINTS True /* False - respect size hints in tiled resizals */ |
| 26 | #define SNAP 32 /* snap pixel */ | 29 | #define SNAP 32 /* snap pixel */ |
| @@ -1,5 +1,5 @@ | |||
| 1 | # dwm version | 1 | # dwm version |
| 2 | VERSION = 4.8 | 2 | VERSION = 4.9 |
| 3 | 3 | ||
| 4 | # Customize below to fit your system | 4 | # Customize below to fit your system |
| 5 | 5 | ||
| @@ -99,7 +99,9 @@ typedef struct { | |||
| 99 | } Layout; | 99 | } Layout; |
| 100 | 100 | ||
| 101 | typedef struct { | 101 | typedef struct { |
| 102 | const char *prop; | 102 | const char *class; |
| 103 | const char *instance; | ||
| 104 | const char *title; | ||
| 103 | const char *tag; | 105 | const char *tag; |
| 104 | Bool isfloating; | 106 | Bool isfloating; |
| 105 | } Rule; | 107 | } Rule; |
| @@ -161,7 +163,7 @@ void restack(void); | |||
| 161 | void run(void); | 163 | void run(void); |
| 162 | void scan(void); | 164 | void scan(void); |
| 163 | void setclientstate(Client *c, long state); | 165 | void setclientstate(Client *c, long state); |
| 164 | void setdefaultgeoms(void); | 166 | void setdefgeoms(void); |
| 165 | void setlayout(const char *arg); | 167 | void setlayout(const char *arg); |
| 166 | void setup(void); | 168 | void setup(void); |
| 167 | void spawn(const char *arg); | 169 | void spawn(const char *arg); |
| @@ -224,7 +226,6 @@ Display *dpy; | |||
| 224 | DC dc = {0}; | 226 | DC dc = {0}; |
| 225 | Layout *lt = NULL; | 227 | Layout *lt = NULL; |
| 226 | Window root, barwin; | 228 | Window root, barwin; |
| 227 | void (*setgeoms)(void) = setdefaultgeoms; | ||
| 228 | 229 | ||
| 229 | /* configuration, allows nested code to access above variables */ | 230 | /* configuration, allows nested code to access above variables */ |
| 230 | #include "config.h" | 231 | #include "config.h" |
| @@ -244,9 +245,9 @@ applyrules(Client *c) { | |||
| 244 | XGetClassHint(dpy, c->win, &ch); | 245 | XGetClassHint(dpy, c->win, &ch); |
| 245 | for(i = 0; i < LENGTH(rules); i++) { | 246 | for(i = 0; i < LENGTH(rules); i++) { |
| 246 | r = &rules[i]; | 247 | r = &rules[i]; |
| 247 | if(strstr(c->name, r->prop) | 248 | if(strstr(c->name, r->title) |
| 248 | || (ch.res_class && strstr(ch.res_class, r->prop)) | 249 | || (ch.res_class && r->class && strstr(ch.res_class, r->class)) |
| 249 | || (ch.res_name && strstr(ch.res_name, r->prop))) | 250 | || (ch.res_name && r->instance && strstr(ch.res_name, r->instance))) |
| 250 | { | 251 | { |
| 251 | c->isfloating = r->isfloating; | 252 | c->isfloating = r->isfloating; |
| 252 | if(r->tag) { | 253 | if(r->tag) { |
| @@ -1051,7 +1052,7 @@ maprequest(XEvent *e) { | |||
| 1051 | } | 1052 | } |
| 1052 | 1053 | ||
| 1053 | void | 1054 | void |
| 1054 | monocle(void) { | 1055 | monocle(void) { |
| 1055 | Client *c; | 1056 | Client *c; |
| 1056 | 1057 | ||
| 1057 | for(c = clients; c; c = c->next) | 1058 | for(c = clients; c; c = c->next) |
| @@ -1390,7 +1391,7 @@ setclientstate(Client *c, long state) { | |||
| 1390 | } | 1391 | } |
| 1391 | 1392 | ||
| 1392 | void | 1393 | void |
| 1393 | setdefaultgeoms(void) { | 1394 | setdefgeoms(void) { |
| 1394 | 1395 | ||
| 1395 | /* screen dimensions */ | 1396 | /* screen dimensions */ |
| 1396 | sx = 0; | 1397 | sx = 0; |
