Xinqi Bao's Git
projects
/
dwm.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
removed a bottleneck
[dwm.git]
/
dwm.h
diff --git
a/dwm.h
b/dwm.h
index
cf51c36
..
113e861
100644
(file)
--- a/
dwm.h
+++ b/
dwm.h
@@
-7,22
+7,24
@@
/********** CUSTOMIZE **********/
/********** 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 "#eeeeee"
+#define BORDERCOLOR "#9999CC"
+#define MASTERW 52 /* percent */
+#define WM_PROTOCOL_DELWIN 1
/* tags */
/* tags */
-enum { Tscratch, Tdev, T
irc, T
www, Twork, TLast };
+enum { Tscratch, Tdev, Twww, Twork, TLast };
/********** CUSTOMIZE **********/
/********** CUSTOMIZE **********/
+typedef union Arg Arg;
typedef struct DC DC;
typedef struct Client Client;
typedef struct Fnt Fnt;
typedef struct Key Key;
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;
union Arg {
const char **argv;
@@
-64,11
+66,18
@@
struct Client {
int grav;
unsigned int border;
long flags;
int grav;
unsigned int border;
long flags;
+ Bool floating;
Window win;
Window win;
- Window trans;
Window title;
Client *next;
Window title;
Client *next;
- Client *prev;
+ Client *revert;
+};
+
+struct Rule {
+ const char *class;
+ const char *instance;
+ char *tags[TLast];
+ Bool floating;
};
struct Key {
};
struct Key {
@@
-79,17
+88,22
@@
struct Key {
};
extern Display *dpy;
};
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 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 DC dc;
-extern Client *cstart, *cend, *csel;
+extern Client *clients, *sel;
+
+/* bar.c */
+extern void draw_bar();
+extern void barclick(XButtonPressedEvent *e);
/* client.c */
extern void manage(Window w, XWindowAttributes *wa);
/* client.c */
extern void manage(Window w, XWindowAttributes *wa);
@@
-98,7
+112,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 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 update_size(Client *c);
extern Client *gettitle(Window w);
extern void craise(Client *c);
@@
-109,20
+123,20
@@
extern void prevc(Arg *arg);
extern void max(Arg *arg);
extern void floating(Arg *arg);
extern void tiling(Arg *arg);
extern void max(Arg *arg);
extern void floating(Arg *arg);
extern void tiling(Arg *arg);
-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 gravitate(Client *c, Bool invert);
/* draw.c */
-extern void draw
(Bool border, const char *text
);
+extern void draw
text(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);
extern unsigned int textw(char *text);
extern unsigned int texth(void);
extern unsigned long initcolor(const char *colstr);
extern void initfont(const char *fontstr);
extern unsigned int textnw(char *text, unsigned int len);
extern unsigned int textw(char *text);
extern unsigned int texth(void);
-/* event.c */
-extern void discard_events(long even_mask);
-
/* dev.c */
extern void update_keys(void);
extern void keypress(XEvent *e);
/* dev.c */
extern void update_keys(void);
extern void keypress(XEvent *e);
@@
-138,8
+152,5
@@
extern void quit(Arg *arg);
/* util.c */
extern void error(const char *errstr, ...);
extern void *emallocz(unsigned int size);
/* util.c */
extern void error(const char *errstr, ...);
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(Arg *arg);
extern void swap(void **p1, void **p2);
extern void spawn(Arg *arg);
extern void swap(void **p1, void **p2);