Commits

Anonymous committed 0f8bd8a

update systray.patch; add restart and shifttags patchees

Comments (0)

Files changed (4)

6.0/1605_c794a9f5ae5e/README

 moveresize.patch          - http://dwm.suckless.org/patches/historical/moveresize
 pertag.patch              - http://dwm.suckless.org/patches/pertag
 push.patch                - http://dwm.suckless.org/patches/push
+restart.patch             - no URL yet
 save_floats.patch         - http://dwm.suckless.org/patches/historical/save_floats
+shifttags.patch           - no URL yet
 single_tagset.patch       - http://dwm.suckless.org/patches/single_tagset
 single_window_no_border   - http://dwm.suckless.org/patches/noborder
 statusallmons.patch       - http://dwm.suckless.org/patches/statusallmons
 
 Not maintained
 --------------
-raiselower.patch              - http://dwm.suckless.org/patches/historical/raiselower
+raiselower.patch          - http://dwm.suckless.org/patches/historical/raiselower

6.0/1605_c794a9f5ae5e/dwm-6.0-restart.diff

+# HG changeset patch
+# Parent c794a9f5ae5eee168e8995c31e0dcad46a764ef9
+
+diff -r c794a9f5ae5e dwm.c
+--- a/dwm.c	Sun Jul 08 09:45:53 2012 +0200
++++ b/dwm.c	Sat Aug 18 13:28:16 2012 +0200
+@@ -280,6 +280,7 @@
+ };
+ static Atom wmatom[WMLast], netatom[NetLast];
+ static Bool running = True;
++static Bool restart = False;
+ static Cursor cursor[CurLast];
+ static Display *dpy;
+ static DC dc;
+@@ -1337,6 +1338,8 @@
+ 
+ void
+ quit(const Arg *arg) {
++	if(arg->i)
++		restart = True;
+ 	running = False;
+ }
+ 
+@@ -2179,6 +2182,8 @@
+ 	setup();
+ 	scan();
+ 	run();
++	if(restart)
++		execvp(argv[0], argv);
+ 	cleanup();
+ 	XCloseDisplay(dpy);
+ 	return EXIT_SUCCESS;

6.0/1605_c794a9f5ae5e/dwm-6.0-shifttags.diff

+# HG changeset patch
+# Parent c794a9f5ae5eee168e8995c31e0dcad46a764ef9
+
+diff -r c794a9f5ae5e shifttags.c
+--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
++++ b/shifttags.c	Sat Aug 18 13:28:29 2012 +0200
+@@ -0,0 +1,28 @@
++static void
++shifttags(const Arg *arg) {
++	Arg shift;
++	/* wrap around tags when shifting over the ends of tagmask */
++	/* only activate wrapping when the number of tags fits twice into an
++	 * unsigned int */
++	Bool wrap = LENGTH(tags) <= (sizeof(shift.ui) * 4) ? True : False;
++
++	if(arg->i == 0)
++		return;
++
++	if(arg->i > 0)
++		shift.ui = selmon->tagset[selmon->seltags] << arg->i;
++	else {
++		if(wrap) {
++			shift.ui = selmon->tagset[selmon->seltags] << LENGTH(tags);
++			shift.ui = shift.ui >> (-1 * arg->i);
++		}
++		else
++			shift.ui = selmon->tagset[selmon->seltags] >> (-1 * arg->i);
++	}
++	if(wrap)
++		shift.ui |= shift.ui >> LENGTH(tags);
++
++	if(!(shift.ui & TAGMASK))
++		return;
++	view(&shift);
++}

6.0/1605_c794a9f5ae5e/dwm-6.0-systray.diff

 
 diff -r c794a9f5ae5e config.def.h
 --- a/config.def.h	Sun Jul 08 09:45:53 2012 +0200
-+++ b/config.def.h	Sun Jul 15 22:15:39 2012 +0200
++++ b/config.def.h	Sat Aug 18 13:28:31 2012 +0200
 @@ -10,6 +10,8 @@
  static const char selfgcolor[]      = "#eeeeee";
  static const unsigned int borderpx  = 1;        /* border pixel of windows */
  
 diff -r c794a9f5ae5e dwm.c
 --- a/dwm.c	Sun Jul 08 09:45:53 2012 +0200
-+++ b/dwm.c	Sun Jul 15 22:15:39 2012 +0200
++++ b/dwm.c	Sat Aug 18 13:28:31 2012 +0200
 @@ -56,12 +56,30 @@
  #define TAGMASK                 ((1 << LENGTH(tags)) - 1)
  #define TEXTW(X)                (textnw(X, strlen(X)) + dc.font.height)
  	XSetWindowAttributes wa = {
  		.override_redirect = True,
  		.background_pixmap = ParentRelative,
-@@ -1854,7 +2045,10 @@
+@@ -1854,10 +2045,15 @@
  	for(m = mons; m; m = m->next) {
  		if (m->barwin)
  			continue;
  		                          CopyFromParent, DefaultVisual(dpy, screen),
  		                          CWOverrideRedirect|CWBackPixmap|CWEventMask, &wa);
  		XDefineCursor(dpy, m->barwin, cursor[CurNormal]);
-@@ -2051,6 +2245,104 @@
++		if(showsystray && m == selmon)
++			XMapRaised(dpy, systray->win);
+ 		XMapRaised(dpy, m->barwin);
+ 	}
+ }
+@@ -2051,6 +2247,104 @@
  }
  
  void
  updatewindowtype(Client *c) {
  	Atom state = getatomprop(c, netatom[NetWMState]);
  	Atom wtype = getatomprop(c, netatom[NetWMWindowType]);
-@@ -2119,6 +2411,16 @@
+@@ -2119,6 +2413,16 @@
  	return selmon;
  }