My dwm config.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
483 B

3 years ago
void
shiftview(const Arg *arg)
{
Arg shifted;
#if SCRATCHPADS_PATCH
unsigned int seltagset = selmon->tagset[selmon->seltags] & ~SPTAGMASK;
#else
unsigned int seltagset = selmon->tagset[selmon->seltags];
#endif // SCRATCHPADS_PATCH
if (arg->i > 0) // left circular shift
shifted.ui = (seltagset << arg->i)
| (seltagset >> (NUMTAGS - arg->i));
else // right circular shift
shifted.ui = seltagset >> -arg->i
| seltagset << (NUMTAGS + arg->i);
view(&shifted);
}