[wiki] [sites] wiki updated

From: <hg_AT_suckless.org>
Date: Tue, 18 Aug 2009 08:55:12 +0000 (UTC)

changeset: 182:ef9b83723411
tag: tip
user: kzed_AT_eris
date: Tue Aug 18 10:54:41 2009 +0200
files: dwm.suckless.org/patches/attachabove.md dwm.suckless.org/patches/fancybar-5.6.1.diff dwm.suckless.org/patches/fancybar.md
description:
added page on fancybar patch; added author field to page on attachabove patch


diff -r 77f2089fac58 -r ef9b83723411 dwm.suckless.org/patches/attachabove.md
--- a/dwm.suckless.org/patches/attachabove.md Mon Aug 17 17:44:54 2009 +0200
+++ b/dwm.suckless.org/patches/attachabove.md Tue Aug 18 10:54:41 2009 +0200
_AT_@ -3,8 +3,12 @@
 ## Description
 
 Make new clients get attached above the selected client (instead of always
-becoming the new master) - basically how xmonad does it.
+becoming the new master) - basically how Xmonad does it.
 
 ## Download
 
- * [attachabove-5.6.1.diff](attachabove-5.6.1.diff) (1.1K) (20090817)
+ * [attachabove-5.6.1.diff](attachabove-5.6.1.diff) (1.1K) (20090817)
+
+## Author
+
+ * Mate Nagy - <mnagy_AT_port70.net>
diff -r 77f2089fac58 -r ef9b83723411 dwm.suckless.org/patches/fancybar-5.6.1.diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/patches/fancybar-5.6.1.diff Tue Aug 18 10:54:41 2009 +0200
_AT_@ -0,0 +1,86 @@
+diff -r e47a47bd3ed4 dwm.c
+--- a/dwm.c Tue Jul 21 10:57:54 2009 +0100
++++ b/dwm.c Mon Aug 17 16:28:08 2009 +0200
+_AT_@ -648,10 +648,11 @@
+
+ void
+ drawbar(Monitor *m) {
+- int x;
++ int x, ow, mw = 0, extra, tw;
+ unsigned int i, n = 0, occ = 0, urg = 0;
+ unsigned long *col;
+- Client *c;
++ Client *c, *firstvis, *lastvis = NULL;
++ DC seldc;
+
+ for(c = m->clients; c; c = c->next) {
+ if(ISVISIBLE(c))
+_AT_@ -689,16 +690,61 @@
+ }
+ else
+ dc.x = m->ww;
+- if((dc.w = dc.x - x) > bh) {
+- dc.x = x;
+- if(m->sel) {
+- col = m == selmon ? dc.sel : dc.norm;
+- drawtext(m->sel->name, col, False);
+- drawsquare(m->sel->isfixed, m->sel->isfloating, False, col);
++
++ for(c = m->clients; c && !ISVISIBLE(c); c = c->next);
++ firstvis = c;
++
++ col = m == selmon ? dc.sel : dc.norm;
++ dc.w = dc.x - x;
++ dc.x = x;
++
++ if(n > 0) {
++ mw = dc.w / n;
++ extra = 0;
++ seldc = dc;
++ i = 0;
++
++ while(c) {
++ lastvis = c;
++ tw = TEXTW(c->name);
++ if(tw < mw) extra += (mw - tw); else i++;
++ for(c = c->next; c && !ISVISIBLE(c); c = c->next);
+ }
+- else
++
++ if(i > 0) mw += extra / i;
++
++ c = firstvis;
++ x = dc.x;
++ }
++
++ while(dc.w > bh) {
++ if(c) {
++ ow = dc.w;
++ tw = TEXTW(c->name);
++ dc.w = MIN(ow, tw);
++
++ if(dc.w > mw) dc.w = mw;
++ if(m->sel == c) seldc = dc;
++ if(c == lastvis) dc.w = ow;
++
++ drawtext(c->name, col, False);
++ drawsquare(c->isfixed, c->isfloating, False, col);
++
++ dc.x += dc.w;
++ dc.w = ow - dc.w;
++ for(c = c->next; c && !ISVISIBLE(c); c = c->next);
++ } else {
+ drawtext(NULL, dc.norm, False);
++ break;
++ }
+ }
++
++ if(m == selmon && m->sel && ISVISIBLE(m->sel)) {
++ dc = seldc;
++ drawtext(m->sel->name, col, True);
++ drawsquare(m->sel->isfixed, m->sel->isfloating, True, col);
++ }
++
+ XCopyArea(dpy, dc.drawable, m->barwin, dc.gc, 0, 0, m->ww, bh, 0, 0);
+ XSync(dpy, False);
+ }
diff -r 77f2089fac58 -r ef9b83723411 dwm.suckless.org/patches/fancybar.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/patches/fancybar.md Tue Aug 18 10:54:41 2009 +0200
_AT_@ -0,0 +1,26 @@
+# FANCYBAR
+
+## Description
+
+This patch provides a status bar that shows the titles of all visible windows
+(as opposed to showing just the selected one). When the titles don't completely
+fit, they're cropped. The title of the selected window is inverted.
+
+[![Fancybar, no cropping][1]][2] [![Fancybar with cropping][3]][4]
+
+*Fancybar in action*
+
+## Download
+
+ * [fancybar-5.6.1.diff](fancybar-5.6.1.diff) (1.8K) (20090818)
+
+## Author
+
+ * Mate Nagy - <mnagy_AT_port70.net>
+
+This patch was inspired by the decorated tabbed layout of Xmonad.
+
+[1]: http://port70.net/~kzed/dwm-5.6.1/dwm-5.6.1-fancybar-1.png.jpg
+[2]: http://port70.net/~kzed/dwm-5.6.1/dwm-5.6.1-fancybar-1.png
+[3]: http://port70.net/~kzed/dwm-5.6.1/dwm-5.6.1-fancybar-2.png.jpg
+[4]: http://port70.net/~kzed/dwm-5.6.1/dwm-5.6.1-fancybar-2.png
Received on Tue Aug 18 2009 - 10:55:12 CEST

This archive was generated by hypermail 2.3.0 : Thu Sep 13 2012 - 19:30:44 CEST