summaryrefslogtreecommitdiffstats
path: root/bar.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <garbeam@gmail.com>2007-09-15 20:39:31 +0200
committerAnselm R. Garbe <garbeam@gmail.com>2007-09-15 20:39:31 +0200
commit2091200c957783deed032380d56c4199a23c6b81 (patch)
treedc878b437a2ebbe9cfbe79eced7dc50ae8f4fc55 /bar.c
parentmoved bar-related stuff to bar.c (merged draw.c into that) (diff)
downloaddwm-2091200c957783deed032380d56c4199a23c6b81.tar.gz
dwm-2091200c957783deed032380d56c4199a23c6b81.zip
new colorscheme (16-bit compliant)
Diffstat (limited to '')
-rw-r--r--bar.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/bar.c b/bar.c
index 9e3c386..91689cf 100644
--- a/bar.c
+++ b/bar.c
@@ -69,7 +69,8 @@ initfont(const char *fontstr) {
69 if(dc.font.xfont) 69 if(dc.font.xfont)
70 XFreeFont(dpy, dc.font.xfont); 70 XFreeFont(dpy, dc.font.xfont);
71 dc.font.xfont = NULL; 71 dc.font.xfont = NULL;
72 if(!(dc.font.xfont = XLoadQueryFont(dpy, fontstr))) 72 if(!(dc.font.xfont = XLoadQueryFont(dpy, fontstr))
73 || !(dc.font.xfont = XLoadQueryFont(dpy, "fixed")))
73 eprint("error, cannot load font: '%s'\n", fontstr); 74 eprint("error, cannot load font: '%s'\n", fontstr);
74 dc.font.ascent = dc.font.xfont->ascent; 75 dc.font.ascent = dc.font.xfont->ascent;
75 dc.font.descent = dc.font.xfont->descent; 76 dc.font.descent = dc.font.xfont->descent;
@@ -186,9 +187,7 @@ drawbar(void) {
186} 187}
187 188
188void 189void
189initbar(void) { 190initstyle(void) {
190 XSetWindowAttributes wa;
191
192 dc.norm[ColBorder] = initcolor(NORMBORDERCOLOR); 191 dc.norm[ColBorder] = initcolor(NORMBORDERCOLOR);
193 dc.norm[ColBG] = initcolor(NORMBGCOLOR); 192 dc.norm[ColBG] = initcolor(NORMBGCOLOR);
194 dc.norm[ColFG] = initcolor(NORMFGCOLOR); 193 dc.norm[ColFG] = initcolor(NORMFGCOLOR);
@@ -197,6 +196,12 @@ initbar(void) {
197 dc.sel[ColFG] = initcolor(SELFGCOLOR); 196 dc.sel[ColFG] = initcolor(SELFGCOLOR);
198 initfont(FONT); 197 initfont(FONT);
199 dc.h = bh = dc.font.height + 2; 198 dc.h = bh = dc.font.height + 2;
199}
200
201void
202initbar(void) {
203 XSetWindowAttributes wa;
204
200 wa.override_redirect = 1; 205 wa.override_redirect = 1;
201 wa.background_pixmap = ParentRelative; 206 wa.background_pixmap = ParentRelative;
202 wa.event_mask = ButtonPressMask | ExposureMask; 207 wa.event_mask = ButtonPressMask | ExposureMask;