author | arg@suckless.org |
Wed, 17 Oct 2007 11:19:14 +0200 | |
changeset 1033 | a8efbb301ef4 |
parent 1031 | 7216ff510041 |
child 1035 | 2034efee9702 |
permissions | -rw-r--r-- |
1029 | 1 |
/* See LICENSE file for copyright and license details. */ |
2 |
||
1031
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
3 |
/* enums */ |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
4 |
enum { BarTop, BarBot, BarOff }; /* bar position */ |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
5 |
enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
6 |
enum { ColBorder, ColFG, ColBG, ColLast }; /* color */ |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
7 |
enum { NetSupported, NetWMName, NetLast }; /* EWMH atoms */ |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
8 |
enum { WMProtocols, WMDelete, WMName, WMState, WMLast };/* default atoms */ |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
9 |
|
1029 | 10 |
/* typedefs */ |
11 |
typedef struct Client Client; |
|
12 |
struct Client { |
|
13 |
char name[256]; |
|
14 |
int x, y, w, h; |
|
15 |
int rx, ry, rw, rh; /* revert geometry */ |
|
16 |
int basew, baseh, incw, inch, maxw, maxh, minw, minh; |
|
17 |
int minax, maxax, minay, maxay; |
|
18 |
long flags; |
|
19 |
unsigned int border, oldborder; |
|
20 |
Bool isbanned, isfixed, ismax, isfloating, wasfloating; |
|
21 |
Bool *tags; |
|
22 |
Client *next; |
|
23 |
Client *prev; |
|
24 |
Client *snext; |
|
25 |
Window win; |
|
26 |
}; |
|
1031
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
27 |
|
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
28 |
typedef struct { |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
29 |
int x, y, w, h; |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
30 |
unsigned long norm[ColLast]; |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
31 |
unsigned long sel[ColLast]; |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
32 |
Drawable drawable; |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
33 |
GC gc; |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
34 |
struct { |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
35 |
int ascent; |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
36 |
int descent; |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
37 |
int height; |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
38 |
XFontSet set; |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
39 |
XFontStruct *xfont; |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
40 |
} font; |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
41 |
} DC; /* draw context */ |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
42 |
|
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
43 |
typedef struct { |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
44 |
unsigned long mod; |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
45 |
KeySym keysym; |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
46 |
void (*func)(const char *arg); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
47 |
const char *arg; |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
48 |
} Key; |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
49 |
|
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
50 |
typedef struct { |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
51 |
const char *symbol; |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
52 |
void (*arrange)(void); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
53 |
} Layout; |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
54 |
|
1033 | 55 |
typedef struct { |
56 |
const char *prop; |
|
57 |
const char *tags; |
|
58 |
Bool isfloating; |
|
59 |
} Rule; |
|
60 |
||
61 |
typedef struct { |
|
62 |
regex_t *propregex; |
|
63 |
regex_t *tagregex; |
|
64 |
} Regs; |
|
65 |
||
1031
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
66 |
/* functions */ |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
67 |
void applyrules(Client *c); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
68 |
void arrange(void); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
69 |
void attach(Client *c); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
70 |
void attachstack(Client *c); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
71 |
void ban(Client *c); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
72 |
void buttonpress(XEvent *e); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
73 |
void checkotherwm(void); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
74 |
void cleanup(void); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
75 |
void compileregs(void); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
76 |
void configure(Client *c); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
77 |
void configurenotify(XEvent *e); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
78 |
void configurerequest(XEvent *e); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
79 |
void destroynotify(XEvent *e); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
80 |
void detach(Client *c); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
81 |
void detachstack(Client *c); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
82 |
void drawbar(void); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
83 |
void drawsquare(Bool filled, Bool empty, unsigned long col[ColLast]); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
84 |
void drawtext(const char *text, unsigned long col[ColLast]); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
85 |
void *emallocz(unsigned int size); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
86 |
void enternotify(XEvent *e); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
87 |
void eprint(const char *errstr, ...); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
88 |
void expose(XEvent *e); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
89 |
void floating(void); /* default floating layout */ |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
90 |
void focus(Client *c); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
91 |
void focusnext(const char *arg); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
92 |
void focusprev(const char *arg); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
93 |
Client *getclient(Window w); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
94 |
unsigned long getcolor(const char *colstr); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
95 |
long getstate(Window w); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
96 |
Bool gettextprop(Window w, Atom atom, char *text, unsigned int size); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
97 |
void grabbuttons(Client *c, Bool focused); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
98 |
unsigned int idxoftag(const char *tag); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
99 |
void initfont(const char *fontstr); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
100 |
Bool isarrange(void (*func)()); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
101 |
Bool isoccupied(unsigned int t); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
102 |
Bool isprotodel(Client *c); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
103 |
Bool isvisible(Client *c); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
104 |
void keypress(XEvent *e); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
105 |
void killclient(const char *arg); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
106 |
void leavenotify(XEvent *e); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
107 |
void manage(Window w, XWindowAttributes *wa); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
108 |
void mappingnotify(XEvent *e); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
109 |
void maprequest(XEvent *e); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
110 |
void movemouse(Client *c); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
111 |
Client *nexttiled(Client *c); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
112 |
void propertynotify(XEvent *e); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
113 |
void quit(const char *arg); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
114 |
void resize(Client *c, int x, int y, int w, int h, Bool sizehints); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
115 |
void resizemouse(Client *c); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
116 |
void restack(void); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
117 |
void run(void); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
118 |
void scan(void); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
119 |
void setclientstate(Client *c, long state); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
120 |
void setlayout(const char *arg); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
121 |
void setmwfact(const char *arg); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
122 |
void setup(void); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
123 |
void spawn(const char *arg); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
124 |
void tag(const char *arg); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
125 |
unsigned int textnw(const char *text, unsigned int len); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
126 |
unsigned int textw(const char *text); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
127 |
void tile(void); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
128 |
void togglebar(const char *arg); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
129 |
void togglefloating(const char *arg); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
130 |
void togglemax(const char *arg); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
131 |
void toggletag(const char *arg); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
132 |
void toggleview(const char *arg); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
133 |
void unban(Client *c); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
134 |
void unmanage(Client *c); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
135 |
void unmapnotify(XEvent *e); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
136 |
void updatebarpos(void); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
137 |
void updatesizehints(Client *c); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
138 |
void updatetitle(Client *c); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
139 |
void view(const char *arg); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
140 |
void viewprevtag(const char *arg); /* views previous selected tags */ |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
141 |
int xerror(Display *dpy, XErrorEvent *ee); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
142 |
int xerrordummy(Display *dsply, XErrorEvent *ee); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
143 |
int xerrorstart(Display *dsply, XErrorEvent *ee); |
7216ff510041
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Anselm R. Garbe <garbeam@gmail.com>
parents:
1029
diff
changeset
|
144 |
void zoom(const char *arg); |
1033 | 145 |
|
146 |
/* variables */ |
|
147 |
char stext[256]; |
|
148 |
double mwfact; |
|
149 |
int screen, sx, sy, sw, sh, wax, way, waw, wah; |
|
150 |
int (*xerrorxlib)(Display *, XErrorEvent *); |
|
151 |
unsigned int bh, bpos; |
|
152 |
unsigned int blw = 0; |
|
153 |
unsigned int ltidx = 0; /* default */ |
|
154 |
unsigned int nlayouts = 0; |
|
155 |
unsigned int nrules = 0; |
|
156 |
unsigned int numlockmask = 0; |
|
157 |
void (*handler[LASTEvent]) (XEvent *) = { |
|
158 |
[ButtonPress] = buttonpress, |
|
159 |
[ConfigureRequest] = configurerequest, |
|
160 |
[ConfigureNotify] = configurenotify, |
|
161 |
[DestroyNotify] = destroynotify, |
|
162 |
[EnterNotify] = enternotify, |
|
163 |
[LeaveNotify] = leavenotify, |
|
164 |
[Expose] = expose, |
|
165 |
[KeyPress] = keypress, |
|
166 |
[MappingNotify] = mappingnotify, |
|
167 |
[MapRequest] = maprequest, |
|
168 |
[PropertyNotify] = propertynotify, |
|
169 |
[UnmapNotify] = unmapnotify |
|
170 |
}; |
|
171 |
Atom wmatom[WMLast], netatom[NetLast]; |
|
172 |
Bool otherwm, readin; |
|
173 |
Bool running = True; |
|
174 |
Bool selscreen = True; |
|
175 |
Client *clients = NULL; |
|
176 |
Client *sel = NULL; |
|
177 |
Client *stack = NULL; |
|
178 |
Cursor cursor[CurLast]; |
|
179 |
Display *dpy; |
|
180 |
DC dc = {0}; |
|
181 |
Window barwin, root; |
|
182 |
Regs *regs = NULL; |
|
183 |
||
184 |
/* configuration, allows nested code to access above variables */ |
|
185 |
#include "config.h" |
|
186 |
||
187 |
/* Statically define the number of tags. */ |
|
188 |
unsigned int ntags = sizeof tags / sizeof tags[0]; |
|
189 |
Bool seltags[sizeof tags / sizeof tags[0]] = {[0] = True}; |
|
190 |
Bool prevtags[sizeof tags / sizeof tags[0]] = {[0] = True}; |
|
191 |