diff options
| -rw-r--r-- | README | 4 | ||||
| -rw-r--r-- | config.h | 4 | ||||
| -rw-r--r-- | dwm.c | 16 | 
3 files changed, 24 insertions, 0 deletions
| @@ -46,3 +46,7 @@ Configuration  -------------  The configuration of dwm is done by creating a custom config.h  and (re)compiling the source code. + +Patches applied +------------- +Shiftview - https://lists.suckless.org/dev/1104/7590.html @@ -94,6 +94,8 @@ static Key keys[] = {  	TAGKEYS(                        XK_9,                      8)  	{ MODKEY|ShiftMask,             XK_q,      quit,           {0} },  	{ MODKEY,             		XK_q,      killclient,     {0} }, +	{ MODKEY,             		XK_a,      shiftview,      {.i = -1} }, +	{ MODKEY,             		XK_d,      shiftview,      {.i = +1} },  };  /* button definitions */ @@ -111,5 +113,7 @@ static Button buttons[] = {  	{ ClkTagBar,            0,              Button3,        toggleview,     {0} },  	{ ClkTagBar,            MODKEY,         Button1,        tag,            {0} },  	{ ClkTagBar,            MODKEY,         Button3,        toggletag,      {0} }, +	{ ClkTagBar,            0,         	Button4,        shiftview,      {.i = -1} }, +	{ ClkTagBar,            0,         	Button5,        shiftview,      {.i = +1} },  }; @@ -233,6 +233,7 @@ static int xerror(Display *dpy, XErrorEvent *ee);  static int xerrordummy(Display *dpy, XErrorEvent *ee);  static int xerrorstart(Display *dpy, XErrorEvent *ee);  static void zoom(const Arg *arg); +static void shiftview(const Arg *arg);  /* variables */  static const char broken[] = "broken"; @@ -2124,6 +2125,21 @@ zoom(const Arg *arg)  	pop(c);  } +void +shiftview(const Arg *arg) { +	Arg shifted; + +	if(arg->i > 0) // left circular shift +		shifted.ui = (selmon->tagset[selmon->seltags] << arg->i) +		   | (selmon->tagset[selmon->seltags] >> (LENGTH(tags) - arg->i)); + +	else // right circular shift +		shifted.ui = selmon->tagset[selmon->seltags] >> (- arg->i) +		   | selmon->tagset[selmon->seltags] << (LENGTH(tags) + arg->i); + +	view(&shifted); +} +  int  main(int argc, char *argv[])  { | 
