Commits

Anonymous committed 42ef050

add shifttags patch

  • Participants
  • Parent commits ddddc12

Comments (0)

Files changed (5)

 pertag.patch              - http://dwm.suckless.org/patches/pertag
 push.patch                - http://dwm.suckless.org/patches/push
 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

File configh_focusmaster.patch

 # HG changeset patch
-# Parent 76c3977b118b85fcac015a89ee459882e92cf5f4
+# Parent 17dc7ea3adc36845aa729fba28719afa2b29aadc
 
-diff -r 76c3977b118b config.def.h
---- a/config.def.h	Tue Feb 14 22:14:17 2012 +0100
-+++ b/config.def.h	Tue Feb 14 22:16:18 2012 +0100
-@@ -55,6 +55,7 @@
- #include "tagall.c"
+diff -r 17dc7ea3adc3 config.def.h
+--- a/config.def.h	Sun Aug 05 21:26:53 2012 +0200
++++ b/config.def.h	Sun Aug 05 21:27:25 2012 +0200
+@@ -63,6 +63,7 @@
  #include "maximize.c"
  #include "push.c"
+ #include "shifttags.c"
 +#include "focusmaster.c"
  static Key keys[] = {
  	/* modifier                     key        function        argument */
  	{ MODKEY,                       XK_p,      spawn,          {.v = dmenucmd } },
-@@ -119,6 +120,7 @@
- 	{ MODKEY|ShiftMask,             XK_d,      moveresize,     {.v = "0x 0y 10w 0h" } },
- 	{ MODKEY|ShiftMask,             XK_s,      moveresize,     {.v = "0x 0y 0w 10h" } },
+@@ -129,6 +130,7 @@
  	{ MODKEY|ShiftMask,             XK_w,      moveresize,     {.v = "0x 0y 0w -10h" } },
+ 	{ MODKEY,                       XK_Left,   shifttags,      {.i = -1} },
+ 	{ MODKEY,                       XK_Right,  shifttags,      {.i = +1} },
 +	{ MODKEY|ControlMask,           XK_Return, focusmaster,    {0} },
  };
  

File configh_shifttags.patch

+# HG changeset patch
+# Parent 1c00b55801453dae9765c926ecac5d7095f7cb37
+
+diff -r 1c00b5580145 config.def.h
+--- a/config.def.h	Sun Aug 05 21:26:18 2012 +0200
++++ b/config.def.h	Sun Aug 05 21:26:53 2012 +0200
+@@ -62,6 +62,7 @@
+ #include "tagall.c"
+ #include "maximize.c"
+ #include "push.c"
++#include "shifttags.c"
+ static Key keys[] = {
+ 	/* modifier                     key        function        argument */
+ 	{ MODKEY,                       XK_p,      spawn,          {.v = dmenucmd } },
+@@ -126,6 +127,8 @@
+ 	{ MODKEY|ShiftMask,             XK_d,      moveresize,     {.v = "0x 0y 10w 0h" } },
+ 	{ MODKEY|ShiftMask,             XK_s,      moveresize,     {.v = "0x 0y 0w 10h" } },
+ 	{ MODKEY|ShiftMask,             XK_w,      moveresize,     {.v = "0x 0y 0w -10h" } },
++	{ MODKEY,                       XK_Left,   shifttags,      {.i = -1} },
++	{ MODKEY,                       XK_Right,  shifttags,      {.i = +1} },
+ };
+ 
+ /* button definitions */
 configh_swapfocus.patch #+personal_configh
 zoomswap.patch
 focusmaster.patch
+shifttags.patch
+configh_shifttags.patch
 configh_focusmaster.patch #+personal_configh
 single_tagset_all.patch
 systray.patch

File shifttags.patch

+# HG changeset patch
+# Parent e674327ac3e3cd37afd76dd04937d47b0b089091
+
+diff -r e674327ac3e3 shifttags.c
+--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
++++ b/shifttags.c	Sun Aug 05 21:26:18 2012 +0200
+@@ -0,0 +1,17 @@
++static void
++shifttags(const Arg *arg) {
++	/* attention: shifting tags doesn't wrap around the first/last tag */
++	Arg shift;
++
++	if(arg->i == 0)
++		return;
++
++	if(arg->i > 0)
++		shift.ui = selmon->tagset[selmon->seltags] << arg->i;
++	else
++		shift.ui = selmon->tagset[selmon->seltags] >> (-1 * arg->i);
++
++	if(!(shift.ui & TAGMASK))
++		return;
++	view(&shift);
++}