---- - config.def.h | 2 ++ - config.mk | 2 +- - drw.c | 22 +++++++++---------- - drw.h | 7 ++++-- - dwm.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++---------- - 5 files changed, 78 insertions(+), 25 deletions(-) - -diff --git a/config.def.h b/config.def.h -index 7054c06..4448d46 100644 ---- a/config.def.h -+++ b/config.def.h -_AT_@ -11,6 +11,8 @@ static const char normfgcolor[] = "#bbbbbb"; - static const char selbordercolor[] = "#005577"; - static const char selbgcolor[] = "#005577"; - static const char selfgcolor[] = "#eeeeee"; -+static unsigned int baralpha = 0xd0; -+static unsigned int borderalpha = OPAQUE; - static const unsigned int borderpx = 1; /* border pixel of windows */ - static const unsigned int snap = 32; /* snap pixel */ - static const int showbar = 1; /* 0 means no bar */ -diff --git a/config.mk b/config.mk -index 80dc936..2c62e89 100644 ---- a/config.mk -+++ b/config.mk -_AT_@ -22,7 +22,7 @@ FREETYPEINC = /usr/include/freetype2 - - # includes and libs - INCS = -I${X11INC} -I${FREETYPEINC} --LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} -+LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} -lXrender - - # flags - CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} -diff --git a/drw.c b/drw.c -index f49200b..12e3ebc 100644 ---- a/drw.c -+++ b/drw.c -_AT_@ -61,7 +61,7 @@ utf8decode(const char *c, long *u, size_t clen) - } - - Drw * --drw_create(Display *dpy, int screen, Window root, unsigned int w, unsigned int h) -+drw_create(Display *dpy, int screen, Window root, unsigned int w, unsigned int h, Visual *visual, unsigned int depth, Colormap cmap) - { - Drw *drw; - -_AT_@ -71,8 +71,11 @@ drw_create(Display *dpy, int screen, Window root, unsigned int w, unsigned int h - drw->root = root; - drw->w = w; - drw->h = h; -- drw->drawable = XCreatePixmap(dpy, root, w, h, DefaultDepth(dpy, screen)); -- drw->gc = XCreateGC(dpy, root, 0, NULL); -+ drw->visual = visual; -+ drw->depth = depth; -+ drw->cmap = cmap; -+ drw->drawable = XCreatePixmap(dpy, root, w, h, depth); -+ drw->gc = XCreateGC(dpy, drw->drawable, 0, NULL); - drw->fontcount = 0; - XSetLineAttributes(dpy, drw->gc, 1, LineSolid, CapButt, JoinMiter); - -_AT_@ -86,7 +89,7 @@ drw_resize(Drw *drw, unsigned int w, unsigned int h) - drw->h = h; - if (drw->drawable) - XFreePixmap(drw->dpy, drw->drawable); -- drw->drawable = XCreatePixmap(drw->dpy, drw->root, w, h, DefaultDepth(drw->dpy, drw->screen)); -+ drw->drawable = XCreatePixmap(drw->dpy, drw->root, w, h, drw->depth); - } - - void -_AT_@ -180,16 +183,15 @@ drw_font_free(Fnt *font) - } - - Clr * --drw_clr_create(Drw *drw, const char *clrname) -+drw_clr_create(Drw *drw, const char *clrname, unsigned int alpha) - { - Clr *clr; - - clr = ecalloc(1, sizeof(Clr)); -- if (!XftColorAllocName(drw->dpy, DefaultVisual(drw->dpy, drw->screen), -- DefaultColormap(drw->dpy, drw->screen), -+ if (!XftColorAllocName(drw->dpy, drw->visual, drw->cmap, - clrname, &clr->rgb)) - die("error, cannot allocate color '%s' ", clrname); -- clr->pix = clr->rgb.pixel; -+ clr->pix = (clr->rgb.pixel & 0x00ffffffU) | (alpha << 24); - - return clr; - } -_AT_@ -245,9 +247,7 @@ drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, const char *tex - XSetForeground(drw->dpy, drw->gc, invert ? - drw->scheme->fg->pix : drw->scheme->bg->pix); - XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w, h); -- d = XftDrawCreate(drw->dpy, drw->drawable, -- DefaultVisual(drw->dpy, drw->screen), -- DefaultColormap(drw->dpy, drw->screen)); -+ d = XftDrawCreate(drw->dpy, drw->drawable, drw->visual, drw->cmap); - } - - curfont = drw->fonts[0]; -diff --git a/drw.h b/drw.h -index e3b8515..1fed824 100644 ---- a/drw.h -+++ b/drw.h -_AT_@ -30,6 +30,9 @@ typedef struct { - Display *dpy; - int screen; - Window root; -+ Visual *visual; -+ unsigned int depth; -+ Colormap cmap; - Drawable drawable; - GC gc; - ClrScheme *scheme; -_AT_@ -43,7 +46,7 @@ typedef struct { - } Extnts; - - /* Drawable abstraction */ --Drw *drw_create(Display *, int, Window, unsigned int, unsigned int); -+Drw *drw_create(Display *, int, Window, unsigned int, unsigned int, Visual*, unsigned int, Colormap); - void drw_resize(Drw *, unsigned int, unsigned int); - void drw_free(Drw *); - -_AT_@ -55,7 +58,7 @@ void drw_font_getexts(Fnt *, const char *, unsigned int, Extnts *); - unsigned int drw_font_getexts_width(Fnt *, const char *, unsigned int); - - /* Colour abstraction */ --Clr *drw_clr_create(Drw *, const char *); -+Clr *drw_clr_create(Drw *, const char *, unsigned int); - void drw_clr_free(Clr *); - - /* Cursor abstraction */ -diff --git a/dwm.c b/dwm.c -index ff7e096..286fb10 100644 ---- a/dwm.c -+++ b/dwm.c -_AT_@ -57,6 +57,8 @@ - #define TAGMASK ((1 << LENGTH(tags)) - 1) - #define TEXTW(X) (drw_text(drw, 0, 0, 0, 0, (X), 0) + drw->fonts[0]->h) - -+#define OPAQUE 0xffU -+ - /* enums */ - enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ - enum { SchemeNorm, SchemeSel, SchemeLast }; /* color schemes */ -_AT_@ -232,6 +234,7 @@ static Monitor *wintomon(Window w); - static int xerror(Display *dpy, XErrorEvent *ee); - static int xerrordummy(Display *dpy, XErrorEvent *ee); - static int xerrorstart(Display *dpy, XErrorEvent *ee); -+static void xinitvisual(); - static void zoom(const Arg *arg); - - /* variables */ -_AT_@ -267,6 +270,11 @@ static Drw *drw; - static Monitor *mons, *selmon; - static Window root; - -+static int useargb = 0; -+static Visual *visual; -+static int depth; -+static Colormap cmap; -+ - /* configuration, allows nested code to access above variables */ - #include "config.h" - -_AT_@ -1561,7 +1569,8 @@ setup(void) - sw = DisplayWidth(dpy, screen); - sh = DisplayHeight(dpy, screen); - root = RootWindow(dpy, screen); -- drw = drw_create(dpy, screen, root, sw, sh); -+ xinitvisual(); -+ drw = drw_create(dpy, screen, root, sw, sh, visual, depth, cmap); - drw_load_fonts(drw, fonts, LENGTH(fonts)); - if (!drw->fontcount) - die("no fonts could be loaded. "); -_AT_@ -1585,12 +1594,12 @@ setup(void) - cursor[CurResize] = drw_cur_create(drw, XC_sizing); - cursor[CurMove] = drw_cur_create(drw, XC_fleur); - /* init appearance */ -- scheme[SchemeNorm].border = drw_clr_create(drw, normbordercolor); -- scheme[SchemeNorm].bg = drw_clr_create(drw, normbgcolor); -- scheme[SchemeNorm].fg = drw_clr_create(drw, normfgcolor); -- scheme[SchemeSel].border = drw_clr_create(drw, selbordercolor); -- scheme[SchemeSel].bg = drw_clr_create(drw, selbgcolor); -- scheme[SchemeSel].fg = drw_clr_create(drw, selfgcolor); -+ scheme[SchemeNorm].border = drw_clr_create(drw, normbordercolor, borderalpha); -+ scheme[SchemeNorm].bg = drw_clr_create(drw, normbgcolor, baralpha); -+ scheme[SchemeNorm].fg = drw_clr_create(drw, normfgcolor, OPAQUE); -+ scheme[SchemeSel].border = drw_clr_create(drw, selbordercolor, borderalpha); -+ scheme[SchemeSel].bg = drw_clr_create(drw, selbgcolor, baralpha); -+ scheme[SchemeSel].fg = drw_clr_create(drw, selfgcolor, OPAQUE); - /* init bars */ - updatebars(); - updatestatus(); -_AT_@ -1803,15 +1812,17 @@ updatebars(void) - Monitor *m; - XSetWindowAttributes wa = { - .override_redirect = True, -- .background_pixmap = ParentRelative, -+ .background_pixel = 0, -+ .border_pixel = 0, -+ .colormap = cmap, - .event_mask = ButtonPressMask|ExposureMask - }; - for (m = mons; m; m = m->next) { - if (m->barwin) - continue; -- m->barwin = XCreateWindow(dpy, root, m->wx, m->by, m->ww, bh, 0, DefaultDepth(dpy, screen), -- CopyFromParent, DefaultVisual(dpy, screen), -- CWOverrideRedirect|CWBackPixmap|CWEventMask, &wa); -+ m->barwin = XCreateWindow(dpy, root, m->wx, m->by, m->ww, bh, 0, depth, -+ InputOutput, visual, -+ CWOverrideRedirect|CWBackPixel|CWBorderPixel|CWColormap|CWEventMask, &wa); - XDefineCursor(dpy, m->barwin, cursor[CurNormal]->cursor); - XMapRaised(dpy, m->barwin); - } -_AT_@ -2112,6 +2123,43 @@ xerrorstart(Display *dpy, XErrorEvent *ee) - } - - void -+xinitvisual() -+{ -+ XVisualInfo *infos; -+ XRenderPictFormat *fmt; -+ int nitems; -+ int i; -+ -+ XVisualInfo tpl = { -+ .screen = screen, -+ .depth = 32, -+ .class = TrueColor -+ }; -+ long masks = VisualScreenMask | VisualDepthMask | VisualClassMask; -+ -+ infos = XGetVisualInfo(dpy, masks, &tpl, &nitems); -+ visual = NULL; -+ for(i = 0; i < nitems; i ++) { -+ fmt = XRenderFindVisualFormat(dpy, infos[i].visual); -+ if (fmt->type == PictTypeDirect && fmt->direct.alphaMask) { -+ visual = infos[i].visual; -+ depth = infos[i].depth; -+ cmap = XCreateColormap(dpy, root, visual, AllocNone); -+ useargb = 1; -+ break; -+ } -+ } -+ -+ XFree(infos); -+ -+ if (! visual) { -+ visual = DefaultVisual(dpy, screen); -+ depth = DefaultDepth(dpy, screen); -+ cmap = DefaultColormap(dpy, screen); -+ } -+} -+ -+void - zoom(const Arg *arg) - { - Client *c = selmon->sel; --- -2.1.4 - diff --git a/dwm.suckless.org/patches/dwm-5.7.2-nametag.diff b/dwm.suckless.org/patches/dwm-5.7.2-nametag.diff deleted file mode 100644 index 6c4d752..0000000 --- a/dwm.suckless.org/patches/dwm-5.7.2-nametag.diff +++ /dev/null _AT_@ -1,70 +0,0 @@ -diff -r 2bcd25cce4ab config.def.h ---- a/config.def.h Sun Sep 27 20:20:14 2009 +0100 -+++ b/config.def.h Thu Oct 29 12:27:26 2009 -0700 -_AT_@ -14,7 +14,8 @@ - static const Bool topbar = True; /* False means bottom bar */ - - /* tagging */ --static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; -+#define MAX_TAGLEN 16 -+static char tags[][MAX_TAGLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; - - static const Rule rules[] = { - /* class instance title tags mask isfloating monitor */ -_AT_@ -71,6 +72,7 @@ - { MODKEY, XK_period, focusmon, {.i = +1 } }, - { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, - { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, -+ { MODKEY, XK_n, nametag, {0} }, - TAGKEYS( XK_1, 0) - TAGKEYS( XK_2, 1) - TAGKEYS( XK_3, 2) -diff -r 2bcd25cce4ab config.mk ---- a/config.mk Sun Sep 27 20:20:14 2009 +0100 -+++ b/config.mk Thu Oct 29 12:27:26 2009 -0700 -_AT_@ -19,7 +19,7 @@ - LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 ${XINERAMALIBS} - - # flags --CPPFLAGS = -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} -+CPPFLAGS = -D_BSD_SOURCE -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} - #CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS} - CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS} - #LDFLAGS = -g ${LIBS} -diff -r 2bcd25cce4ab dwm.c ---- a/dwm.c Sun Sep 27 20:20:14 2009 +0100 -+++ b/dwm.c Thu Oct 29 12:27:26 2009 -0700 -_AT_@ -195,6 +195,7 @@ - static void maprequest(XEvent *e); - static void monocle(Monitor *m); - static void movemouse(const Arg *arg); -+static void nametag(const Arg *arg); - static Client *nexttiled(Client *c); - static Monitor *ptrtomon(int x, int y); - static void propertynotify(XEvent *e); -_AT_@ -1240,6 +1241,25 @@ - } - } - -+void -+nametag(const Arg *arg) { -+ char *cp, name[MAX_TAGLEN]; -+ FILE *fp; -+ int i; -+ -+ if(!(fp = (FILE*)popen("echo -n | dmenu", "r"))) -+ fprintf(stderr, "dwm: Could not popen 'echo -n | dmenu' "); -+ cp = fgets(name, MAX_TAGLEN, fp); -+ pclose(fp); -+ if(cp == NULL) -+ return; -+ -+ for(i = 0; i < LENGTH(tags); i++) -+ if(selmon->tagset[selmon->seltags] & (1 << i)) -+ memcpy(tags[i], name, MAX_TAGLEN); -+ drawbars(); -+} -+ - Client * - nexttiled(Client *c) { - for(; c && (c->isfloating || !ISVISIBLE(c)); c = c->next); diff --git a/dwm.suckless.org/patches/dwm-5.7.2-sizehints.diff b/dwm.suckless.org/patches/dwm-5.7.2-sizehints.diff deleted file mode 100644 index 82c2499..0000000 --- a/dwm.suckless.org/patches/dwm-5.7.2-sizehints.diff +++ /dev/null _AT_@ -1,24 +0,0 @@ -diff -r 46109f7eeb14 dwm.c ---- a/dwm.c Mon Dec 21 01:14:28 2009 -0500 -+++ b/dwm.c Mon Dec 21 01:16:38 2009 -0500 -_AT_@ -1841,7 +1841,7 @@ - - if(!XGetWMNormalHints(dpy, c->win, &size, &msize)) - /* size is uninitialized, ensure that size.flags aren't used */ -- size.flags = PSize; -+ size.flags = 0; - if(size.flags & PBaseSize) { - c->basew = size.base_width; - c->baseh = size.base_height; -_AT_@ -1880,6 +1880,11 @@ - } - else - c->maxa = c->mina = 0.0; -+ if(size.flags & PSize) { -+ c->basew = size.base_width; -+ c->baseh = size.base_height; -+ c->isfloating = True; -+ } - c->isfixed = (c->maxw && c->minw && c->maxh && c->minh - && c->maxw == c->minw && c->maxh == c->minh); - } diff --git a/dwm.suckless.org/patches/dwm-5.8.2-current_desktop.diff b/dwm.suckless.org/patches/dwm-5.8.2-current_desktop.diff deleted file mode 100644 index 3f22b9f..0000000 --- a/dwm.suckless.org/patches/dwm-5.8.2-current_desktop.diff +++ /dev/null _AT_@ -1,109 +0,0 @@ -diff -r 23b71491e149 dwm.c ---- a/dwm.c Thu Dec 02 10:16:47 2010 +0000 -+++ b/dwm.c Mon Dec 13 08:18:03 2010 -0500 -_AT_@ -57,8 +57,8 @@ - /* enums */ - enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ - enum { ColBorder, ColFG, ColBG, ColLast }; /* color */ --enum { NetSupported, NetWMName, NetWMState, -- NetWMFullscreen, NetLast }; /* EWMH atoms */ -+enum { NetSupported, NetWMName, NetWMState, NetWMFullscreen, -+ NetNumberOfDesktops, NetCurrentDesktop, NetLast }; /* EWMH atoms */ - enum { WMProtocols, WMDelete, WMState, WMLast }; /* default atoms */ - enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, - ClkClientWin, ClkRootWin, ClkLast }; /* clicks */ -_AT_@ -212,6 +212,7 @@ - static void setclientstate(Client *c, long state); - static void setlayout(const Arg *arg); - static void setmfact(const Arg *arg); -+static void setnumbdesktops(void); - static void setup(void); - static void showhide(Client *c); - static void sigchld(int unused); -_AT_@ -227,6 +228,7 @@ - static void unfocus(Client *c, Bool setfocus); - static void unmanage(Client *c, Bool destroyed); - static void unmapnotify(XEvent *e); -+static void updatecurrenddesktop(void); - static Bool updategeom(void); - static void updatebarpos(Monitor *m); - static void updatebars(void); -_AT_@ -1467,6 +1469,13 @@ - } - - void -+setcurrentdesktop(void){ -+ long data[] = { 0 }; -+ XChangeProperty(dpy, root, netatom[NetCurrentDesktop], XA_CARDINAL, 32, -+ PropModeReplace, (unsigned char *)data, 1); -+} -+ -+void - setclientstate(Client *c, long state) { - long data[] = { state, None }; - -_AT_@ -1502,6 +1511,13 @@ - } - - void -+setnumbdesktops(void){ -+ long data[] = { TAGMASK }; -+ XChangeProperty(dpy, root, netatom[NetNumberOfDesktops], XA_CARDINAL, 32, -+ PropModeReplace, (unsigned char *)data, 1); -+} -+ -+void - setup(void) { - XSetWindowAttributes wa; - -_AT_@ -1524,6 +1540,8 @@ - netatom[NetWMName] = XInternAtom(dpy, "_NET_WM_NAME", False); - netatom[NetWMState] = XInternAtom(dpy, "_NET_WM_STATE", False); - netatom[NetWMFullscreen] = XInternAtom(dpy, "_NET_WM_STATE_FULLSCREEN", False); -+ netatom[NetNumberOfDesktops] = XInternAtom(dpy, "_NET_NUMBER_OF_DESKTOPS", False); -+ netatom[NetCurrentDesktop] = XInternAtom(dpy, "_NET_CURRENT_DESKTOP", False); - /* init cursors */ - cursor[CurNormal] = XCreateFontCursor(dpy, XC_left_ptr); - cursor[CurResize] = XCreateFontCursor(dpy, XC_sizing); -_AT_@ -1546,6 +1564,10 @@ - /* EWMH support per view */ - XChangeProperty(dpy, root, netatom[NetSupported], XA_ATOM, 32, - PropModeReplace, (unsigned char *) netatom, NetLast); -+ /* set EWMH NUMBER_OF_DESKTOPS */ -+ setnumbdesktops(); -+ /* initialize EWMH CURRENT_DESKTOP */ -+ setcurrentdesktop(); - /* select for events */ - wa.cursor = cursor[CurNormal]; - wa.event_mask = SubstructureRedirectMask|SubstructureNotifyMask|ButtonPressMask -_AT_@ -1688,6 +1710,7 @@ - selmon->tagset[selmon->seltags] = newtagset; - arrange(selmon); - } -+ updatecurrenddesktop(); - } - - void -_AT_@ -1763,6 +1786,14 @@ - m->by = -bh; - } - -+void -+updatecurrenddesktop(){ -+ long data[] = { selmon->tagset[selmon->seltags] }; -+ -+ XChangeProperty(dpy, root, netatom[NetCurrentDesktop], XA_CARDINAL, 32, -+ PropModeReplace, (unsigned char *)data, 1); -+} -+ - Bool - updategeom(void) { - Bool dirty = False; -_AT_@ -1948,6 +1979,7 @@ - if(arg->ui & TAGMASK) - selmon->tagset[selmon->seltags] = arg->ui & TAGMASK; - arrange(selmon); -+ updatecurrenddesktop(); - } - - Client * diff --git a/dwm.suckless.org/patches/dwm-5.8.2-fibonacci.diff b/dwm.suckless.org/patches/dwm-5.8.2-fibonacci.diff deleted file mode 100644 index 78664c8..0000000 --- a/dwm.suckless.org/patches/dwm-5.8.2-fibonacci.diff +++ /dev/null _AT_@ -1,85 +0,0 @@ -diff --git a/config.def.h b/config.def.h -index cca37df..91b91aa 100644 ---- a/config.def.h -+++ b/config.def.h -_AT_@ -29,1 +29,2 @@ -+#include "fibonacci.c" - static const Layout layouts[] = { -_AT_@ -34,3 +35,5 @@ -+ { "[_AT_]", spiral }, -+ { "[\]", dwindle }, - }; - - /* key definitions */ -diff --git a/fibonacci.c b/fibonacci.c -new file mode 100644 -index 0000000..fce0a57 ---- /dev/null -+++ b/fibonacci.c -_AT_@ -0,0 +1,66 @@ -+void -+fibonacci(Monitor *mon, int s) { -+ unsigned int i, n, nx, ny, nw, nh; -+ Client *c; -+ -+ for(n = 0, c = nexttiled(mon->clients); c; c = nexttiled(c->next), n++); -+ if(n == 0) -+ return; -+ -+ nx = mon->wx; -+ ny = 0; -+ nw = mon->ww; -+ nh = mon->wh; -+ -+ for(i = 0, c = nexttiled(mon->clients); c; c = nexttiled(c->next)) { -+ if((i % 2 && nh / 2 > 2 * c->bw) -+ || (!(i % 2) && nw / 2 > 2 * c->bw)) { -+ if(i < n - 1) { -+ if(i % 2) -+ nh /= 2; -+ else -+ nw /= 2; -+ if((i % 4) == 2 && !s) -+ nx += nw; -+ else if((i % 4) == 3 && !s) -+ ny += nh; -+ } -+ if((i % 4) == 0) { -+ if(s) -+ ny += nh; -+ else -+ ny -= nh; -+ } -+ else if((i % 4) == 1) -+ nx += nw; -+ else if((i % 4) == 2) -+ ny += nh; -+ else if((i % 4) == 3) { -+ if(s) -+ nx += nw; -+ else -+ nx -= nw; -+ } -+ if(i == 0) -+ { -+ if(n != 1) -+ nw = mon->ww * mon->mfact; -+ ny = mon->wy; -+ } -+ else if(i == 1) -+ nw = mon->ww - nw; -+ i++; -+ } -+ resize(c, nx, ny, nw - 2 * c->bw, nh - 2 * c->bw, False); -+ } -+} -+ -+void -+dwindle(Monitor *mon) { -+ fibonacci(mon, 1); -+} -+ -+void -+spiral(Monitor *mon) { -+ fibonacci(mon, 0); -+} diff --git a/dwm.suckless.org/patches/dwm-5.8.2-gridmode.diff b/dwm.suckless.org/patches/dwm-5.8.2-gridmode.diff deleted file mode 100644 index 0cbd8e2..0000000 --- a/dwm.suckless.org/patches/dwm-5.8.2-gridmode.diff +++ /dev/null _AT_@ -1,43 +0,0 @@ -diff -r 62791cc97f88 config.def.h ---- a/config.def.h Tue Jun 01 17:39:26 2010 +0100 -+++ b/config.def.h Wed Jun 02 13:42:49 2010 +0100 -_AT_@ -29,1 +29,2 @@ -+#include "grid.c" - static const Layout layouts[] = { -_AT_@ -34,3 +35,4 @@ -+ { "HHH", grid }, - }; - - /* key definitions */ -diff -r 62791cc97f88 grid.c ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/grid.c Wed Jun 02 13:42:49 2010 +0100 -_AT_@ -0,0 +1,28 @@ -+void -+grid(Monitor *m) { -+ unsigned int i, n, cx, cy, cw, ch, aw, ah, cols, rows; -+ Client *c; -+ -+ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next)) -+ n++; -+ -+ /* grid dimensions */ -+ for(rows = 0; rows <= n/2; rows++) -+ if(rows*rows >= n) -+ break; -+ cols = (rows && (rows - 1) * rows >= n) ? rows - 1 : rows; -+ -+ /* window geoms (cell height/width) */ -+ ch = m->wh / (rows ? rows : 1); -+ cw = m->ww / (cols ? cols : 1); -+ for(i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next)) { -+ cx = m->wx + (i / rows) * cw; -+ cy = m->wy + (i % rows) * ch; -+ /* adjust height/width of last row/column's windows */ -+ ah = ((i + 1) % rows == 0) ? m->wh - ch * rows : 0; -+ aw = (i >= rows * (cols - 1)) ? m->ww - cw * cols : 0; -+ resize(c, cx, cy, cw - 2 * c->bw + aw, ch - 2 * c->bw + ah, False); -+ i++; -+ } -+} -+ diff --git a/dwm.suckless.org/patches/dwm-5.8.2-monocle_count.diff b/dwm.suckless.org/patches/dwm-5.8.2-monocle_count.diff deleted file mode 100644 index 7744ce6..0000000 --- a/dwm.suckless.org/patches/dwm-5.8.2-monocle_count.diff +++ /dev/null _AT_@ -1,52 +0,0 @@ -diff -r -U5 dwm-5.8.2/dwm.c dwm-5.8.2_monocle_count/dwm.c ---- dwm-5.8.2/dwm.c 2010-06-04 12:39:15.000000000 +0200 -+++ dwm-5.8.2_monocle_count/dwm.c 2010-06-15 15:52:51.000000000 +0200 -_AT_@ -684,10 +684,12 @@ - void - drawbar(Monitor *m) { - int x; - unsigned int i, occ = 0, urg = 0; - unsigned long *col; -+ unsigned int a= 0, s= 0; -+ char posbuf[10]; - Client *c; - - for(c = m->clients; c; c = c->next) { - occ |= c->tags; - if(c->isurgent) -_AT_@ -704,10 +706,22 @@ - } - dc.w = blw = TEXTW(m->ltsymbol); - drawtext(m->ltsymbol, dc.norm, False); - dc.x += dc.w; - x = dc.x; -+ if(m->lt[m->sellt]->arrange == monocle){ -+ for(c= nexttiled(m->clients), a= 0, s= 0; c; c= nexttiled(c->next), a++) -+ if(c == m->stack) -+ s= a; -+ if(!s && a) -+ s= a; -+ snprintf(posbuf, LENGTH(posbuf), "[%d/%d]", s, a); -+ dc.w= TEXTW(posbuf); -+ drawtext(posbuf, dc.norm, False); -+ x= dc.x + dc.w; -+ } -+ - if(m == selmon) { /* status is only drawn on selected monitor */ - dc.w = TEXTW(stext); - dc.x = m->ww - dc.w; - if(dc.x < x) { - dc.x = x; -_AT_@ -1184,12 +1198,10 @@ - Client *c; - - for(c = m->clients; c; c = c->next) - if(ISVISIBLE(c)) - n++; -- if(n > 0) /* override layout symbol */ -- snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n); - for(c = nexttiled(m->clients); c; c = nexttiled(c->next)) - resize(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * c->bw, False); - } - - void diff --git a/dwm.suckless.org/patches/dwm-5.8.2-statusallmons.diff b/dwm.suckless.org/patches/dwm-5.8.2-statusallmons.diff deleted file mode 100644 index 587035b..0000000 --- a/dwm.suckless.org/patches/dwm-5.8.2-statusallmons.diff +++ /dev/null _AT_@ -1,39 +0,0 @@ ---- ../dwm-5.8.2/dwm.c 2011-03-18 09:51:10.000000000 +0100 -+++ ./dwm.c 2011-03-18 09:52:15.000000000 +0100 -_AT_@ -700,17 +700,13 @@ drawbar(Monitor *m) { - drawtext(m->ltsymbol, dc.norm, False); - dc.x += dc.w; - x = dc.x; -- if(m == selmon) { /* status is only drawn on selected monitor */ -- dc.w = TEXTW(stext); -- dc.x = m->ww - dc.w; -- if(dc.x < x) { -- dc.x = x; -- dc.w = m->ww - x; -- } -- drawtext(stext, dc.norm, False); -+ dc.w = TEXTW(stext); -+ dc.x = m->ww - dc.w; -+ if(dc.x < x) { -+ dc.x = x; -+ dc.w = m->ww - x; - } -- else -- dc.x = m->ww; -+ drawtext(stext, dc.norm, False); - if((dc.w = dc.x - x) > bh) { - dc.x = x; - if(m->sel) { -_AT_@ -1917,9 +1913,11 @@ updatetitle(Client *c) { - - void - updatestatus(void) { -+ Monitor* m; - if(!gettextprop(root, XA_WM_NAME, stext, sizeof(stext))) - strcpy(stext, "dwm-"VERSION); -- drawbar(selmon); -+ for(m = mons; m; m = m->next) -+ drawbar(m); - } - - void diff --git a/dwm.suckless.org/patches/dwm-5.9-combo.diff b/dwm.suckless.org/patches/dwm-5.9-combo.diff deleted file mode 100644 index bf3827b..0000000 --- a/dwm.suckless.org/patches/dwm-5.9-combo.diff +++ /dev/null _AT_@ -1,72 +0,0 @@ -diff -r c361034c5a1c dwm.c ---- a/dwm.c Sat Sep 11 19:00:18 2010 +0000 -+++ b/dwm.c Thu Nov 25 22:54:04 2010 -0800 -_AT_@ -243,6 +243,11 @@ - static int xerrorstart(Display *dpy, XErrorEvent *ee); - static void zoom(const Arg *arg); - -+static void keyrelease(XEvent *e); -+static void combotag(const Arg *arg); -+static void comboview(const Arg *arg); -+ -+ - /* variables */ - static const char broken[] = "broken"; - static char stext[256]; -_AT_@ -253,6 +258,7 @@ - static unsigned int numlockmask = 0; - static void (*handler[LASTEvent]) (XEvent *) = { - [ButtonPress] = buttonpress, -+ [ButtonRelease] = keyrelease, - [ClientMessage] = clientmessage, - [ConfigureRequest] = configurerequest, - [ConfigureNotify] = configurenotify, -_AT_@ -260,6 +266,7 @@ - [EnterNotify] = enternotify, - [Expose] = expose, - [FocusIn] = focusin, -+ [KeyRelease] = keyrelease, - [KeyPress] = keypress, - [MappingNotify] = mappingnotify, - [MapRequest] = maprequest, -_AT_@ -282,6 +289,40 @@ - struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; }; - - /* function implementations */ -+static int combo = 0; -+ -+void -+keyrelease(XEvent *e) { -+ combo = 0; -+} -+ -+void -+combotag(const Arg *arg) { -+ if(selmon->sel && arg->ui & TAGMASK) { -+ if (combo) { -+ selmon->sel->tags |= arg->ui & TAGMASK; -+ } else { -+ combo = 1; -+ selmon->sel->tags = arg->ui & TAGMASK; -+ } -+ arrange(selmon); -+ } -+} -+ -+void -+comboview(const Arg *arg) { -+ unsigned newtags = arg->ui & TAGMASK; -+ if (combo) { -+ selmon->tagset[selmon->seltags] |= newtags; -+ } else { -+ selmon->seltags ^= 1; /*toggle tagset*/ -+ combo = 1; -+ if (newtags) -+ selmon->tagset[selmon->seltags] = newtags; -+ } -+ arrange(selmon); -+} -+ - void - applyrules(Client *c) { - const char *class, *instance; diff --git a/dwm.suckless.org/patches/dwm-5.9-pwkl.diff b/dwm.suckless.org/patches/dwm-5.9-pwkl.diff deleted file mode 100644 index 3d16f0f..0000000 --- a/dwm.suckless.org/patches/dwm-5.9-pwkl.diff +++ /dev/null _AT_@ -1,61 +0,0 @@ -diff -r 406003e3a01f dwm.c ---- a/dwm.c Mon Sep 27 07:53:44 2010 +0000 -+++ b/dwm.c Wed Oct 13 21:16:04 2010 +0300 -_AT_@ -36,6 +36,7 @@ - #include <X11/Xlib.h> - #include <X11/Xproto.h> - #include <X11/Xutil.h> -+#include <X11/XKBlib.h> - #ifdef XINERAMA - #include <X11/extensions/Xinerama.h> - #endif /* XINERAMA */ -_AT_@ -93,6 +94,7 @@ - Client *snext; - Monitor *mon; - Window win; -+ unsigned char kbdgrp; - }; - - typedef struct { -_AT_@ -821,6 +823,7 @@ - selmon = c->mon; - if(c->isurgent) - clearurgent(c); -+ XkbLockGroup (dpy, XkbUseCoreKbd, c->kbdgrp); - detachstack(c); - attachstack(c); - grabbuttons(c, True); -_AT_@ -1092,6 +1095,7 @@ - Client *c, *t = NULL; - Window trans = None; - XWindowChanges wc; -+ XkbStateRec kbd_state; - - if(!(c = malloc(sizeof(Client)))) - die("fatal: could not malloc() %u bytes ", sizeof(Client)); -_AT_@ -1146,6 +1150,8 @@ - XMapWindow(dpy, c->win); - setclientstate(c, NormalState); - arrange(c->mon); -+ XkbGetState (dpy, XkbUseCoreKbd, &kbd_state); -+ c->kbdgrp = kbd_state.group; - } - - void -_AT_@ -1700,12 +1706,16 @@ - - void - unfocus(Client *c, Bool setfocus) { -+ XkbStateRec kbd_state; -+ - if(!c) - return; - grabbuttons(c, False); - XSetWindowBorder(dpy, c->win, dc.norm[ColBorder]); - if(setfocus) - XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); -+ XkbGetState (dpy, XkbUseCoreKbd, &kbd_state); -+ c->kbdgrp = kbd_state.group; - } - - void diff --git a/dwm.suckless.org/patches/dwm-5.9-statuscolors.diff b/dwm.suckless.org/patches/dwm-5.9-statuscolors.diff deleted file mode 100644 index 1c2c3b4..0000000 --- a/dwm.suckless.org/patches/dwm-5.9-statuscolors.diff +++ /dev/null _AT_@ -1,236 +0,0 @@ -diff -up dwm-5.9/config.def.h dwm-5.9-colors/config.def.h ---- dwm-5.9/config.def.h 2011-07-10 16:24:25.000000000 -0400 -+++ dwm-5.9-colors/config.def.h 2011-08-18 02:02:47.033830823 -0400 -_AT_@ -1,13 +1,16 @@ - /* See LICENSE file for copyright and license details. */ - - /* appearance */ -+#define NUMCOLORS 4 // need at least 3 -+static const char colors[NUMCOLORS][ColLast][8] = { -+ // border foreground background -+ { "#cccccc", "#000000", "#cccccc" }, // 0 = normal -+ { "#0066ff", "#ffffff", "#0066ff" }, // 1 = selected -+ { "#0066ff", "#0066ff", "#ffffff" }, // 2 = urgent/warning -+ { "#ff0000", "#ffffff", "#ff0000" }, // 3 = error -+ // add more here -+}; - static const char font[] = "-*-terminus-medium-r-*-*-16-*-*-*-*-*-*-*"; --static const char normbordercolor[] = "#cccccc"; --static const char normbgcolor[] = "#cccccc"; --static const char normfgcolor[] = "#000000"; --static const char selbordercolor[] = "#0066ff"; --static const char selbgcolor[] = "#0066ff"; --static const char selfgcolor[] = "#ffffff"; - static const unsigned int borderpx = 1; /* border pixel of windows */ - static const unsigned int snap = 32; /* snap pixel */ - static const Bool showbar = True; /* False means no bar */ -_AT_@ -45,7 +48,7 @@ static const Layout layouts[] = { - #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } - - /* commands */ --static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL }; -+static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", colors[0][ColBG], "-nf", colors[0][ColFG],"-sb", colors[1][ColBG], "-sf", colors[1][ColFG], NULL }; - static const char *termcmd[] = { "uxterm", NULL }; - - static Key keys[] = { -Only in dwm-5.9: config.h -Only in dwm-5.9: dwm -diff -up dwm-5.9/dwm.c dwm-5.9-colors/dwm.c ---- dwm-5.9/dwm.c 2011-07-10 16:24:25.000000000 -0400 -+++ dwm-5.9-colors/dwm.c 2011-08-18 02:07:20.788935100 -0400 -_AT_@ -48,6 +48,7 @@ - #define LENGTH(X) (sizeof X / sizeof X[0]) - #define MAX(A, B) ((A) > (B) ? (A) : (B)) - #define MIN(A, B) ((A) < (B) ? (A) : (B)) -+#define MAXCOLORS 8 - #define MOUSEMASK (BUTTONMASK|PointerMotionMask) - #define WIDTH(X) ((X)->w + 2 * (X)->bw) - #define HEIGHT(X) ((X)->h + 2 * (X)->bw) -_AT_@ -97,9 +98,8 @@ struct Client { - - typedef struct { - int x, y, w, h; -- unsigned long norm[ColLast]; -- unsigned long sel[ColLast]; -- Drawable drawable; -+ unsigned long colors[MAXCOLORS][ColLast]; -+ Drawable drawable; - GC gc; - struct { - int ascent; -_AT_@ -175,8 +175,9 @@ static void die(const char *errstr, ...) - static Monitor *dirtomon(int dir); - static void drawbar(Monitor *m); - static void drawbars(void); --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 drawcoloredtext(char *text); -+static void drawsquare(Bool filled, Bool empty, unsigned long col[ColLast]); -+static void drawtext(const char *text, unsigned long col[ColLast], Bool pad); - static void enternotify(XEvent *e); - static void expose(XEvent *e); - static void focus(Client *c); -_AT_@ -736,14 +737,13 @@ drawbar(Monitor *m) { - dc.x = 0; - for(i = 0; i < LENGTH(tags); i++) { - dc.w = TEXTW(tags[i]); -- col = m->tagset[m->seltags] & 1 << i ? dc.sel : dc.norm; -- drawtext(tags[i], col, urg & 1 << i); -- drawsquare(m == selmon && selmon->sel && selmon->sel->tags & 1 << i, -- occ & 1 << i, urg & 1 << i, col); -+ col = dc.colors[ (m->tagset[m->seltags] & 1 << i ? 1:(urg & 1 << i ? 2:0))]; -+ drawtext(tags[i], col, True); -+ drawsquare(m == selmon && selmon->sel && selmon->sel->tags & 1 << i, occ & 1 << i, col); - dc.x += dc.w; - } - dc.w = blw = TEXTW(m->ltsymbol); -- drawtext(m->ltsymbol, dc.norm, False); -+ drawtext(m->ltsymbol, dc.colors[0], True); - dc.x += dc.w; - x = dc.x; - if(m == selmon) { /* status is only drawn on selected monitor */ -_AT_@ -753,19 +753,19 @@ drawbar(Monitor *m) { - dc.x = x; - dc.w = m->ww - x; - } -- drawtext(stext, dc.norm, False); -+ drawcoloredtext(stext); - } - 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); -+ col = m == selmon ? dc.colors[1] : dc.colors[0]; -+ drawtext(m->sel->name, col, True); -+ drawsquare(m->sel->isfixed, m->sel->isfloating, col); - } - else -- drawtext(NULL, dc.norm, False); -+ drawtext(NULL, dc.colors[0], False); - } - XCopyArea(dpy, dc.drawable, m->barwin, dc.gc, 0, 0, m->ww, bh, 0, 0); - XSync(dpy, False); -_AT_@ -780,10 +780,39 @@ drawbars(void) { - } - - void --drawsquare(Bool filled, Bool empty, Bool invert, unsigned long col[ColLast]) { -- int x; -+drawcoloredtext(char *text) { -+ Bool first=True; -+ char *buf = text, *ptr = buf, c = 1; -+ unsigned long *col = dc.colors[0]; -+ int i, ox = dc.x; -+ -+ while( *ptr ) { -+ for( i = 0; *ptr < 0 || *ptr > NUMCOLORS; i++, ptr++); -+ if( !*ptr ) break; -+ c=*ptr; -+ *ptr=0; -+ if( i ) { -+ dc.w = selmon->ww - dc.x; -+ drawtext(buf, col, first); -+ dc.x += textnw(buf, i) + textnw(&c,1); -+ if( first ) dc.x += ( dc.font.ascent + dc.font.descent ) / 2; -+ first = False; -+ } else if( first ) { -+ ox = dc.x += textnw(&c,1); -+ } -+ *ptr = c; -+ col = dc.colors[ c-1 ]; -+ buf = ++ptr; -+ } -+ if( !first ) dc.x-=(dc.font.ascent+dc.font.descent)/2; -+ drawtext(buf, col, True); -+ dc.x = ox; -+} - -- XSetForeground(dpy, dc.gc, col[invert ? ColBG : ColFG]); -+void -+drawsquare(Bool filled, Bool empty, unsigned long col[ColLast]) { -+ int x; -+ XSetForeground(dpy, dc.gc, col[ ColFG ]); - x = (dc.font.ascent + dc.font.descent + 2) / 4; - if(filled) - XFillRectangle(dpy, dc.drawable, dc.gc, dc.x+1, dc.y+1, x+1, x+1); -_AT_@ -792,17 +821,17 @@ drawsquare(Bool filled, Bool empty, Bool - } - - void --drawtext(const char *text, unsigned long col[ColLast], Bool invert) { -+drawtext(const char *text, unsigned long col[ColLast], Bool pad) { - char buf[256]; - int i, x, y, h, len, olen; - -- XSetForeground(dpy, dc.gc, col[invert ? ColFG : ColBG]); -+ XSetForeground(dpy, dc.gc, col[ ColBG ]); - XFillRectangle(dpy, dc.drawable, dc.gc, dc.x, dc.y, dc.w, dc.h); - if(!text) - return; - olen = strlen(text); -- h = dc.font.ascent + dc.font.descent; -- y = dc.y + (dc.h / 2) - (h / 2) + dc.font.ascent; -+ h = pad ? (dc.font.ascent + dc.font.descent) : 0; -+ y = dc.y + ((dc.h + dc.font.ascent - dc.font.descent) / 2); - x = dc.x + (h / 2); - /* shorten text if necessary */ - for(len = MIN(olen, sizeof buf); len && textnw(text, len) > dc.w - h; len--); -_AT_@ -811,7 +840,7 @@ drawtext(const char *text, unsigned long - memcpy(buf, text, len); - if(len < olen) - for(i = len; i && i > len - 3; buf[--i] = '.'); -- XSetForeground(dpy, dc.gc, col[invert ? ColBG : ColFG]); -+ XSetForeground(dpy, dc.gc, col[ ColFG ]); - if(dc.font.set) - XmbDrawString(dpy, dc.drawable, dc.font.set, dc.gc, x, y, buf, len); - else -_AT_@ -861,7 +890,7 @@ focus(Client *c) { - detachstack(c); - attachstack(c); - grabbuttons(c, True); -- XSetWindowBorder(dpy, c->win, dc.sel[ColBorder]); -+ XSetWindowBorder(dpy, c->win, dc.colors[1][ColBorder]); - setfocus(c); - } - else -_AT_@ -1137,7 +1166,7 @@ manage(Window w, XWindowAttributes *wa) - } - wc.border_width = c->bw; - XConfigureWindow(dpy, w, CWBorderWidth, &wc); -- XSetWindowBorder(dpy, w, dc.norm[ColBorder]); -+ XSetWindowBorder(dpy, w, dc.colors[0][ColBorder]); - configure(c); /* propagates border_width, if size doesn't change */ - updatesizehints(c); - updatewmhints(c); -_AT_@ -1550,12 +1579,11 @@ setup(void) { - cursor[CurResize] = XCreateFontCursor(dpy, XC_sizing); - cursor[CurMove] = XCreateFontCursor(dpy, XC_fleur); - /* init appearance */ -- dc.norm[ColBorder] = getcolor(normbordercolor); -- dc.norm[ColBG] = getcolor(normbgcolor); -- dc.norm[ColFG] = getcolor(normfgcolor); -- dc.sel[ColBorder] = getcolor(selbordercolor); -- dc.sel[ColBG] = getcolor(selbgcolor); -- dc.sel[ColFG] = getcolor(selfgcolor); -+ for(int i=0; i<NUMCOLORS; i++) { -+ dc.colors[i][ColBorder] = getcolor( colors[i][ColBorder] ); -+ dc.colors[i][ColFG] = getcolor( colors[i][ColFG] ); -+ dc.colors[i][ColBG] = getcolor( colors[i][ColBG] ); -+ } - dc.drawable = XCreatePixmap(dpy, root, DisplayWidth(dpy, screen), bh, DefaultDepth(dpy, screen)); - dc.gc = XCreateGC(dpy, root, 0, NULL); - XSetLineAttributes(dpy, dc.gc, 1, LineSolid, CapButt, JoinMiter); -_AT_@ -1716,7 +1744,7 @@ unfocus(Client *c, Bool setfocus) { - if(!c) - return; - grabbuttons(c, False); -- XSetWindowBorder(dpy, c->win, dc.norm[ColBorder]); -+ XSetWindowBorder(dpy, c->win, dc.colors[0][ColBorder]); - if(setfocus) - XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); - } -Only in dwm-5.9: dwm.o diff --git a/dwm.suckless.org/patches/dwm-5.9-uselessgap.diff b/dwm.suckless.org/patches/dwm-5.9-uselessgap.diff deleted file mode 100644 index 5f2afa9..0000000 --- a/dwm.suckless.org/patches/dwm-5.9-uselessgap.diff +++ /dev/null _AT_@ -1,45 +0,0 @@ -diff -r 23b71491e149 config.def.h ---- a/config.def.h Thu Dec 02 10:16:47 2010 +0000 -+++ b/config.def.h Fri Jan 07 08:50:42 2011 +0100 -_AT_@ -9,6 +9,7 @@ - static const char selbgcolor[] = "#0066ff"; - static const char selfgcolor[] = "#ffffff"; - static const unsigned int borderpx = 1; /* border pixel of windows */ -+static const unsigned int gappx = 6; /* gap pixel between windows */ - static const unsigned int snap = 32; /* snap pixel */ - static const Bool showbar = True; /* False means no bar */ - static const Bool topbar = True; /* False means bottom bar */ -diff -r 23b71491e149 dwm.c ---- a/dwm.c Thu Dec 02 10:16:47 2010 +0000 -+++ b/dwm.c Fri Jan 07 08:50:42 2011 +0100 -_AT_@ -273,6 +273,8 @@ - static DC dc; - static Monitor *mons = NULL, *selmon = NULL; - static Window root; -+static int globalborder ; -+static int globalborder ; - - /* configuration, allows nested code to access above variables */ - #include "config.h" -_AT_@ -1329,11 +1331,17 @@ - void - resizeclient(Client *c, int x, int y, int w, int h) { - XWindowChanges wc; -+ -+ if(c->isfloating || selmon->lt[selmon->sellt]->arrange == NULL) { globalborder = 0 ; } -+ else { -+ if (selmon->lt[selmon->sellt]->arrange == monocle) { globalborder = 0 - borderpx ; } -+ else { globalborder = gappx ; } -+ } - -- c->oldx = c->x; c->x = wc.x = x; -- c->oldy = c->y; c->y = wc.y = y; -- c->oldw = c->w; c->w = wc.width = w; -- c->oldh = c->h; c->h = wc.height = h; -+ c->oldx = c->x; c->x = wc.x = x + globalborder ; -+ c->oldy = c->y; c->y = wc.y = y + globalborder ; -+ c->oldw = c->w; c->w = wc.width = w - 2 * globalborder ; -+ c->oldh = c->h; c->h = wc.height = h - 2 * globalborder ; - wc.border_width = c->bw; - XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc); - configure(c); diff --git a/dwm.suckless.org/patches/dwm-5.9-warp.diff b/dwm.suckless.org/patches/dwm-5.9-warp.diff deleted file mode 100644 index 085806b..0000000 --- a/dwm.suckless.org/patches/dwm-5.9-warp.diff +++ /dev/null _AT_@ -1,55 +0,0 @@ -diff -r cfcfa05033e3 dwm.c ---- a/dwm.c Fri Oct 28 23:45:12 2011 +0100 -+++ b/dwm.c Fri Oct 28 18:43:14 2011 -0700 -_AT_@ -240,6 +240,7 @@ - static void updatetitle(Client *c); - static void updatewmhints(Client *c); - static void view(const Arg *arg); -+static void warp(const Client *c); - static Client *wintoclient(Window w); - static Monitor *wintomon(Window w); - static int xerror(Display *dpy, XErrorEvent *ee); -_AT_@ -898,6 +899,7 @@ - unfocus(selmon->sel, True); - selmon = m; - focus(NULL); -+ warp(selmon->sel); - } - - void -_AT_@ -1418,6 +1420,8 @@ - } - XSync(dpy, False); - while(XCheckMaskEvent(dpy, EnterWindowMask, &ev)); -+ if (m == selmon && (m->tagset[m->seltags] & m->sel->tags)) -+ warp(m->sel); - } - - void -_AT_@ -1994,6 +1998,26 @@ - arrange(selmon); - } - -+void -+warp(const Client *c) { -+ Window dummy; -+ int x, y, di; -+ unsigned int dui; -+ -+ if (!c) { -+ XWarpPointer(dpy, None, root, 0, 0, 0, 0, selmon->wx + selmon->ww / 2, selmon->wy + selmon->wh/2); -+ return; -+ } -+ -+ XQueryPointer(dpy, root, &dummy, &dummy, &x, &y, &di, &di, &dui); -+ -+ if((x > c->x && y > c->y && x < c->x + c->w && y < c->y + c->h) || -+ (y > c->mon->by && y < c->mon->by + bh)) -+ return; -+ -+ XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w / 2, c->h / 2); -+} -+ - Client * - wintoclient(Window w) { - Client *c; diff --git a/dwm.suckless.org/patches/dwm-6.0-attachabove.diff b/dwm.suckless.org/patches/dwm-6.0-attachabove.diff deleted file mode 100644 index 7ee956d..0000000 --- a/dwm.suckless.org/patches/dwm-6.0-attachabove.diff +++ /dev/null _AT_@ -1,63 +0,0 @@ -Author: Jan Christoph Ebersbach <jceb_AT_e-jc.de> -URL: http://dwm.suckless.org/patches/attachabove -attachabove makes new clients attach above the selected client (instead of -always becoming the new master) – basically how Xmonad does it. - -diff -r ec4baab78314 dwm.c ---- a/dwm.c Mon Dec 19 15:38:30 2011 +0100 -+++ b/dwm.c Fri Apr 06 08:23:34 2012 +0200 -_AT_@ -160,6 +160,7 @@ - static void arrange(Monitor *m); - static void arrangemon(Monitor *m); - static void attach(Client *c); -+static void attachabove(Client *c); - static void attachstack(Client *c); - static void buttonpress(XEvent *e); - static void checkotherwm(void); -_AT_@ -418,6 +419,19 @@ - } - - void -+attachabove(Client *c) { -+ if(c->mon->sel == NULL || c->mon->sel == c->mon->clients || c->mon->sel->isfloating) { -+ attach(c); -+ return; -+ } -+ -+ Client *at; -+ for(at = c->mon->clients; at->next != c->mon->sel; at = at->next); -+ c->next = at->next; -+ at->next = c; -+} -+ -+void - attachstack(Client *c) { - c->snext = c->mon->stack; - c->mon->stack = c; -_AT_@ -1155,7 +1169,7 @@ - c->isfloating = c->oldstate = trans != None || c->isfixed; - if(c->isfloating) - XRaiseWindow(dpy, c->win); -- attach(c); -+ attachabove(c); - attachstack(c); - XMoveResizeWindow(dpy, c->win, c->x + 2 * sw, c->y, c->w, c->h); /* some windows require this */ - setclientstate(c, NormalState); -_AT_@ -1480,7 +1494,7 @@ - detachstack(c); - c->mon = m; - c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */ -- attach(c); -+ attachabove(c); - attachstack(c); - focus(NULL); - arrange(NULL); -_AT_@ -1900,7 +1914,7 @@ - m->clients = c->next; - detachstack(c); - c->mon = mons; -- attach(c); -+ attachabove(c); - attachstack(c); - } - if(m == selmon) diff --git a/dwm.suckless.org/patches/dwm-6.0-attachaside.diff b/dwm.suckless.org/patches/dwm-6.0-attachaside.diff deleted file mode 100644 index 352d5ec..0000000 --- a/dwm.suckless.org/patches/dwm-6.0-attachaside.diff +++ /dev/null _AT_@ -1,57 +0,0 @@ -diff --git a/dwm.c b/dwm.c -index 1bbb4b3..b2aa1c8 100644 ---- a/dwm.c -+++ b/dwm.c -_AT_@ -146,6 +146,7 @@ static Bool applysizehints(Client *c, int *x, int *y, int *w, int *h, Bool inter - static void arrange(Monitor *m); - static void arrangemon(Monitor *m); - static void attach(Client *c); -+static void attachaside(Client *c); - static void attachstack(Client *c); - static void buttonpress(XEvent *e); - static void checkotherwm(void); -_AT_@ -401,6 +402,17 @@ attach(Client *c) { - } - - void -+attachaside(Client *c) { -+ Client *at = nexttiled(c->mon->clients); -+ if(c->mon->sel == NULL || c->mon->sel->isfloating || !at) { -+ attach(c); -+ return; -+ } -+ c->next = at->next; -+ at->next = c; -+} -+ -+void - attachstack(Client *c) { - c->snext = c->mon->stack; - c->mon->stack = c; -_AT_@ -1051,7 +1063,7 @@ manage(Window w, XWindowAttributes *wa) { - c->isfloating = c->oldstate = trans != None || c->isfixed; - if(c->isfloating) - XRaiseWindow(dpy, c->win); -- attach(c); -+ attachaside(c); - attachstack(c); - XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32, PropModeAppend, - (unsigned char *) &(c->win), 1); -_AT_@ -1383,7 +1395,7 @@ sendmon(Client *c, Monitor *m) { - detachstack(c); - c->mon = m; - c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */ -- attach(c); -+ attachaside(c); - attachstack(c); - focus(NULL); - arrange(NULL); -_AT_@ -1818,7 +1830,7 @@ updategeom(void) { - m->clients = c->next; - detachstack(c); - c->mon = mons; -- attach(c); -+ attachaside(c); - attachstack(c); - } - if(m == selmon) diff --git a/dwm.suckless.org/patches/dwm-6.0-autoresize.diff b/dwm.suckless.org/patches/dwm-6.0-autoresize.diff deleted file mode 100644 index 4bb3104..0000000 --- a/dwm.suckless.org/patches/dwm-6.0-autoresize.diff +++ /dev/null _AT_@ -1,35 +0,0 @@ -diff --git a/dwm.c b/dwm.c -index e3bf6f4..8a2c646 100644 ---- a/dwm.c -+++ b/dwm.c -_AT_@ -91,7 +91,7 @@ struct Client { - int basew, baseh, incw, inch, maxw, maxh, minw, minh; - int bw, oldbw; - unsigned int tags; -- Bool isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen; -+ Bool isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, needresize; - Client *next; - Client *snext; - Monitor *mon; -_AT_@ -633,6 +633,8 @@ configurerequest(XEvent *e) { - configure(c); - if(ISVISIBLE(c)) - XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h); -+ else -+ c->needresize=1; - } - else - configure(c); -_AT_@ -1663,6 +1665,12 @@ showhide(Client *c) { - return; - if(ISVISIBLE(c)) { /* show clients top down */ - XMoveWindow(dpy, c->win, c->x, c->y); -+ if(c->needresize) { -+ c->needresize=0; -+ XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h); -+ } else { -+ XMoveWindow(dpy, c->win, c->x, c->y); -+ } - if((!c->mon->lt[c->mon->sellt]->arrange || c->isfloating) && !c->isfullscreen) - resize(c, c->x, c->y, c->w, c->h, False); - showhide(c->snext); diff --git a/dwm.suckless.org/patches/dwm-6.0-bottommargin.diff b/dwm.suckless.org/patches/dwm-6.0-bottommargin.diff deleted file mode 100644 index 99ee0b0..0000000 --- a/dwm.suckless.org/patches/dwm-6.0-bottommargin.diff +++ /dev/null _AT_@ -1,26 +0,0 @@ -diff --git a/config.def.h b/config.def.h -index 77ff358..203d354 100644 ---- a/config.def.h -+++ b/config.def.h -_AT_@ -12,6 +12,7 @@ static const unsigned int borderpx = 1; /* border pixel of windows */ - static const unsigned int snap = 32; /* snap pixel */ - static const Bool showbar = True; /* False means no bar */ - static const Bool topbar = True; /* False means bottom bar */ -+static const unsigned int bottommargin = 20; /* Margin at the bottom for another bar */ - - /* tagging */ - static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; -diff --git a/dwm.c b/dwm.c -index 1d78655..cece290 100644 ---- a/dwm.c -+++ b/dwm.c -_AT_@ -1841,6 +1841,9 @@ updatebarpos(Monitor *m) { - m->wh = m->mh; - if(m->showbar) { - m->wh -= bh; -+ m->wh -= marginbottom; -+ if(!m->topbar) -+ m->wy += marginbottom; - m->by = m->topbar ? m->wy : m->wy + m->wh; - m->wy = m->topbar ? m->wy + bh : m->wy; - } diff --git a/dwm.suckless.org/patches/dwm-6.0-combo.diff b/dwm.suckless.org/patches/dwm-6.0-combo.diff deleted file mode 100644 index dfd8b4b..0000000 --- a/dwm.suckless.org/patches/dwm-6.0-combo.diff +++ /dev/null _AT_@ -1,74 +0,0 @@ -diff -r c361034c5a1c dwm.c ---- a/dwm.c Sat Sep 11 19:00:18 2010 +0000 -+++ b/dwm.c Thu Nov 25 22:54:04 2010 -0800 -_AT_@ -243,6 +243,11 @@ - static int xerrorstart(Display *dpy, XErrorEvent *ee); - static void zoom(const Arg *arg); - -+static void keyrelease(XEvent *e); -+static void combotag(const Arg *arg); -+static void comboview(const Arg *arg); -+ -+ - /* variables */ - static const char broken[] = "broken"; - static char stext[256]; -_AT_@ -253,6 +258,7 @@ - static unsigned int numlockmask = 0; - static void (*handler[LASTEvent]) (XEvent *) = { - [ButtonPress] = buttonpress, -+ [ButtonRelease] = keyrelease, - [ClientMessage] = clientmessage, - [ConfigureRequest] = configurerequest, - [ConfigureNotify] = configurenotify, -_AT_@ -260,6 +266,7 @@ - [EnterNotify] = enternotify, - [Expose] = expose, - [FocusIn] = focusin, -+ [KeyRelease] = keyrelease, - [KeyPress] = keypress, - [MappingNotify] = mappingnotify, - [MapRequest] = maprequest, -_AT_@ -282,6 +289,42 @@ - struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; }; - - /* function implementations */ -+static int combo = 0; -+ -+void -+keyrelease(XEvent *e) { -+ combo = 0; -+} -+ -+void -+combotag(const Arg *arg) { -+ if(selmon->sel && arg->ui & TAGMASK) { -+ if (combo) { -+ selmon->sel->tags |= arg->ui & TAGMASK; -+ } else { -+ combo = 1; -+ selmon->sel->tags = arg->ui & TAGMASK; -+ } -+ focus(NULL); -+ arrange(selmon); -+ } -+} -+ -+void -+comboview(const Arg *arg) { -+ unsigned newtags = arg->ui & TAGMASK; -+ if (combo) { -+ selmon->tagset[selmon->seltags] |= newtags; -+ } else { -+ selmon->seltags ^= 1; /*toggle tagset*/ -+ combo = 1; -+ if (newtags) -+ selmon->tagset[selmon->seltags] = newtags; -+ } -+ focus(NULL); -+ arrange(selmon); -+} -+ - void - applyrules(Client *c) { - const char *class, *instance; diff --git a/dwm.suckless.org/patches/dwm-6.0-dualstatus.diff b/dwm.suckless.org/patches/dwm-6.0-dualstatus.diff deleted file mode 100644 index bc140fe..0000000 --- a/dwm.suckless.org/patches/dwm-6.0-dualstatus.diff +++ /dev/null _AT_@ -1,158 +0,0 @@ -diff --git a/config.def.h b/config.def.h -index 77ff358..ea9758d 100644 ---- a/config.def.h -+++ b/config.def.h -_AT_@ -12,6 +12,7 @@ static const unsigned int borderpx = 1; /* border pixel of windows */ - static const unsigned int snap = 32; /* snap pixel */ - static const Bool showbar = True; /* False means no bar */ - static const Bool topbar = True; /* False means bottom bar */ -+static const Bool extrabar = True; /* False means no extra bar */ - - /* tagging */ - static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; -_AT_@ -54,6 +55,7 @@ static Key keys[] = { - { MODKEY, XK_p, spawn, {.v = dmenucmd } }, - { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, - { MODKEY, XK_b, togglebar, {0} }, -+ { MODKEY, XK_b, toggleextrabar, {0} }, - { MODKEY, XK_j, focusstack, {.i = +1 } }, - { MODKEY, XK_k, focusstack, {.i = -1 } }, - { MODKEY, XK_i, incnmaster, {.i = +1 } }, -diff --git a/dwm.c b/dwm.c -index 1d78655..b322ff5 100644 ---- a/dwm.c -+++ b/dwm.c -_AT_@ -154,6 +154,13 @@ typedef struct { - int monitor; - } Rule; - -+typedef struct { -+ int y; -+ Bool show; -+ Window win; -+ char text[256]; -+} Bar; -+ - /* function declarations */ - static void applyrules(Client *c); - static Bool applysizehints(Client *c, int *x, int *y, int *w, int *h, Bool interact); -_AT_@ -229,6 +236,7 @@ static void tagmon(const Arg *arg); - static int textnw(const char *text, unsigned int len); - static void tile(Monitor *); - static void togglebar(const Arg *arg); -+static void toggleextrabar(const Arg *arg); - static void togglefloating(const Arg *arg); - static void toggletag(const Arg *arg); - static void toggleview(const Arg *arg); -_AT_@ -283,6 +291,7 @@ static Display *dpy; - static DC dc; - static Monitor *mons = NULL, *selmon = NULL; - static Window root; -+static Bar eb; - - /* configuration, allows nested code to access above variables */ - #include "config.h" -_AT_@ -495,6 +504,8 @@ cleanup(void) { - XFreeCursor(dpy, cursor[CurNormal]); - XFreeCursor(dpy, cursor[CurResize]); - XFreeCursor(dpy, cursor[CurMove]); -+ XUnmapWindow(dpy, eb.win); -+ XDestroyWindow(dpy, eb.win); - while(mons) - cleanupmon(mons); - XSync(dpy, False); -_AT_@ -584,6 +595,7 @@ configurenotify(XEvent *e) { - updatebars(); - for(m = mons; m; m = m->next) - XMoveResizeWindow(dpy, m->barwin, m->wx, m->by, m->ww, bh); -+ XMoveResizeWindow(dpy, eb.win, mons->wx, eb.y, mons->ww, bh); - focus(NULL); - arrange(NULL); - } -_AT_@ -762,6 +774,10 @@ drawbar(Monitor *m) { - drawtext(NULL, dc.norm, False); - } - XCopyArea(dpy, dc.drawable, m->barwin, dc.gc, 0, 0, m->ww, bh, 0, 0); -+ dc.x = 0; -+ dc.w = m->ww; -+ drawtext(eb.text, dc.norm, False); -+ XCopyArea(dpy, dc.drawable, eb.win, dc.gc, 0, 0, m->ww, bh, 0, 0); - XSync(dpy, False); - } - -_AT_@ -1594,6 +1610,7 @@ setup(void) { - sw = DisplayWidth(dpy, screen); - sh = DisplayHeight(dpy, screen); - bh = dc.h = dc.font.height + 2; -+ eb.show = extrabar; - updategeom(); - /* init atoms */ - wmatom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False); -_AT_@ -1736,6 +1753,16 @@ togglebar(const Arg *arg) { - } - - void -+toggleextrabar(const Arg *arg) { -+ if(selmon == mons) { -+ eb.show = !eb.show; -+ updatebarpos(selmon); -+ XMoveResizeWindow(dpy, eb.win, selmon->wx, eb.y, selmon->ww, bh); -+ arrange(selmon); -+ } -+} -+ -+void - togglefloating(const Arg *arg) { - if(!selmon->sel) - return; -_AT_@ -1833,6 +1860,13 @@ updatebars(void) { - XDefineCursor(dpy, m->barwin, cursor[CurNormal]); - XMapRaised(dpy, m->barwin); - } -+ if(!eb.win) { -+ eb.win = XCreateWindow(dpy, root, mons->wx, eb.y, mons->ww, bh, 0, DefaultDepth(dpy, screen), -+ CopyFromParent, DefaultVisual(dpy, screen), -+ CWOverrideRedirect|CWBackPixmap|CWEventMask, &wa); -+ XDefineCursor(dpy, eb.win, cursor[CurNormal]); -+ XMapRaised(dpy, eb.win); -+ } - } - - void -_AT_@ -1846,6 +1880,13 @@ updatebarpos(Monitor *m) { - } - else - m->by = -bh; -+ if(m == mons && eb.show) { -+ m->wh -= bh; -+ eb.y = topbar ? m->wy + m->wh : m->wy; -+ m->wy = m->topbar ? m->wy : m->wy + bh; -+ } -+ else -+ eb.y = -bh; - } - - Bool -_AT_@ -2005,8 +2046,21 @@ updatetitle(Client *c) { - - void - updatestatus(void) { -- if(!gettextprop(root, XA_WM_NAME, stext, sizeof(stext))) -+ char text[512]; -+ if(!gettextprop(root, XA_WM_NAME, text, sizeof(text))) { - strcpy(stext, "dwm-"VERSION); -+ eb.text[0] = 'Received on Fri Jul 08 2016 - 22:59:49 CEST
This archive was generated by hypermail 2.3.0 : Fri Jul 08 2016 - 23:00:19 CEST