Added shiftview patch
This commit is contained in:
@@ -88,6 +88,9 @@
|
||||
#if SETBORDERPX_PATCH
|
||||
#include "setborderpx.c"
|
||||
#endif
|
||||
#if SHIFTVIEW_PATCH
|
||||
#include "shiftview.c"
|
||||
#endif
|
||||
#if SORTSCREENS_PATCH
|
||||
#ifdef XINERAMA
|
||||
#include "sortscreens.c"
|
||||
|
@@ -88,6 +88,9 @@
|
||||
#if SETBORDERPX_PATCH
|
||||
#include "setborderpx.h"
|
||||
#endif
|
||||
#if SHIFTVIEW_PATCH
|
||||
#include "shiftview.h"
|
||||
#endif
|
||||
#if SORTSCREENS_PATCH
|
||||
#ifdef XINERAMA
|
||||
#include "sortscreens.h"
|
||||
|
15
patch/shiftview.c
Normal file
15
patch/shiftview.c
Normal file
@@ -0,0 +1,15 @@
|
||||
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);
|
||||
}
|
1
patch/shiftview.h
Normal file
1
patch/shiftview.h
Normal file
@@ -0,0 +1 @@
|
||||
static void shiftview(const Arg *arg);
|
Reference in New Issue
Block a user