2020-01-29 14:22:24 +01:00
|
|
|
void
|
|
|
|
shiftview(const Arg *arg)
|
|
|
|
{
|
|
|
|
Arg shifted;
|
|
|
|
|
2020-05-03 16:09:05 +02:00
|
|
|
if (arg->i > 0) // left circular shift
|
2020-01-29 14:22:24 +01:00
|
|
|
shifted.ui = (selmon->tagset[selmon->seltags] << arg->i)
|
2020-08-25 16:27:14 +02:00
|
|
|
| (selmon->tagset[selmon->seltags] >> (NUMTAGS - arg->i));
|
2020-01-29 14:22:24 +01:00
|
|
|
|
|
|
|
else // right circular shift
|
|
|
|
shifted.ui = selmon->tagset[selmon->seltags] >> (- arg->i)
|
2020-08-25 16:27:14 +02:00
|
|
|
| selmon->tagset[selmon->seltags] << (NUMTAGS + arg->i);
|
2020-01-29 14:22:24 +01:00
|
|
|
|
|
|
|
view(&shifted);
|
2020-05-03 16:09:05 +02:00
|
|
|
}
|