Introduction
Introduction Statistics Contact Development Disclaimer Help
tsome changes towards 4.9 - dwm - [fork] customized build of dwm, the dynamic w…
git clone git://src.adamsgaard.dk/dwm
Log
Files
Refs
README
LICENSE
---
commit e237b2a76fb3dac1f43b91e5c7b6adb9ef04c9ed
parent dd9ee6d248397dcd3483131808e5c967bad3900f
Author: Anselm R Garbe <[email protected]>
Date: Fri, 14 Mar 2008 14:35:45 +0000
some changes towards 4.9
Diffstat:
M config.anselm.h | 37 +++++++++++++++++------------…
M config.def.h | 13 ++++++++-----
M config.mk | 2 +-
M dwm.c | 17 +++++++++--------
4 files changed, 38 insertions(+), 31 deletions(-)
---
diff --git a/config.anselm.h b/config.anselm.h
t@@ -14,24 +14,15 @@
const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
Rule rules[] = {
- /* class:instance:title substr tags ref isfloating */
- { "Firefox", tags[8], False },
- { "Gimp", NULL, True },
- { "MPlayer", NULL, True },
- { "Acroread", NULL, True },
+ /* class instance title tags ref i…
+ { NULL, NULL, "Firefox", tags[8],…
+ { NULL, NULL, "Gimp", NUL…
+ { NULL, NULL, "MPlayer", NULL, …
+ { NULL, NULL, "Acroread", NULL, …
};
-/* layout(s) */
-#define RESIZEHINTS True /* False - respect size hints i…
-#define SNAP 32 /* snap pixel */
-
-Layout layouts[] = {
- /* symbol function isfloating */
- { "[]|", tileh, False }, /* first entry …
- { "[]=", tilev, False },
- { "><>", floating, True },
- { "[M]", monocle, True },
-};
+/* geometry function */
+void (*setgeoms)(void) = setdefgeoms;
void
setanselmgeoms(void) {
t@@ -83,12 +74,24 @@ anselmgeoms(const char *arg) {
void
defgeoms(const char *arg) {
- setgeoms = setdefaultgeoms;
+ setgeoms = setdefgeoms;
setgeoms();
updatebarpos();
setlayout("[]=");
}
+/* layout(s) */
+#define RESIZEHINTS True /* False - respect size hints i…
+#define SNAP 32 /* snap pixel */
+
+Layout layouts[] = {
+ /* symbol function isfloating */
+ { "[]|", tileh, False }, /* first entry …
+ { "[]=", tilev, False },
+ { "><>", floating, True },
+ { "[M]", monocle, True },
+};
+
/* key definitions */
#define MODKEY Mod1Mask
Key keys[] = {
diff --git a/config.def.h b/config.def.h
t@@ -14,13 +14,16 @@
const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
Rule rules[] = {
- /* class:instance:title substr tags ref isfloating */
- { "Firefox", tags[8], False },
- { "Gimp", NULL, True },
- { "MPlayer", NULL, True },
- { "Acroread", NULL, True },
+ /* class instance title tags ref i…
+ { NULL, NULL, "Firefox", tags[8],…
+ { NULL, NULL, "Gimp", NUL…
+ { NULL, NULL, "MPlayer", NULL, …
+ { NULL, NULL, "Acroread", NULL, …
};
+/* geometry function */
+void (*setgeoms)(void) = setdefgeoms;
+
/* layout(s) */
#define RESIZEHINTS True /* False - respect size hints i…
#define SNAP 32 /* snap pixel */
diff --git a/config.mk b/config.mk
t@@ -1,5 +1,5 @@
# dwm version
-VERSION = 4.8
+VERSION = 4.9
# Customize below to fit your system
diff --git a/dwm.c b/dwm.c
t@@ -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;
t@@ -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);
t@@ -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"
t@@ -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->insta…
{
c->isfloating = r->isfloating;
if(r->tag) {
t@@ -1051,7 +1052,7 @@ maprequest(XEvent *e) {
}
void
-monocle(void) {
+monocle(void) {
Client *c;
for(c = clients; c; c = c->next)
t@@ -1390,7 +1391,7 @@ setclientstate(Client *c, long state) {
}
void
-setdefaultgeoms(void) {
+setdefgeoms(void) {
/* screen dimensions */
sx = 0;
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.