mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 14:05:45 +02:00
20 lines
555 B
C
20 lines
555 B
C
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));
|
|
#if SCRATCHPADS_PATCH
|
|
shifted.ui &= ~SPTAGMASK;
|
|
#endif // SCRATCHPADS_PATCH
|
|
|
|
view(&shifted);
|
|
}
|