JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
implemented bar for dwm (I miss status text), I plan that status text is read from...
[dwm.git] / dwm.h
diff --git a/dwm.h b/dwm.h
index 49aa126..1f8283c 100644 (file)
--- a/dwm.h
+++ b/dwm.h
@@ -7,22 +7,24 @@
 
 /********** 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 union Arg Arg;
+typedef struct Rule Rule;
 
 union Arg {
        const char **argv;
@@ -64,13 +66,20 @@ struct Client {
        int grav;
        unsigned int border;
        long flags; 
+       Bool floating;
        Window win;
-       Window trans;
        Window title;
        Client *next;
        Client *revert;
 };
 
+struct Rule {
+       const char *class;
+       const char *instance;
+       char *tags[TLast];
+       Bool floating;
+};
+
 struct Key {
        unsigned long mod;
        KeySym keysym;
@@ -79,18 +88,22 @@ struct Key {
 };
 
 extern Display *dpy;
-extern Window root;
+extern Window root, barwin;
 extern Atom wm_atom[WMLast], net_atom[NetLast];
 extern Cursor cursor[CurLast];
 extern Bool running, issel;
-extern void (*handler[LASTEvent]) (XEvent *);
+extern void (*handler[LASTEvent])(XEvent *);
+extern void (*arrange)(Arg *);
 
-extern int tsel, screen, sx, sy, sw, sh, th;
-extern char stext[1024], *tags[TLast];
+extern int tsel, screen, sx, sy, sw, sh, bx, by, bw, bh, mw;
+extern char *tags[TLast], stext[1024];
 
 extern DC dc;
 extern Client *clients, *sel;
 
+/* bar.c */
+extern void draw_bar();
+
 /* client.c */
 extern void manage(Window w, XWindowAttributes *wa);
 extern void unmanage(Client *c);
@@ -98,7 +111,7 @@ 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);
@@ -109,13 +122,14 @@ 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 ttrunc(Arg *arg);
+extern void tappend(Arg *arg);
 extern void view(Arg *arg);
 extern void zoom(Arg *arg);
 extern void gravitate(Client *c, Bool invert);
 
 /* draw.c */
-extern void draw(Bool border, const char *text);
+extern void drawtext(const char *text, Bool border);
 extern unsigned long initcolor(const char *colstr);
 extern void initfont(const char *fontstr);
 extern unsigned int textnw(char *text, unsigned int len);