Commits

Anonymous committed cce6736

add disable_focus_stealing.patch, toggleview_focus_client.patch; move gaplessgrid configuration to configh_gaplesssgrid.patch

Comments (0)

Files changed (11)

 Patch References
 ----------------
 attachabove.patch             - http://dwm.suckless.org/patches/attachabove
+disable_focus_stealing.patch  - no URL yet
 float_border_color2.patch     - http://dwm.suckless.org/patches/historical/float_border_color
 focusmaster.patch             - no URL yet
 gaplessgrid.patch             - http://dwm.suckless.org/patches/gapless_grid
 swapfocus.patch               - http://dwm.suckless.org/patches/swapfocus
 systray.patch                 - http://dwm.suckless.org/patches/systray
 tagall.patch                  - http://dwm.suckless.org/patches/historical/tagall
+toggleview_focus_client.patch - no URL yet
 zoomswap.patch                - http://dwm.suckless.org/patches/zoomswap
 
 Not maintained

configh_gaplesssgrid.patch

+# HG changeset patch
+# Parent 38afcfbdf2f889b1f12e49a5085ca7a0f6bf446f
+
+diff -r 38afcfbdf2f8 config.def.h
+--- a/config.def.h	Wed May 22 20:42:26 2013 +0200
++++ b/config.def.h	Wed May 22 20:43:34 2013 +0200
+@@ -36,11 +36,13 @@
+ static const int nmaster      = 1;    /* number of clients in master area */
+ static const Bool resizehints = True; /* True means respect size hints in tiled resizals */
+ 
++#include "gaplessgrid.c"
+ static const Layout layouts[] = {
+ 	/* symbol     arrange function */
+ 	{ "[]=",      tile },    /* first entry is default */
+ 	{ "><>",      NULL },    /* no layout function means floating behavior */
+ 	{ "[M]",      monocle },
++	{ "+++",      gaplessgrid },
+ };
+ 
+ /* key definitions */
+@@ -81,6 +83,7 @@
+ 	{ MODKEY,                       XK_t,      setlayout,      {.v = &layouts[0]} },
+ 	{ MODKEY,                       XK_f,      setlayout,      {.v = &layouts[1]} },
+ 	{ MODKEY,                       XK_m,      setlayout,      {.v = &layouts[2]} },
++	{ MODKEY,                       XK_g,      setlayout,      {.v = &layouts[3]} },
+ 	{ MODKEY,                       XK_space,  toggleview_focus, {.ui = 1} },
+ 	{ MODKEY|ControlMask,           XK_space,  setlayout,      {0} },
+ 	{ MODKEY|ShiftMask,             XK_space,  togglefloating, {0} },

configh_maximize_vert_horz.patch

-diff -r 23bd66b5c3a0 config.def.h
---- a/config.def.h	Sun Aug 19 09:53:34 2012 +0200
-+++ b/config.def.h	Sun Aug 19 09:53:49 2012 +0200
-@@ -58,6 +58,7 @@
- 
+diff -r fab57538d328 config.def.h
+--- a/config.def.h	Wed May 22 20:25:03 2013 +0200
++++ b/config.def.h	Wed May 22 20:25:19 2013 +0200
+@@ -59,6 +59,7 @@
+ #include "toggleview_focus.c"
  #include "moveresize.c"
  #include "tagall.c"
 +#include "maximize.c"
  static Key keys[] = {
  	/* modifier                     key        function        argument */
  	{ MODKEY,                       XK_p,      spawn,          {.v = dmenucmd } },
-@@ -94,6 +95,11 @@
+@@ -96,6 +97,11 @@
  	TAGKEYS(                        XK_9,                      8)
  	{ MODKEY,                       XK_q,      quit,           {1} },
  	{ MODKEY|ShiftMask,             XK_q,      quit,           {0} },

configh_moveresize.patch

-diff -r c29e22501fd3 config.def.h
---- a/config.def.h	Sun Aug 19 09:52:25 2012 +0200
-+++ b/config.def.h	Sun Aug 19 09:53:09 2012 +0200
-@@ -56,6 +56,7 @@
- static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
+diff -r 78c7a1251f1c config.def.h
+--- a/config.def.h	Wed May 22 20:23:48 2013 +0200
++++ b/config.def.h	Wed May 22 20:24:43 2013 +0200
+@@ -57,6 +57,7 @@
  static const char *termcmd[]  = { "x-terminal-emulator", NULL };
  
+ #include "toggleview_focus.c"
 +#include "moveresize.c"
  static Key keys[] = {
  	/* modifier                     key        function        argument */
  	{ MODKEY,                       XK_p,      spawn,          {.v = dmenucmd } },
-@@ -64,7 +65,7 @@
+@@ -65,7 +66,7 @@
  	{ MODKEY,                       XK_j,      focusstack,     {.i = +1 } },
  	{ MODKEY,                       XK_k,      focusstack,     {.i = -1 } },
  	{ MODKEY,                       XK_i,      incnmaster,     {.i = +1 } },
  	{ MODKEY,                       XK_h,      setmfact,       {.f = -0.05} },
  	{ MODKEY,                       XK_l,      setmfact,       {.f = +0.05} },
  	{ MODKEY,                       XK_Return, zoom,           {0} },
-@@ -92,6 +93,18 @@
+@@ -94,6 +95,18 @@
  	TAGKEYS(                        XK_9,                      8)
  	{ MODKEY,                       XK_q,      quit,           {1} },
  	{ MODKEY|ShiftMask,             XK_q,      quit,           {0} },

configh_tagall.patch

-diff -r b8553af2c992 config.def.h
---- a/config.def.h	Sun Aug 19 09:53:11 2012 +0200
-+++ b/config.def.h	Sun Aug 19 09:53:31 2012 +0200
-@@ -57,6 +57,7 @@
- static const char *termcmd[]  = { "x-terminal-emulator", NULL };
+diff -r 48eb3d3342a2 config.def.h
+--- a/config.def.h	Wed May 22 20:24:46 2013 +0200
++++ b/config.def.h	Wed May 22 20:25:01 2013 +0200
+@@ -58,6 +58,7 @@
  
+ #include "toggleview_focus.c"
  #include "moveresize.c"
 +#include "tagall.c"
  static Key keys[] = {
  	/* modifier                     key        function        argument */
  	{ MODKEY,                       XK_p,      spawn,          {.v = dmenucmd } },
-@@ -93,6 +94,15 @@
+@@ -95,6 +96,15 @@
  	TAGKEYS(                        XK_9,                      8)
  	{ MODKEY,                       XK_q,      quit,           {1} },
  	{ MODKEY|ShiftMask,             XK_q,      quit,           {0} },

disable_focus_stealing.patch

+Author: Jan Christoph Ebersbach <jceb@e-jc.de>
+URL: no URL yet
+Prevents new windows from stealing the focus.
+Known issue: When starting/restarting dwm, the first window that is managed by
+dwm receives the focus.  All following windows that are even put in the master
+area, are not focussed!
+
+diff -r b60223e90a5e dwm.c
+--- a/dwm.c	Sat Apr 13 13:00:51 2013 +0200
++++ b/dwm.c	Wed May 22 20:13:36 2013 +0200
+@@ -1168,12 +1168,13 @@
+ 	                (unsigned char *) &(c->win), 1);
+ 	XMoveResizeWindow(dpy, c->win, c->x + 2 * sw, c->y, c->w, c->h); /* some windows require this */
+ 	setclientstate(c, NormalState);
+-	if (c->mon == selmon)
+-		unfocus(selmon->sel, False);
+-	c->mon->sel = c;
++	t = selmon->sel;
++	if(c->mon != selmon || !selmon->sel)
++		c->mon->sel = c;
+ 	arrange(c->mon);
+ 	XMapWindow(dpy, c->win);
+-	focus(NULL);
++	if(!t)
++		focus(NULL);
+ }
+ 
+ void

gaplessgrid.patch

 # HG changeset patch
-# Parent dc2667f4aa2e2d513ee2ebdfbe2ff2cf13347458
+# Parent 4d67b60ade92b4afe69942bf7e3154e178aa569a
 
-diff -r dc2667f4aa2e config.def.h
---- a/config.def.h	Sun Apr 07 09:00:12 2013 +0200
-+++ b/config.def.h	Mon Apr 08 07:59:18 2013 +0200
-@@ -35,11 +35,13 @@
- static const int nmaster      = 1;    /* number of clients in master area */
- static const Bool resizehints = True; /* True means respect size hints in tiled resizals */
- 
-+#include "gaplessgrid.c"
- static const Layout layouts[] = {
- 	/* symbol     arrange function */
- 	{ "[]=",      tile },    /* first entry is default */
- 	{ "><>",      NULL },    /* no layout function means floating behavior */
- 	{ "[M]",      monocle },
-+	{ "+++",      gaplessgrid },
- };
- 
- /* key definitions */
-@@ -79,6 +81,7 @@
- 	{ MODKEY,                       XK_t,      setlayout,      {.v = &layouts[0]} },
- 	{ MODKEY,                       XK_f,      setlayout,      {.v = &layouts[1]} },
- 	{ MODKEY,                       XK_m,      setlayout,      {.v = &layouts[2]} },
-+	{ MODKEY,                       XK_g,      setlayout,      {.v = &layouts[3]} },
- 	{ MODKEY,                       XK_space,  toggleview,     {.ui = 1} },
- 	{ MODKEY|ControlMask,           XK_space,  setlayout,      {0} },
- 	{ MODKEY|ShiftMask,             XK_space,  togglefloating, {0} },
-diff -r dc2667f4aa2e gaplessgrid.c
+diff -r 4d67b60ade92 gaplessgrid.c
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/gaplessgrid.c	Mon Apr 08 07:59:18 2013 +0200
++++ b/gaplessgrid.c	Wed May 22 20:42:26 2013 +0200
 @@ -0,0 +1,35 @@
 +void
 +gaplessgrid(Monitor *m) {

personal_configh.patch

 diff -r c794a9f5ae5e config.def.h
 --- a/config.def.h	Sun Jul 08 09:45:53 2012 +0200
-+++ b/config.def.h	Sat Apr 13 13:00:51 2013 +0200
++++ b/config.def.h	Wed May 22 20:29:15 2013 +0200
 @@ -1,11 +1,11 @@
  /* See LICENSE file for copyright and license details. */
  
  
  static Key keys[] = {
  	/* modifier                     key        function        argument */
-@@ -70,7 +73,8 @@
+@@ -70,7 +73,7 @@
  	{ MODKEY,                       XK_t,      setlayout,      {.v = &layouts[0]} },
  	{ MODKEY,                       XK_f,      setlayout,      {.v = &layouts[1]} },
  	{ MODKEY,                       XK_m,      setlayout,      {.v = &layouts[2]} },
 -	{ MODKEY,                       XK_space,  setlayout,      {0} },
-+	{ MODKEY,                       XK_space,  toggleview,     {.ui = 1} },
 +	{ MODKEY|ControlMask,           XK_space,  setlayout,      {0} },
  	{ MODKEY|ShiftMask,             XK_space,  togglefloating, {0} },
  	{ MODKEY,                       XK_0,      view,           {.ui = ~0 } },
 personal_configh.patch #+personal_configh
+toggleview_focus_client.patch
+disable_focus_stealing.patch
 single_tagset.patch #+broken
 configh_restart.patch #+personal_configh
 restart.patch
 zoomswap.patch
 configh_zoomswap.patch #+personal_configh
 gaplessgrid.patch
+configh_gaplesssgrid.patch #+personal_configh
 pertag.patch
 single_window_no_border.patch
 attachabove.patch

single_tagset_all.patch

 
 Please be aware that this patch probably breaks any other patch!
 
-diff -r c30572c7d98c dwm.c
---- a/dwm.c	Mon Apr 08 07:59:20 2013 +0200
-+++ b/dwm.c	Mon Apr 08 08:00:34 2013 +0200
+diff -r 33b64d9709b8 dwm.c
+--- a/dwm.c	Wed May 22 20:27:24 2013 +0200
++++ b/dwm.c	Wed May 22 20:27:40 2013 +0200
 @@ -46,7 +46,7 @@
  #define CLEANMASK(mask)         (mask & ~(numlockmask|LockMask) & (ShiftMask|ControlMask|Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask))
  #define INTERSECT(x,y,w,h,m)    (MAX(0, MIN((x)+(w),(m)->wx+(m)->ww) - MAX((x),(m)->wx)) \
  					c = i;
  	}
  	if(c) {
-@@ -1262,12 +1308,12 @@
+@@ -1263,12 +1309,12 @@
  	unsigned int n = 0, r = 0;
  	Client *c;
  
  		/* remove border when in monocle layout */
  		if(c->bw) {
  			c->oldbw = c->bw;
-@@ -1354,8 +1400,8 @@
+@@ -1355,8 +1401,8 @@
  }
  
  Client *
  	return c;
  }
  
-@@ -1509,8 +1555,8 @@
+@@ -1510,8 +1556,8 @@
  	if(m->lt[m->sellt]->arrange) {
  		wc.stack_mode = Below;
  		wc.sibling = m->barwin;
  				XConfigureWindow(dpy, c->win, CWSibling|CWStackMode, &wc);
  				wc.sibling = c->win;
  			}
-@@ -1560,11 +1606,9 @@
+@@ -1561,11 +1607,9 @@
  	if(c->mon == m)
  		return;
  	unfocus(c, True);
  	attachstack(c);
  	focus(NULL);
  	arrange(NULL);
-@@ -1685,6 +1729,8 @@
+@@ -1686,6 +1730,8 @@
  	sw = DisplayWidth(dpy, screen);
  	sh = DisplayHeight(dpy, screen);
  	bh = dc.h = dc.font.height + 2;
  	updategeom();
  	/* init atoms */
  	wmatom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False);
-@@ -1737,7 +1783,7 @@
+@@ -1738,7 +1784,7 @@
  showhide(Client *c) {
  	if(!c)
  		return;
  		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);
-@@ -1772,14 +1818,29 @@
+@@ -1773,14 +1819,29 @@
  void
  swapfocus(){
  	Client *c;
  		selmon->sel->tags = arg->ui & TAGMASK;
  		focus(NULL);
  		arrange(selmon);
-@@ -1809,7 +1870,7 @@
+@@ -1810,7 +1871,7 @@
  	unsigned int i, n, h, mw, my, ty, r;
  	Client *c;
  
  	if(n == 0)
  		return;
  
-@@ -1817,7 +1878,7 @@
+@@ -1818,7 +1879,7 @@
  		mw = m->nmaster ? m->ww * m->mfact : 0;
  	else
  		mw = m->ww;
  		if(n == 1) {
  			if (c->bw) {
  				/* remove border when only one window is on the current tag */
-@@ -1890,12 +1951,17 @@
+@@ -1891,12 +1952,17 @@
  
  void
  toggletag(const Arg *arg) {
  		selmon->sel->tags = newtags;
  		focus(NULL);
  		arrange(selmon);
-@@ -1904,10 +1970,15 @@
+@@ -1905,10 +1971,15 @@
  
  void
  toggleview(const Arg *arg) {
  		if(newtagset == ~0) {
  			selmon->pertag->prevtag = selmon->pertag->curtag;
  			selmon->pertag->curtag = 0;
-@@ -1926,6 +1997,7 @@
+@@ -1927,6 +1998,7 @@
  		selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag];
  		selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt];
  		selmon->lt[selmon->sellt^1] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt^1];
  		if (selmon->showbar != selmon->pertag->showbars[selmon->pertag->curtag])
  			togglebar(NULL);
  		focus(NULL);
-@@ -2026,7 +2098,7 @@
+@@ -2027,7 +2099,7 @@
  
  	XDeleteProperty(dpy, root, netatom[NetClientList]);
  	for(m = mons; m; m = m->next)
  			XChangeProperty(dpy, root, netatom[NetClientList],
  			                XA_WINDOW, 32, PropModeAppend,
  			                (unsigned char *) &(c->win), 1);
-@@ -2056,8 +2128,10 @@
+@@ -2057,8 +2129,10 @@
  		if(n <= nn) {
  			for(i = 0; i < (nn - n); i++) { /* new monitors available */
  				for(m = mons; m && m->next; m = m->next);
  				else
  					mons = createmon();
  			}
-@@ -2078,17 +2152,13 @@
+@@ -2079,17 +2153,13 @@
  		else { /* less monitors available nn < n */
  			for(i = nn; i < n; i++) {
  				for(m = mons; m && m->next; m = m->next);
  				cleanupmon(m);
  			}
  		}
-@@ -2228,11 +2298,30 @@
+@@ -2229,11 +2299,30 @@
  
  void
  view(const Arg *arg) {
  	selmon->seltags ^= 1; /* toggle sel tagset */
  	if(arg->ui & TAGMASK) {
  		selmon->pertag->prevtag = selmon->pertag->curtag;
-@@ -2253,6 +2342,7 @@
+@@ -2254,6 +2343,7 @@
  	selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag];
  	selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt];
  	selmon->lt[selmon->sellt^1] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt^1];
  	if (selmon->showbar != selmon->pertag->showbars[selmon->pertag->curtag])
  		togglebar(NULL);
  	focus(NULL);
-@@ -2265,7 +2355,7 @@
+@@ -2266,7 +2356,7 @@
  	Monitor *m;
  
  	for(m = mons; m; m = m->next)
  			if(c->win == w)
  				return c;
  	return NULL;
-@@ -2323,24 +2413,24 @@
+@@ -2324,24 +2414,24 @@
  void
  zoom(const Arg *arg) {
  	Client *c = selmon->sel;
  	if(c != cold && !at)
  		at = findbefore(c);
  	detach(c);
-diff -r c30572c7d98c focusmaster.c
---- a/focusmaster.c	Mon Apr 08 07:59:20 2013 +0200
-+++ b/focusmaster.c	Mon Apr 08 08:00:34 2013 +0200
+diff -r 33b64d9709b8 focusmaster.c
+--- a/focusmaster.c	Wed May 22 20:27:24 2013 +0200
++++ b/focusmaster.c	Wed May 22 20:27:40 2013 +0200
 @@ -1,4 +1,4 @@
  static void
  focusmaster(const Arg *arg) {
 -	focus(nexttiled(selmon->clients));
 +	focus(nexttiled(selmon->cl->clients, selmon));
  }
-diff -r c30572c7d98c gaplessgrid.c
---- a/gaplessgrid.c	Mon Apr 08 07:59:20 2013 +0200
-+++ b/gaplessgrid.c	Mon Apr 08 08:00:34 2013 +0200
+diff -r 33b64d9709b8 gaplessgrid.c
+--- a/gaplessgrid.c	Wed May 22 20:27:24 2013 +0200
++++ b/gaplessgrid.c	Wed May 22 20:27:40 2013 +0200
 @@ -3,7 +3,7 @@
  	unsigned int n, cols, rows, cn, rn, i, cx, cy, cw, ch;
  	Client *c;
  		if(i/rows + 1 > cols - n%cols)
  			rows = n/cols + 1;
  		ch = rows ? m->wh / rows : m->wh;
-diff -r c30572c7d98c push.c
---- a/push.c	Mon Apr 08 07:59:20 2013 +0200
-+++ b/push.c	Mon Apr 08 08:00:34 2013 +0200
+diff -r 33b64d9709b8 push.c
+--- a/push.c	Wed May 22 20:27:24 2013 +0200
++++ b/push.c	Wed May 22 20:27:40 2013 +0200
 @@ -2,8 +2,8 @@
  prevtiled(Client *c) {
  	Client *p, *r;
  		/* attach after c */
  		detach(sel);
  		sel->next = c->next;
-diff -r c30572c7d98c tagall.c
---- a/tagall.c	Mon Apr 08 07:59:20 2013 +0200
-+++ b/tagall.c	Mon Apr 08 08:00:34 2013 +0200
+diff -r 33b64d9709b8 tagall.c
+--- a/tagall.c	Wed May 22 20:27:24 2013 +0200
++++ b/tagall.c	Wed May 22 20:27:40 2013 +0200
 @@ -1,6 +1,6 @@
  void
  tagall(const Arg *arg) {
  		{
  			if(!floating_only || c->isfloating)
  				for(j = 0; j < LENGTH(tags); j++)
-diff -r c30572c7d98c zoomswap.c
---- a/zoomswap.c	Mon Apr 08 07:59:20 2013 +0200
-+++ b/zoomswap.c	Mon Apr 08 08:00:34 2013 +0200
+diff -r 33b64d9709b8 toggleview_focus.c
+--- a/toggleview_focus.c	Wed May 22 20:27:24 2013 +0200
++++ b/toggleview_focus.c	Wed May 22 20:27:40 2013 +0200
+@@ -1,7 +1,7 @@
+ static void toggleview_focus(const Arg *arg) {
+ 	Client *c;
+ 	toggleview(arg);
+-	for(c = selmon->clients; !(c->tags & arg->ui) && c->next; c = c->next) ;
++	for(c = selmon->cl->clients; !(c->tags & arg->ui) && c->next; c = c->next) ;
+ 	if(c && c->tags & arg->ui)
+ 		focus(c);
+ }
+diff -r 33b64d9709b8 zoomswap.c
+--- a/zoomswap.c	Wed May 22 20:27:24 2013 +0200
++++ b/zoomswap.c	Wed May 22 20:27:40 2013 +0200
 @@ -3,8 +3,8 @@
  Client *
  findbefore(Client *c) {

toggleview_focus_client.patch

+Author: Jan Christoph Ebersbach <jceb@e-jc.de>
+URL: no URL yet
+Extension to the toggleview function.  The first client from the added/toggled
+tag is focussed.  This emulates a simple scratch pad functionality by keeping
+the "scratch pad" window(s) on a certain tag that can be toggled by pressing an
+easy to reach keybinding.
+
+diff -r 9bf9c994e422 config.def.h
+--- a/config.def.h	Wed May 22 20:29:15 2013 +0200
++++ b/config.def.h	Wed May 22 20:29:53 2013 +0200
+@@ -56,6 +56,7 @@
+ static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
+ static const char *termcmd[]  = { "x-terminal-emulator", NULL };
+ 
++#include "toggleview_focus.c"
+ static Key keys[] = {
+ 	/* modifier                     key        function        argument */
+ 	{ MODKEY,                       XK_p,      spawn,          {.v = dmenucmd } },
+@@ -73,6 +74,7 @@
+ 	{ MODKEY,                       XK_t,      setlayout,      {.v = &layouts[0]} },
+ 	{ MODKEY,                       XK_f,      setlayout,      {.v = &layouts[1]} },
+ 	{ MODKEY,                       XK_m,      setlayout,      {.v = &layouts[2]} },
++	{ MODKEY,                       XK_space,  toggleview_focus, {.ui = 1} },
+ 	{ MODKEY|ControlMask,           XK_space,  setlayout,      {0} },
+ 	{ MODKEY|ShiftMask,             XK_space,  togglefloating, {0} },
+ 	{ MODKEY,                       XK_0,      view,           {.ui = ~0 } },
+diff -r 9bf9c994e422 toggleview_focus.c
+--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
++++ b/toggleview_focus.c	Wed May 22 20:29:53 2013 +0200
+@@ -0,0 +1,7 @@
++static void toggleview_focus(const Arg *arg) {
++	Client *c;
++	toggleview(arg);
++	for(c = selmon->clients; !(c->tags & arg->ui) && c->next; c = c->next) ;
++	if(c && c->tags & arg->ui)
++		focus(c);
++}