[wiki] [sites] wiki updated
changeset: 186:bd6c91b4e5dd
tag: tip
user: kzed_AT_eris
date: Mon Aug 24 18:37:48 2009 +0200
files: dwm.suckless.org/patches/fancybar-5.6.1.diff dwm.suckless.org/patches/fancybar-r1483.diff dwm.suckless.org/patches/fancybar.md
description:
added visual separation between fancybar titles
diff -r b25edc1a4c94 -r bd6c91b4e5dd dwm.suckless.org/patches/fancybar-5.6.1.diff
--- a/dwm.suckless.org/patches/fancybar-5.6.1.diff Mon Aug 24 17:31:47 2009 +0200
+++ b/dwm.suckless.org/patches/fancybar-5.6.1.diff Mon Aug 24 18:37:48 2009 +0200
_AT_@ -1,7 +1,15 @@
diff -r e47a47bd3ed4 dwm.c
--- a/dwm.c Tue Jul 21 10:57:54 2009 +0100
-+++ b/dwm.c Mon Aug 24 17:22:55 2009 +0200
-_AT_@ -648,10 +648,11 @@
++++ b/dwm.c Mon Aug 24 18:28:57 2009 +0200
+_AT_@ -169,6 +169,7 @@
+ static Monitor *dirtomon(int dir);
+ static void drawbar(Monitor *m);
+ static void drawbars(void);
++static void drawvline(unsigned long col[ColLast]);
+ static void drawsquare(Bool filled, Bool empty, Bool invert, unsigned long col[ColLast]);
+ static void drawtext(const char *text, unsigned long col[ColLast], Bool invert);
+ static void enternotify(XEvent *e);
+_AT_@ -648,10 +649,11 @@
void
drawbar(Monitor *m) {
_AT_@ -15,7 +23,7 @@
for(c = m->clients; c; c = c->next) {
if(ISVISIBLE(c))
-_AT_@ -689,16 +690,61 @@
+_AT_@ -689,16 +691,62 @@
}
else
dc.x = m->ww;
_AT_@ -64,6 +72,7 @@
+ if(c == lastvis) dc.w = ow;
+
+ drawtext(c->name, col, False);
++ if(c != firstvis) drawvline(col);
+ drawsquare(c->isfixed, c->isfloating, False, col);
+
+ dc.x += dc.w;
_AT_@ -84,7 +93,23 @@
XCopyArea(dpy, dc.drawable, m->barwin, dc.gc, 0, 0, m->ww, bh, 0, 0);
XSync(dpy, False);
}
-_AT_@ -1235,8 +1281,7 @@
+_AT_@ -709,6 +757,15 @@
+
+ for(m = mons; m; m = m->next)
+ drawbar(m);
++}
++
++void
++drawvline(unsigned long col[ColLast]) {
++ XGCValues gcv;
++
++ gcv.foreground = col[ColFG];
++ XChangeGC(dpy, dc.gc, GCForeground, &gcv);
++ XDrawLine(dpy, dc.drawable, dc.gc, dc.x, dc.y, dc.x, dc.y + (dc.font.ascent + dc.font.descent + 2));
+ }
+
+ void
+_AT_@ -1235,8 +1292,7 @@
}
if(ev->atom == XA_WM_NAME || ev->atom == netatom[NetWMName]) {
updatetitle(c);
diff -r b25edc1a4c94 -r bd6c91b4e5dd dwm.suckless.org/patches/fancybar-r1483.diff
--- a/dwm.suckless.org/patches/fancybar-r1483.diff Mon Aug 24 17:31:47 2009 +0200
+++ b/dwm.suckless.org/patches/fancybar-r1483.diff Mon Aug 24 18:37:48 2009 +0200
_AT_@ -1,7 +1,15 @@
diff -r 63e19dad219c dwm.c
--- a/dwm.c Tue Aug 18 15:59:38 2009 +0100
-+++ b/dwm.c Mon Aug 24 17:26:52 2009 +0200
-_AT_@ -648,10 +648,11 @@
++++ b/dwm.c Mon Aug 24 18:29:24 2009 +0200
+_AT_@ -169,6 +169,7 @@
+ static Monitor *dirtomon(int dir);
+ static void drawbar(Monitor *m);
+ static void drawbars(void);
++static void drawvline(unsigned long col[ColLast]);
+ static void drawsquare(Bool filled, Bool empty, Bool invert, unsigned long col[ColLast]);
+ static void drawtext(const char *text, unsigned long col[ColLast], Bool invert);
+ static void enternotify(XEvent *e);
+_AT_@ -648,10 +649,11 @@
void
drawbar(Monitor *m) {
_AT_@ -15,7 +23,7 @@
for(c = m->clients; c; c = c->next) {
if(ISVISIBLE(c))
-_AT_@ -689,16 +690,61 @@
+_AT_@ -689,16 +691,62 @@
}
else
dc.x = m->ww;
_AT_@ -64,6 +72,7 @@
+ if(c == lastvis) dc.w = ow;
+
+ drawtext(c->name, col, False);
++ if(c != firstvis) drawvline(col);
+ drawsquare(c->isfixed, c->isfloating, False, col);
+
+ dc.x += dc.w;
_AT_@ -84,7 +93,23 @@
XCopyArea(dpy, dc.drawable, m->barwin, dc.gc, 0, 0, m->ww, bh, 0, 0);
XSync(dpy, False);
}
-_AT_@ -1235,8 +1281,7 @@
+_AT_@ -709,6 +757,15 @@
+
+ for(m = mons; m; m = m->next)
+ drawbar(m);
++}
++
++void
++drawvline(unsigned long col[ColLast]) {
++ XGCValues gcv;
++
++ gcv.foreground = col[ColFG];
++ XChangeGC(dpy, dc.gc, GCForeground, &gcv);
++ XDrawLine(dpy, dc.drawable, dc.gc, dc.x, dc.y, dc.x, dc.y + (dc.font.ascent + dc.font.descent + 2));
+ }
+
+ void
+_AT_@ -1235,8 +1292,7 @@
}
if(ev->atom == XA_WM_NAME || ev->atom == netatom[NetWMName]) {
updatetitle(c);
diff -r b25edc1a4c94 -r bd6c91b4e5dd dwm.suckless.org/patches/fancybar.md
--- a/dwm.suckless.org/patches/fancybar.md Mon Aug 24 17:31:47 2009 +0200
+++ b/dwm.suckless.org/patches/fancybar.md Mon Aug 24 18:37:48 2009 +0200
_AT_@ -12,8 +12,8 @@
## Download
- * [fancybar-5.6.1.diff](fancybar-5.6.1.diff) (2.0K) (20090824)
- * [fancybar-r1483.diff](fancybar-r1483.diff) (2.0K) (20090824)
+ * [fancybar-5.6.1.diff](fancybar-5.6.1.diff) (2.8K) (20090824)
+ * [fancybar-r1483.diff](fancybar-r1483.diff) (2.8K) (20090824)
## Author
Received on Mon Aug 24 2009 - 18:38:26 CEST
This archive was generated by hypermail 2.3.0
: Thu Sep 13 2012 - 19:30:44 CEST