JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
fixed several things, nearly feature complete
[dwm.git] / dwm.h
diff --git a/dwm.h b/dwm.h
index acfdcbb..8af63f0 100644 (file)
--- a/dwm.h
+++ b/dwm.h
@@ -7,21 +7,29 @@
 
 /********** CUSTOMIZE **********/
 
-#define FONT           "-*-terminus-medium-*-*-*-13-*-*-*-*-*-iso10646-*"
-#define BGCOLOR                "DarkSlateGrey"
-#define FGCOLOR                "LightSteelBlue"
-#define BORDERCOLOR    "SlateGray"
-#define WM_PROTOCOL_DELWIN 1
+#define FONT                           "-*-terminus-medium-*-*-*-13-*-*-*-*-*-iso10646-*"
+#define BGCOLOR                                "#666699"
+#define FGCOLOR                                "#ffffff"
+#define BORDERCOLOR                    "#9999CC"
+#define MASTERW                                52 /* percent */
+#define WM_PROTOCOL_DELWIN     1
 
 /* tags */
 enum { Tscratch, Tdev, Tirc, Twww, Twork, TLast };
 
 /********** CUSTOMIZE **********/
 
+typedef union Arg Arg;
 typedef struct DC DC;
 typedef struct Client Client;
 typedef struct Fnt Fnt;
 typedef struct Key Key;
+typedef struct Rule Rule;
+
+union Arg {
+       const char **argv;
+       int i;
+};
 
 /* atoms */
 enum { WMProtocols, WMDelete, WMLast };
@@ -62,14 +70,20 @@ struct Client {
        Window trans;
        Window title;
        Client *next;
-       Client *snext;
+       Client *revert;
+};
+
+struct Rule {
+       const char *class;
+       const char *instance;
+       char *tags[TLast];
 };
 
 struct Key {
        unsigned long mod;
        KeySym keysym;
-       void (*func)(void *aux);
-       void *aux;
+       void (*func)(Arg *arg);
+       Arg arg;
 };
 
 extern Display *dpy;
@@ -79,11 +93,11 @@ extern Cursor cursor[CurLast];
 extern Bool running, issel;
 extern void (*handler[LASTEvent]) (XEvent *);
 
-extern int tsel, screen, sx, sy, sw, sh, th;
-extern char stext[1024], *tags[TLast];
+extern int tsel, screen, sx, sy, sw, sh, mw, th;
+extern char *tags[TLast];
 
 extern DC dc;
-extern Client *clients, *stack;
+extern Client *clients, *sel;
 
 /* client.c */
 extern void manage(Window w, XWindowAttributes *wa);
@@ -92,15 +106,20 @@ extern Client *getclient(Window w);
 extern void focus(Client *c);
 extern void update_name(Client *c);
 extern void draw_client(Client *c);
-extern void resize(Client *c);
+extern void resize(Client *c, Bool inc);
 extern void update_size(Client *c);
 extern Client *gettitle(Window w);
 extern void craise(Client *c);
 extern void lower(Client *c);
-extern void ckill(void *aux);
-extern void sel(void *aux);
-extern void max(void *aux);
-extern void toggle(void *aux);
+extern void ckill(Arg *arg);
+extern void nextc(Arg *arg);
+extern void prevc(Arg *arg);
+extern void max(Arg *arg);
+extern void floating(Arg *arg);
+extern void tiling(Arg *arg);
+extern void tag(Arg *arg);
+extern void view(Arg *arg);
+extern void zoom(Arg *arg);
 extern void gravitate(Client *c, Bool invert);
 
 /* draw.c */
@@ -124,7 +143,7 @@ extern void mmove(Client *c);
 extern int error_handler(Display *dsply, XErrorEvent *e);
 extern void send_message(Window w, Atom a, long value);
 extern int win_proto(Window w);
-extern void quit(void *aux);
+extern void quit(Arg *arg);
 
 /* util.c */
 extern void error(const char *errstr, ...);
@@ -132,5 +151,5 @@ extern void *emallocz(unsigned int size);
 extern void *emalloc(unsigned int size);
 extern void *erealloc(void *ptr, unsigned int size);
 extern char *estrdup(const char *str);
-extern void spawn(char *argv[]);
+extern void spawn(Arg *arg);
 extern void swap(void **p1, void **p2);