2020-01-29 13:22:24 +00:00
|
|
|
void
|
|
|
|
shiftview(const Arg *arg)
|
|
|
|
{
|
|
|
|
Arg shifted;
|
2020-10-04 09:45:44 +00:00
|
|
|
#if SCRATCHPADS_PATCH
|
|
|
|
unsigned int seltagset = selmon->tagset[selmon->seltags] & ~SPTAGMASK;
|
|
|
|
#else
|
|
|
|
unsigned int seltagset = selmon->tagset[selmon->seltags];
|
|
|
|
#endif // SCRATCHPADS_PATCH
|
2020-05-03 14:09:05 +00:00
|
|
|
if (arg->i > 0) // left circular shift
|
2020-10-04 09:45:44 +00:00
|
|
|
shifted.ui = (seltagset << arg->i)
|
|
|
|
| (seltagset >> (NUMTAGS - arg->i));
|
2020-01-29 13:22:24 +00:00
|
|
|
else // right circular shift
|
2020-10-04 09:45:44 +00:00
|
|
|
shifted.ui = seltagset >> -arg->i
|
|
|
|
| seltagset << (NUMTAGS + arg->i);
|
2020-01-29 13:22:24 +00:00
|
|
|
|
|
|
|
view(&shifted);
|
2020-05-03 14:09:05 +00:00
|
|
|
}
|
2021-06-14 05:16:17 +00:00
|
|
|
|