2 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
3 * See LICENSE file for license details.
8 /********** CUSTOMIZE **********/
10 #define FONT "-*-terminus-medium-*-*-*-13-*-*-*-*-*-iso10646-*"
11 #define BGCOLOR "#0a2c2d"
12 #define FGCOLOR "#ddeeee"
13 #define BORDERCOLOR "#176164"
15 #define BGCOLOR "#666699"
16 #define FGCOLOR "#eeeeee"
17 #define BORDERCOLOR "#9999CC"
19 #define MASTERW 52 /* percent */
20 #define WM_PROTOCOL_DELWIN 1
23 enum { Tscratch, Tdev, Twww, Twork, TLast };
25 /********** CUSTOMIZE **********/
27 typedef union Arg Arg;
29 typedef struct Client Client;
30 typedef struct Fnt Fnt;
31 typedef struct Key Key;
32 typedef struct Rule Rule;
40 enum { NetSupported, NetWMName, NetLast };
41 enum { WMProtocols, WMDelete, WMLast };
44 enum { CurNormal, CurResize, CurMove, CurLast };
54 struct DC { /* draw context */
68 int *x, *y, *w, *h; /* current geom */
69 int bx, by, bw, bh; /* title bar */
70 int fx, fy, fw, fh; /* floating geom */
71 int tx, ty, tw, th; /* tiled geom */
72 int basew, baseh, incw, inch, maxw, maxh, minw, minh;
93 void (*func)(Arg *arg);
97 extern char *tags[TLast], stext[1024];
98 extern int tsel, screen, sx, sy, sw, sh, bx, by, bw, bh, mw;
99 extern void (*handler[LASTEvent])(XEvent *);
100 extern void (*arrange)(Arg *);
101 extern Atom wmatom[WMLast], netatom[NetLast];
102 extern Bool running, issel;
103 extern Client *clients, *sel;
104 extern Cursor cursor[CurLast];
108 extern Window root, barwin;
111 extern void ban(Client *c);
112 extern void focus(Client *c);
113 extern void focusnext(Arg *arg);
114 extern void focusprev(Arg *arg);
115 extern Client *getclient(Window w);
116 extern Client *getctitle(Window w);
117 extern void gravitate(Client *c, Bool invert);
118 extern void higher(Client *c);
119 extern void killclient(Arg *arg);
120 extern void lower(Client *c);
121 extern void manage(Window w, XWindowAttributes *wa);
122 extern void maximize(Arg *arg);
123 extern void pop(Client *c);
124 extern void resize(Client *c, Bool inc);
125 extern void setgeom(Client *c);
126 extern void setsize(Client *c);
127 extern void settitle(Client *c);
128 extern void unmanage(Client *c);
129 extern void zoom(Arg *arg);
132 extern void drawall();
133 extern void drawstatus();
134 extern void drawtitle(Client *c);
135 extern unsigned long getcolor(const char *colstr);
136 extern void setfont(const char *fontstr);
137 extern unsigned int textw(char *text);
140 extern void grabkeys();
143 extern int getproto(Window w);
144 extern void quit(Arg *arg);
145 extern void sendevent(Window w, Atom a, long value);
146 extern int xerror(Display *dsply, XErrorEvent *ee);
149 extern void appendtag(Arg *arg);
150 extern void dofloat(Arg *arg);
151 extern void dotile(Arg *arg);
152 extern Client *getnext(Client *c, unsigned int t);
153 extern void heretag(Arg *arg);
154 extern void replacetag(Arg *arg);
155 extern void settags(Client *c);
156 extern void view(Arg *arg);
159 extern void *emallocz(unsigned int size);
160 extern void eprint(const char *errstr, ...);
161 extern void spawn(Arg *arg);