sites

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 8d2910fd3e59b3b0fa6863c63857e0b1e11dcf00
parent 2249dce189cfaaf57290ff03642e4aa0de150a10
Author: kzed@eris <unknown>
Date:   Tue, 18 Aug 2009 10:54:41 +0200

added page on fancybar patch; added author field to page on attachabove patch
Diffstat:
Mdwm.suckless.org/patches/attachabove.md | 8++++++--
Adwm.suckless.org/patches/fancybar-5.6.1.diff | 86+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/fancybar.md | 26++++++++++++++++++++++++++
3 files changed, 118 insertions(+), 2 deletions(-)

diff --git a/dwm.suckless.org/patches/attachabove.md b/dwm.suckless.org/patches/attachabove.md @@ -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@port70.net> diff --git a/dwm.suckless.org/patches/fancybar-5.6.1.diff b/dwm.suckless.org/patches/fancybar-5.6.1.diff @@ -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 +@@ -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)) +@@ -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 --git a/dwm.suckless.org/patches/fancybar.md b/dwm.suckless.org/patches/fancybar.md @@ -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@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