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"
14 #define MODKEY Mod1Mask /* Mod4Mask */
16 #define BGCOLOR "#666699"
17 #define FGCOLOR "#eeeeee"
18 #define BORDERCOLOR "#9999CC"
20 #define MASTERW 52 /* percent */
21 #define WM_PROTOCOL_DELWIN 1
24 enum { Tscratch, Tdev, Twww, Twork, TLast };
26 /********** CUSTOMIZE **********/
28 typedef union Arg Arg;
29 typedef struct Client Client;
30 typedef enum Corner Corner;
32 typedef struct Fnt Fnt;
40 enum { NetSupported, NetWMName, NetLast };
41 enum { WMProtocols, WMDelete, WMLast };
44 enum { CurNormal, CurResize, CurMove, CurLast };
46 enum Corner { TopLeft, TopRight, BotLeft, BotRight };
56 struct DC { /* draw context */
71 int tx, ty, tw, th; /* title */
72 int basew, baseh, incw, inch, maxw, maxh, minw, minh;
83 extern char *tags[TLast], stext[1024];
84 extern int tsel, screen, sx, sy, sw, sh, bx, by, bw, bh, mw;
85 extern void (*handler[LASTEvent])(XEvent *);
86 extern void (*arrange)(Arg *);
87 extern Atom wmatom[WMLast], netatom[NetLast];
88 extern Bool running, issel;
89 extern Client *clients, *sel;
90 extern Cursor cursor[CurLast];
93 extern Window root, barwin;
96 extern void ban(Client *c);
97 extern void focus(Client *c);
98 extern void focusnext(Arg *arg);
99 extern void focusprev(Arg *arg);
100 extern Client *getclient(Window w);
101 extern Client *getctitle(Window w);
102 extern void gravitate(Client *c, Bool invert);
103 extern void higher(Client *c);
104 extern void killclient(Arg *arg);
105 extern void lower(Client *c);
106 extern void manage(Window w, XWindowAttributes *wa);
107 extern void maximize(Arg *arg);
108 extern void pop(Client *c);
109 extern void resize(Client *c, Bool inc, Corner sticky);
110 extern void setsize(Client *c);
111 extern void settitle(Client *c);
112 extern void unmanage(Client *c);
113 extern void zoom(Arg *arg);
116 extern void drawall();
117 extern void drawstatus();
118 extern void drawtitle(Client *c);
119 extern unsigned long getcolor(const char *colstr);
120 extern void setfont(const char *fontstr);
121 extern unsigned int textw(char *text);
124 extern void grabkeys();
127 extern int getproto(Window w);
128 extern void quit(Arg *arg);
129 extern void sendevent(Window w, Atom a, long value);
130 extern int xerror(Display *dsply, XErrorEvent *ee);
133 extern void appendtag(Arg *arg);
134 extern void dofloat(Arg *arg);
135 extern void dotile(Arg *arg);
136 extern Client *getnext(Client *c, unsigned int t);
137 extern void heretag(Arg *arg);
138 extern void replacetag(Arg *arg);
139 extern void settags(Client *c);
140 extern void view(Arg *arg);
143 extern void *emallocz(unsigned int size);
144 extern void eprint(const char *errstr, ...);
145 extern void spawn(Arg *arg);