sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

commit 609f4c769a2e970b633377c98ebc883c7cc2901a
parent 4110f128fa0c2b0a5d074b400ce21c11c53579b3
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sat, 30 Mar 2019 12:43:05 +0100

remove some (old) broken and corrupt patches

Diffstat:
Ddwm.suckless.org/patches/fancybarclickable/dwm-fancybarclickable-6.1.diff | 260-------------------------------------------------------------------------------
Ddwm.suckless.org/patches/fancybarclickable/fancybarclickable.png | 0
Ddwm.suckless.org/patches/fancybarclickable/index.md | 21---------------------
Ddwm.suckless.org/patches/runorraise/dwm-6.1-runorraise.diff | 41-----------------------------------------
Ddwm.suckless.org/patches/runorraise/index.md | 34----------------------------------
Ddwm.suckless.org/patches/uselessgap/dwm-gap-5.7.2.diff | 23-----------------------
Mdwm.suckless.org/patches/uselessgap/index.md | 1-
Ddwm.suckless.org/patches/winview/dwm-6.1-winview.diff | 0
Mdwm.suckless.org/patches/winview/index.md | 1-
9 files changed, 0 insertions(+), 381 deletions(-)

diff --git a/dwm.suckless.org/patches/fancybarclickable/dwm-fancybarclickable-6.1.diff b/dwm.suckless.org/patches/fancybarclickable/dwm-fancybarclickable-6.1.diff @@ -1,260 +0,0 @@ -diff --git a/config.def.h b/config.def.h -index 875885b..05865bb 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -97,6 +97,7 @@ static Button buttons[] = { - /* click event mask button function argument */ - { ClkLtSymbol, 0, Button1, setlayout, {0} }, - { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} }, -+ { ClkWinTitle, 0, Button1, focusonclick, {0} }, - { ClkWinTitle, 0, Button2, zoom, {0} }, - { ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, - { ClkClientWin, MODKEY, Button1, movemouse, {0} }, -diff --git a/dwm.c b/dwm.c -index f896170..cc2a4f2 100644 ---- a/dwm.c -+++ b/dwm.c -@@ -129,6 +129,8 @@ struct Monitor { - Monitor *next; - Window barwin; - const Layout *lt[2]; -+ int titlebarbegin; -+ int titlebarend; - }; - - typedef struct { -@@ -163,9 +165,11 @@ static void detachstack(Client *c); - static Monitor *dirtomon(int dir); - static void drawbar(Monitor *m); - static void drawbars(void); -+static void drawline(int x, int y); - static void enternotify(XEvent *e); - static void expose(XEvent *e); - static void focus(Client *c); -+static void focusonclick(const Arg *arg); - static void focusin(XEvent *e); - static void focusmon(const Arg *arg); - static void focusstack(const Arg *arg); -@@ -432,10 +436,12 @@ buttonpress(XEvent *e) { - } - else if(ev->x < x + blw) - click = ClkLtSymbol; -- else if(ev->x > selmon->ww - TEXTW(stext)) -+ else if(ev->x > selmon->titlebarend) - click = ClkStatusText; -- else -+ else { -+ arg.ui = ev->x; - click = ClkWinTitle; -+ } - } - else if((c = wintoclient(ev->window))) { - focus(c); -@@ -444,7 +450,7 @@ buttonpress(XEvent *e) { - for(i = 0; i < LENGTH(buttons); i++) - if(click == buttons[i].click && buttons[i].func && buttons[i].button == ev->button - && CLEANMASK(buttons[i].mask) == CLEANMASK(ev->state)) -- buttons[i].func(click == ClkTagBar && buttons[i].arg.i == 0 ? &arg : &buttons[i].arg); -+ buttons[i].func((click == ClkTagBar || click == ClkWinTitle) && buttons[i].arg.i == 0 ? &arg : &buttons[i].arg); - } - - void -@@ -692,11 +698,14 @@ dirtomon(int dir) { - - void - drawbar(Monitor *m) { -- int x, xx, w; -- unsigned int i, occ = 0, urg = 0; -- Client *c; -+ int x, xx, w, ow, mw = 0, extra, tw, a = 0, s = 0; -+ char posbuf[10]; -+ unsigned int i, occ = 0, urg = 0, n = 0; -+ Client *c, *firstvis, *lastvis = NULL; - - for(c = m->clients; c; c = c->next) { -+ if(ISVISIBLE(c)) -+ n++; - occ |= c->tags; - if(c->isurgent) - urg |= c->tags; -@@ -716,32 +725,109 @@ drawbar(Monitor *m) { - x += w; - xx = x; - if(m == selmon) { /* status is only drawn on selected monitor */ -- w = TEXTW(stext); -+ if(m->lt[m->sellt]->arrange == monocle){ -+ x = xx; -+ 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); -+ w = TEXTW(posbuf); -+ drw_text(drw, x, 0, w, bh, posbuf, 0); -+ xx = x + w; -+ } -+ -+ /* char *buf = stext, *ptr = buf; -+ while (*ptr) { -+ for (i = 0; *ptr < 0; i++, ptr++); -+ w 2+= drw_font_getexts_width(drw->font, buf, i); -+ w += TEXTW(buf); -+ buf=++ptr; -+ } */ -+ w = TEXTW(stext); -+ - x = m->ww - w; - if(x < xx) { - x = xx; - w = m->ww - xx; - } -+ m->titlebarend=x; - drw_text(drw, x, 0, w, bh, stext, 0); - } -- else -+ else { - x = m->ww; -- if((w = x - xx) > bh) { -- x = xx; -- if(m->sel) { -- drw_setscheme(drw, m == selmon ? &scheme[SchemeSel] : &scheme[SchemeNorm]); -- drw_text(drw, x, 0, w, bh, m->sel->name, 0); -- drw_rect(drw, x, 0, w, bh, m->sel->isfixed, m->sel->isfloating, 0); -- } -- else { -+ m->titlebarbegin=x; -+ } -+ for(c = m->clients; c && !ISVISIBLE(c); c = c->next); -+ firstvis = c; -+ -+ drw_setscheme(drw, m == selmon ? &scheme[SchemeSel] : &scheme[SchemeNorm]); -+ w = x - xx; -+ x = xx; -+ -+ if(n > 0) { -+ mw = w / n; -+ extra = 0; -+ 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); -+ } -+ -+ if(i > 0) mw += extra / i; -+ -+ c = firstvis; -+ xx = x; -+ } -+ m->titlebarbegin=x; -+ while(w > bh) { -+ if(c) { -+ ow = w; -+ tw = TEXTW(c->name); -+ w = MIN(ow, tw); -+ -+ if(w > mw) w = mw; -+ if(c == lastvis) w = ow; -+ -+ drw_text(drw, x, 0, w, bh, c->name, False); -+ if(c != firstvis) drawline(x, 0); -+ drw_rect(drw, x, 0, w, bh, m->sel->isfixed, m->sel->isfloating, True); -+ -+ x += w; -+ w = ow - w; -+ for(c = c->next; c && !ISVISIBLE(c); c = c->next); -+ } else { - drw_setscheme(drw, &scheme[SchemeNorm]); - drw_text(drw, x, 0, w, bh, NULL, 0); -+ break; - } - } -+ -+ if(m == selmon && m->sel && ISVISIBLE(m->sel)) { -+ drw_text(drw, x, 0, w, bh, m->sel->name, True); -+ drw_rect(drw, x, 0, w, bh, m->sel->isfixed, m->sel->isfloating, True); -+ } -+ - drw_map(drw, m->barwin, 0, 0, m->ww, bh); - } - - void -+drawline(int x, int y) { -+ XGCValues gcv; -+ -+ gcv.foreground = drw->scheme->fg->rgb; -+ -+ XChangeGC(dpy, drw->gc, GCForeground, &gcv); -+ XDrawLine(dpy, drw->drawable, drw->gc, x, y, x, y + (drw->font->ascent + drw->font->descent + 2)); -+} -+ -+void - drawbars(void) { - Monitor *m; - -@@ -804,6 +890,51 @@ focus(Client *c) { - } - - void -+focusonclick(const Arg *arg) { -+ int x, w, mw = 0, tw, n = 0, i = 0, extra = 0; -+ Monitor *m = selmon; -+ Client *c, *firstvis; -+ -+ for(c = m->clients; c && !ISVISIBLE(c); c = c->next); -+ firstvis = c; -+ -+ for(c = m->clients; c; c = c->next) -+ if (ISVISIBLE(c)) -+ n++; -+ -+ if(n > 0) { -+ mw = (m->titlebarend - m->titlebarbegin) / n; -+ c = firstvis; -+ while(c) { -+ tw = TEXTW(c->name); -+ if(tw < mw) extra += (mw - tw); else i++; -+ for(c = c->next; c && !ISVISIBLE(c); c = c->next); -+ } -+ if(i > 0) mw += extra / i; -+ } -+ -+ x=m->titlebarbegin; -+ -+ c = firstvis; -+ while(x < m->titlebarend) { -+ if(c) { -+ w=MIN(TEXTW(c->name), mw); -+ if (x < arg->i && x+w > arg->i) { -+ focus(c); -+ restack(selmon); -+ break; -+ } else { -+ x+=w; -+ } -+ -+ for(c = c->next; c && !ISVISIBLE(c); c = c->next); -+ } else { -+ break; -+ } -+ } -+} -+ -+void - focusin(XEvent *e) { /* there are some broken focus acquiring clients */ - XFocusChangeEvent *ev = &e->xfocus; - -@@ -1221,8 +1352,7 @@ propertynotify(XEvent *e) { - } - if(ev->atom == XA_WM_NAME || ev->atom == netatom[NetWMName]) { - updatetitle(c); -- if(c == c->mon->sel) -- drawbar(c->mon); -+ drawbar(c->mon); - } - if(ev->atom == netatom[NetWMWindowType]) - updatewindowtype(c); diff --git a/dwm.suckless.org/patches/fancybarclickable/fancybarclickable.png b/dwm.suckless.org/patches/fancybarclickable/fancybarclickable.png Binary files differ. diff --git a/dwm.suckless.org/patches/fancybarclickable/index.md b/dwm.suckless.org/patches/fancybarclickable/index.md @@ -1,21 +0,0 @@ -fancybarclickable -================= - -Description ------------ -`fancybarclickable` is basically fancycoloredbarclickable minus the -[statuscolors](../statuscolors/). It uses the dwm bar to show you the titles of -all the windows in the current tag and lets you select windows by selecting -their title in the dwm bar. - -[![Screenshot](fancybarclickable.png)](fancybarclickable.png) - -Download --------- -* [dwm-fancybarclickable-6.1.diff](dwm-fancybarclickable-6.1.diff) (Unclean patch) - -Authors -------- -* Mate Nagy wrote [fancybar](../fancybar/). -* An anonymous Canadian updated the fancybar patch and added the - `selectby-click-on-title` function from fancycoloredbarclickable to it. diff --git a/dwm.suckless.org/patches/runorraise/dwm-6.1-runorraise.diff b/dwm.suckless.org/patches/runorraise/dwm-6.1-runorraise.diff @@ -1,41 +0,0 @@ ---- dwm.c.orig 2013-11-29 13:58:49.673588564 +0100 -+++ dwm.c 2013-11-23 22:56:49.725007370 +0100 -@@ -193,6 +193,7 @@ - static void resizemouse(const Arg *arg); - static void restack(Monitor *m); - static void run(void); -+static void runorraise(const Arg *arg); - static void scan(void); - static Bool sendevent(Client *c, Atom proto); - static void sendmon(Client *c, Monitor *m); -@@ -1349,6 +1350,30 @@ - } - - void -+runorraise(const Arg *arg) { -+ char *app = ((char **)arg->v)[4]; -+ Arg a = { .ui = ~0 }; -+ Monitor *mon; -+ Client *c; -+ XClassHint hint = { NULL, NULL }; -+ /* Tries to find the client */ -+ for (mon = mons; mon; mon = mon->next) { -+ for (c = mon->clients; c; c = c->next) { -+ XGetClassHint(dpy, c->win, &hint); -+ if (hint.res_class && strcmp(app, hint.res_class) == 0) { -+ a.ui = c->tags; -+ view(&a); -+ focus(c); -+ XRaiseWindow(dpy, c->win); -+ return; -+ } -+ } -+ } -+ /* Client not found: spawn it */ -+ spawn(arg); -+} -+ -+void - scan(void) { - unsigned int i, num; -} diff --git a/dwm.suckless.org/patches/runorraise/index.md b/dwm.suckless.org/patches/runorraise/index.md @@ -1,34 +0,0 @@ -runorraise -========== - -Description ------------ -This patch adds a equivalent to stumpwm's [run-or-raise] action for DWM. - -The idea is to have each frequently-used application one key combination away -at all times, irrespective of which workspace it is on, or how recently it has -been used, or even whether it’s running or not. - -Usage ------ -1. In your config.h: - - static const char *emacs[] = { "emacsclient", "-c", NULL, NULL, "Emacs" }; - static const char *browser[] = { "firefox", NULL, NULL, NULL, "Firefox" }; - -2. In your keybindings add something like: - - { Modkey, XK_e, runorraise, {.v = emacs } }, - { Modkey, XK_f, runorraise, {.v = firefox } }, - -Download --------- -* [dwm-6.1-runorraise.diff](dwm-6.1-runorraise.diff) - -Authors -------- -* Quentin Stievenart (acieroid) - `<quentin.stievenart at gmail dot com>` - -Contributors ------------- -* Ivaylo Kuzev (ivoarch) - `<ivkuzev at gmail dot com>` diff --git a/dwm.suckless.org/patches/uselessgap/dwm-gap-5.7.2.diff b/dwm.suckless.org/patches/uselessgap/dwm-gap-5.7.2.diff @@ -1,23 +0,0 @@ ---- a/dwm.c 2009-09-17 10:48:57.000000000 +0200 -+++ b/dwm.c 2009-09-16 18:54:37.000000000 +0200 -@@ -1270,10 +1270,10 @@ - XWindowChanges wc; - - if(applysizehints(c, &x, &y, &w, &h, interact)) { -- c->x = wc.x = x; -- c->y = wc.y = y; -- c->w = wc.width = w; -- c->h = wc.height = h; -+ c->x = wc.x = x + gappx; -+ c->y = wc.y = y + gappx; -+ c->w = wc.width = w - 2 * gappx ; -+ c->h = wc.height = h - 2 * gappx ; - wc.border_width = c->bw; - XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc); - configure(c); - -diff -r 72e52c5333ef config.def.h ---- a/config.def.h Wed Nov 25 13:56:17 2009 +0000 -+++ b/config.def.h Tue Dec 15 18:39:44 2009 +0100 -@@ -7,14 +7,15 @@ -+static const unsigned int gappx = 4; /* gap pixel between windows */ diff --git a/dwm.suckless.org/patches/uselessgap/index.md b/dwm.suckless.org/patches/uselessgap/index.md @@ -52,7 +52,6 @@ Download Updated to use the new resizeclient() function instead of resize() * [dwm-uselessgap-5.8.diff](dwm-uselessgap-5.8.diff) (1.7k) (20100225 updated. Thanks Guillaume for your bug report) Fix floating clients bug and remove all borders in monocle mode. -* [dwm-gap-5.7.2.diff](dwm-gap-5.7.2.diff) (0.7k) (20091215) Author ------ diff --git a/dwm.suckless.org/patches/winview/dwm-6.1-winview.diff b/dwm.suckless.org/patches/winview/dwm-6.1-winview.diff diff --git a/dwm.suckless.org/patches/winview/index.md b/dwm.suckless.org/patches/winview/index.md @@ -40,7 +40,6 @@ template, config.def.h. Download -------- -* [dwm-6.1-winview.diff](dwm-6.1-winview.diff) * [dwm-6.0-winview.diff](dwm-6.0-winview.diff) Author