commit - dd9ee6d248397dcd3483131808e5c967bad3900f
commit + e237b2a76fb3dac1f43b91e5c7b6adb9ef04c9ed
blob - aef59476a2e5ca156bd0c10773cf1ce26b3f2de3
blob + 09cccd1af69b8414cdc41cba110f8ceb01c49a83
--- config.anselm.h
+++ config.anselm.h
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 isfloating */
+ { NULL, NULL, "Firefox", tags[8], False },
+ { NULL, NULL, "Gimp", NULL, True },
+ { NULL, NULL, "MPlayer", NULL, True },
+ { NULL, NULL, "Acroread", NULL, True },
};
-/* layout(s) */
-#define RESIZEHINTS True /* False - respect size hints in tiled resizals */
-#define SNAP 32 /* snap pixel */
+/* geometry function */
+void (*setgeoms)(void) = setdefgeoms;
-Layout layouts[] = {
- /* symbol function isfloating */
- { "[]|", tileh, False }, /* first entry is default */
- { "[]=", tilev, False },
- { "><>", floating, True },
- { "[M]", monocle, True },
-};
-
void
setanselmgeoms(void) {
void
defgeoms(const char *arg) {
- setgeoms = setdefaultgeoms;
+ setgeoms = setdefgeoms;
setgeoms();
updatebarpos();
setlayout("[]=");
}
+/* layout(s) */
+#define RESIZEHINTS True /* False - respect size hints in tiled resizals */
+#define SNAP 32 /* snap pixel */
+
+Layout layouts[] = {
+ /* symbol function isfloating */
+ { "[]|", tileh, False }, /* first entry is default */
+ { "[]=", tilev, False },
+ { "><>", floating, True },
+ { "[M]", monocle, True },
+};
+
/* key definitions */
#define MODKEY Mod1Mask
Key keys[] = {
blob - c1eedd4c15bc0de64b8b63274d695bd188a3a8a3
blob + 4254c43a039f571bcb4e630f91d0e62fcaf7bcfc
--- config.def.h
+++ config.def.h
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 isfloating */
+ { NULL, NULL, "Firefox", tags[8], False },
+ { NULL, NULL, "Gimp", NULL, True },
+ { NULL, NULL, "MPlayer", NULL, True },
+ { NULL, NULL, "Acroread", NULL, True },
};
+/* geometry function */
+void (*setgeoms)(void) = setdefgeoms;
+
/* layout(s) */
#define RESIZEHINTS True /* False - respect size hints in tiled resizals */
#define SNAP 32 /* snap pixel */
blob - b63e2ca2e0b92f3d48da921db60d921f1b541662
blob + 5176248939fb278f486b1e8f78821dc98e1da2c5
--- config.mk
+++ config.mk
# dwm version
-VERSION = 4.8
+VERSION = 4.9
# Customize below to fit your system
blob - a54329a7f23117ada470594c1b2a71eef818d3ed
blob + 3f896dcbf0d0a2be030bb44eeab2b632f683ffa9
--- dwm.c
+++ dwm.c
} Layout;
typedef struct {
- const char *prop;
+ const char *class;
+ const char *instance;
+ const char *title;
const char *tag;
Bool isfloating;
} Rule;
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);
DC dc = {0};
Layout *lt = NULL;
Window root, barwin;
-void (*setgeoms)(void) = setdefaultgeoms;
/* configuration, allows nested code to access above variables */
#include "config.h"
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) {
}
void
-monocle(void) {
+monocle(void) {
Client *c;
for(c = clients; c; c = c->next)
}
void
-setdefaultgeoms(void) {
+setdefgeoms(void) {
/* screen dimensions */
sx = 0;