sites

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

commit 82a1782238d4e3318dc15e89ae67d856e19e1c16
parent 006aac6196c1691a03eddcaf6dc750af39816c5a
Author: Christoph Lohmann <20h@r-36.net>
Date:   Sun, 30 Oct 2011 11:22:07 +0100

Merging my mistakes.
Diffstat:
Adwm.suckless.org/patches/columns.md | 17+++++++++++++++++
Adwm.suckless.org/patches/dwm-5.9-warp.diff | 55+++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/dwm-r1578-pertag.diff | 189+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/dwm-r1580-col.diff | 60++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mdwm.suckless.org/patches/pertag.md | 3+++
Mdwm.suckless.org/patches/warp.md | 7++++---
Atools.suckless.org/dmenu/patches/dmenu-4.4.1-multisel.diff | 60++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Atools.suckless.org/dmenu/patches/multisel.md | 12++++++++++++
8 files changed, 400 insertions(+), 3 deletions(-)

diff --git a/dwm.suckless.org/patches/columns.md b/dwm.suckless.org/patches/columns.md @@ -0,0 +1,17 @@ +COLUMNS +======= + +Description +----------- +This patch adds an extra layout to dwm called `col` in which the windows are +arranged in colums of equal size. The number of columns is always nmaster + 1, +and the last column is a stack of leftover windows just like the normal tile +layout. + +Download +-------- +* [dwm-r1580-col.diff](dwm-r1580-col.diff) + +Author +------ +* Evan Gates (emg)<evan.gates@gmail.com> diff --git a/dwm.suckless.org/patches/dwm-5.9-warp.diff b/dwm.suckless.org/patches/dwm-5.9-warp.diff @@ -0,0 +1,55 @@ +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 +@@ -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); +@@ -898,6 +899,7 @@ + unfocus(selmon->sel, True); + selmon = m; + focus(NULL); ++ warp(selmon->sel); + } + + void +@@ -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 +@@ -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-r1578-pertag.diff b/dwm.suckless.org/patches/dwm-r1578-pertag.diff @@ -0,0 +1,189 @@ +diff --git a/dwm.c b/dwm.c +--- a/dwm.c ++++ b/dwm.c +@@ -122,27 +122,6 @@ + void (*arrange)(Monitor *); + } Layout; + +-struct Monitor { +- char ltsymbol[16]; +- float mfact; +- int nmaster; +- int num; +- int by; /* bar geometry */ +- int mx, my, mw, mh; /* screen size */ +- int wx, wy, ww, wh; /* window area */ +- unsigned int seltags; +- unsigned int sellt; +- unsigned int tagset[2]; +- Bool showbar; +- Bool topbar; +- Client *clients; +- Client *sel; +- Client *stack; +- Monitor *next; +- Window barwin; +- const Layout *lt[2]; +-}; +- + typedef struct { + const char *class; + const char *instance; +@@ -281,6 +260,33 @@ + /* configuration, allows nested code to access above variables */ + #include "config.h" + ++struct Monitor { ++ char ltsymbol[16]; ++ float mfact; ++ int nmaster; ++ int num; ++ int by; /* bar geometry */ ++ int mx, my, mw, mh; /* screen size */ ++ int wx, wy, ww, wh; /* window area */ ++ unsigned int seltags; ++ unsigned int sellt; ++ unsigned int tagset[2]; ++ Bool showbar; ++ Bool topbar; ++ Client *clients; ++ Client *sel; ++ Client *stack; ++ Monitor *next; ++ Window barwin; ++ const Layout *lt[2]; ++ int curtag; ++ int prevtag; ++ const Layout *lts[LENGTH(tags) + 1]; ++ float mfacts[LENGTH(tags) + 1]; ++ int nmasters[LENGTH(tags) + 1]; ++ Bool showbars[LENGTH(tags) + 1]; ++}; ++ + /* compile-time check if all tags fit into an unsigned int bit array. */ + struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; }; + +@@ -661,6 +667,7 @@ + Monitor * + createmon(void) { + Monitor *m; ++ unsigned int i; + + if(!(m = (Monitor *)calloc(1, sizeof(Monitor)))) + die("fatal: could not malloc() %u bytes\n", sizeof(Monitor)); +@@ -672,6 +679,16 @@ + m->lt[0] = &layouts[0]; + m->lt[1] = &layouts[1 % LENGTH(layouts)]; + strncpy(m->ltsymbol, layouts[0].symbol, sizeof m->ltsymbol); ++ ++ /* pertag init */ ++ m->curtag = m->prevtag = 1; ++ for(i=0; i < LENGTH(tags) + 1 ; i++) { ++ m->mfacts[i] = mfact; ++ m->nmasters[i] = nmaster; ++ m->lts[i] = &layouts[0]; ++ m->showbars[i] = m->showbar; ++ } ++ + return m; + } + +@@ -1028,7 +1045,8 @@ + + void + incnmaster(const Arg *arg) { +- selmon->nmaster = MAX(selmon->nmaster + arg->i, 1); ++ selmon->nmasters[selmon->curtag] = MAX(selmon->nmaster + arg->i, 1); ++ selmon->nmaster = selmon->nmasters[selmon->curtag]; + arrange(selmon); + } + +@@ -1515,7 +1533,7 @@ + if(!arg || !arg->v || arg->v != selmon->lt[selmon->sellt]) + selmon->sellt ^= 1; + if(arg && arg->v) +- selmon->lt[selmon->sellt] = (Layout *)arg->v; ++ selmon->lt[selmon->sellt] = selmon->lts[selmon->curtag] = (Layout *)arg->v; + strncpy(selmon->ltsymbol, selmon->lt[selmon->sellt]->symbol, sizeof selmon->ltsymbol); + if(selmon->sel) + arrange(selmon); +@@ -1533,7 +1551,7 @@ + f = arg->f < 1.0 ? arg->f + selmon->mfact : arg->f - 1.0; + if(f < 0.1 || f > 0.9) + return; +- selmon->mfact = f; ++ selmon->mfact = selmon->mfacts[selmon->curtag] = f; + arrange(selmon); + } + +@@ -1680,7 +1698,7 @@ + + void + togglebar(const Arg *arg) { +- selmon->showbar = !selmon->showbar; ++ selmon->showbar = selmon->showbars[selmon->curtag] = !selmon->showbar; + updatebarpos(selmon); + XMoveResizeWindow(dpy, selmon->barwin, selmon->wx, selmon->by, selmon->ww, bh); + arrange(selmon); +@@ -1699,13 +1717,28 @@ + + void + toggletag(const Arg *arg) { +- unsigned int newtags; ++ unsigned int i, newtags; + + if(!selmon->sel) + return; + newtags = selmon->sel->tags ^ (arg->ui & TAGMASK); + if(newtags) { + selmon->sel->tags = newtags; ++ if(newtags == ~0) { ++ selmon->prevtag = selmon->curtag; ++ selmon->curtag = 0; ++ } ++ if(!(newtags & 1 << (selmon->curtag - 1))) { ++ selmon->prevtag = selmon->curtag; ++ for (i=0; !(newtags & 1 << i); i++); ++ selmon->curtag = i + 1; ++ } ++ selmon->sel->tags = newtags; ++ selmon->lt[selmon->sellt] = selmon->lts[selmon->curtag]; ++ selmon->mfact = selmon->mfacts[selmon->curtag]; ++ selmon->nmaster = selmon->nmasters[selmon->curtag]; ++ if (selmon->showbar != selmon->showbars[selmon->curtag]) ++ togglebar(NULL); + focus(NULL); + arrange(selmon); + } +@@ -1982,11 +2015,30 @@ + + void + view(const Arg *arg) { ++ unsigned int i; ++ + if((arg->ui & TAGMASK) == selmon->tagset[selmon->seltags]) + return; + selmon->seltags ^= 1; /* toggle sel tagset */ +- if(arg->ui & TAGMASK) ++ if(arg->ui & TAGMASK) { + selmon->tagset[selmon->seltags] = arg->ui & TAGMASK; ++ selmon->prevtag = selmon->curtag; ++ if(arg->ui == ~0) ++ selmon->curtag = 0; ++ else { ++ for (i=0; !(arg->ui & 1 << i); i++); ++ selmon->curtag = i + 1; ++ } ++ } else { ++ selmon->prevtag= selmon->curtag ^ selmon->prevtag; ++ selmon->curtag^= selmon->prevtag; ++ selmon->prevtag= selmon->curtag ^ selmon->prevtag; ++ } ++ selmon->lt[selmon->sellt]= selmon->lts[selmon->curtag]; ++ selmon->mfact = selmon->mfacts[selmon->curtag]; ++ selmon->nmaster = selmon->nmasters[selmon->curtag]; ++ if(selmon->showbar != selmon->showbars[selmon->curtag]) ++ togglebar(NULL); + focus(NULL); + arrange(selmon); + } diff --git a/dwm.suckless.org/patches/dwm-r1580-col.diff b/dwm.suckless.org/patches/dwm-r1580-col.diff @@ -0,0 +1,60 @@ +diff -r cfcfa05033e3 config.def.h +--- a/config.def.h Fri Oct 28 23:45:12 2011 +0100 ++++ b/config.def.h Fri Oct 28 18:57:59 2011 -0700 +@@ -32,6 +32,7 @@ + { "[]=", tile }, /* first entry is default */ + { "><>", NULL }, /* no layout function means floating behavior */ + { "[M]", monocle }, ++ { "|||", col }, + }; + + /* key definitions */ +@@ -66,6 +67,7 @@ + { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, + { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, + { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, ++ { MODKEY, XK_c, setlayout, {.v = &layouts[3]} }, + { MODKEY, XK_space, setlayout, {0} }, + { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, + { MODKEY, XK_0, view, {.ui = ~0 } }, +diff -r cfcfa05033e3 dwm.c +--- a/dwm.c Fri Oct 28 23:45:12 2011 +0100 ++++ b/dwm.c Fri Oct 28 18:57:59 2011 -0700 +@@ -165,6 +165,7 @@ + static void cleanupmon(Monitor *mon); + static void clearurgent(Client *c); + static void clientmessage(XEvent *e); ++static void col(Monitor *); + static void configure(Client *c); + static void configurenotify(XEvent *e); + static void configurerequest(XEvent *e); +@@ -1658,6 +1659,29 @@ + } + + void ++col(Monitor *m) { ++ unsigned int i, n, h, w, x, y; ++ Client *c; ++ ++ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); ++ if(n == 0) ++ return; ++ ++ for(i = x = y = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) { ++ if(i < m->nmaster) { ++ w = (m->ww - x) / (MIN(n, m->nmaster) + (n > m->nmaster) - i); ++ resize(c, x + m->wx, m->wy, w - (2*c->bw), m->wh - (2*c->bw), False); ++ x += WIDTH(c); ++ } ++ else { ++ h = (m->wh - y) / (n - i); ++ resize(c, x + m->wx, m->wy + y, m->ww - x - (2*c->bw), h - (2*c->bw), False); ++ y += HEIGHT(c); ++ } ++ } ++} ++ ++void + tile(Monitor *m) { + unsigned int i, n, h, mw, my, ty; + Client *c; diff --git a/dwm.suckless.org/patches/pertag.md b/dwm.suckless.org/patches/pertag.md @@ -8,6 +8,7 @@ mwfact, barpos and nmaster (if installed) per tag. Download -------- +* [dwm-r1578-pertag.diff][12] (nmaster included in mainline) * [dwm-5.8.2-pertag\_without\_bar.diff][11] * [dwm-5.8.2-pertag.diff][10] * [dwm-5.7.2-pertag.diff][9] @@ -26,6 +27,7 @@ Authors * Updated by Jerome Andrieux - `<jerome at gcu dot info>` * Updated by Sidney Amani - `<seed at uffs dot org>` * Updated by William Light - `<wrl at illest dot net>` +* Updated by termac - `<terror.macbeth.I at gmail dot com>` [1]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-pertag.diff [2]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-pertag_nmaster.diff @@ -38,3 +40,4 @@ Authors [9]: historical/dwm-5.7.2-pertag.diff [10]: dwm-5.8.2-pertag.diff [11]: dwm-5.8.2-pertag_without_bar.diff +[12]: dwm-r1578-pertag.diff diff --git a/dwm.suckless.org/patches/warp.md b/dwm.suckless.org/patches/warp.md @@ -5,20 +5,21 @@ Description ----------- This patch warps the mouse cursor each time another window gets focused to the -middle of the window. It was shamelessly copied by me from dwm-gtx 5.2 without -any modifications except those to make it work on newer vanilla-dwm. +middle of the window. Download -------- +* [dwm-5.9-warp.diff](dwm-5.9-warp.diff) (1.3k) (20111028) * [dwm-r1525-warp.diff](dwm-r1525-warp.diff) (2.3k) (20100911) Author ------ +* Evan Gates (emg)<evan.gates@gmail.com> * Enno Boland (Gottox) Contributor ----------- -* Moritz Wilhelmy (n0nsense) `<`moritz plus dwm at wzff dot de`>` - did the port to newer dwm +* Moritz Wilhelmy (n0nsense) `<`moritz plus dwm at wzff dot de`>` - did the port to r1525 diff --git a/tools.suckless.org/dmenu/patches/dmenu-4.4.1-multisel.diff b/tools.suckless.org/dmenu/patches/dmenu-4.4.1-multisel.diff @@ -0,0 +1,60 @@ +diff -r bebcf140b8a9 dmenu.1 +--- a/dmenu.1 Wed Oct 26 14:16:12 2011 +0100 ++++ b/dmenu.1 Thu Oct 27 12:56:43 2011 -0700 +@@ -85,2 +85,5 @@ + .TP ++.B Ctrl-Return ++Confirm selection. Prints the selected item to stdout and continues. ++.TP + .B Shift\-Return (Ctrl\-Shift\-j) +diff -r bebcf140b8a9 dmenu.c +--- a/dmenu.c Wed Oct 26 14:16:12 2011 +0100 ++++ b/dmenu.c Thu Oct 27 12:56:43 2011 -0700 +@@ -24,2 +24,3 @@ + Item *left, *right; ++ Bool out; + }; +@@ -51,2 +52,4 @@ + static const char *selfgcolor = "#ffffff"; ++static const char *outbgcolor = "#00ffff"; ++static const char *outfgcolor = "#000000"; + static unsigned int lines = 0; +@@ -54,2 +57,3 @@ + static unsigned long selcol[ColLast]; ++static unsigned long outcol[ColLast]; + static Atom clip, utf8; +@@ -187,3 +191,4 @@ + dc->y += dc->h; +- drawtext(dc, item->text, (item == sel) ? selcol : normcol); ++ drawtext(dc, item->text, (item == sel) ? selcol : ++ (item->out) ? outcol : normcol); + } +@@ -199,3 +204,4 @@ + dc->w = MIN(textw(dc, item->text), mw - dc->x - textw(dc, ">")); +- drawtext(dc, item->text, (item == sel) ? selcol : normcol); ++ drawtext(dc, item->text, (item == sel) ? selcol : ++ (item->out) ? outcol : normcol); + } +@@ -280,2 +286,5 @@ + return; ++ case XK_Return: ++ case XK_KP_Enter: ++ break; + default: +@@ -352,3 +361,6 @@ + puts((sel && !(ev->state & ShiftMask)) ? sel->text : text); +- exit(EXIT_SUCCESS); ++ if(!(ev->state & ControlMask)) ++ exit(EXIT_SUCCESS); ++ sel->out = True; ++ break; + case XK_Right: +@@ -468,2 +480,3 @@ + eprintf("cannot strdup %u bytes:", strlen(buf)+1); ++ items[i].out = False; + if(strlen(items[i].text) > max) +@@ -519,2 +532,4 @@ + selcol[ColFG] = getcolor(dc, selfgcolor); ++ outcol[ColBG] = getcolor(dc, outbgcolor); ++ outcol[ColFG] = getcolor(dc, outfgcolor); + diff --git a/tools.suckless.org/dmenu/patches/multisel.md b/tools.suckless.org/dmenu/patches/multisel.md @@ -0,0 +1,12 @@ +MULTISELECT +=========== + +Allow for selecting multiple items. Ctrl+Enter prints an item, colors it differently, and allows input to continue. + +Download +-------- +* [dmenu-4.4.1-multisel.diff](dmenu-4.4.1-multisel.diff) + +Author +------ +* Evan Gates (emg)<evan.gates@gmail.com>