Added shiftview patch

This commit is contained in:
bakkeby
2020-01-29 14:22:24 +01:00
parent 347ac5146c
commit d644c89c74
7 changed files with 36 additions and 1 deletions

15
patch/shiftview.c Normal file
View 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);
}