mirror of
https://github.com/bakkeby/dwm-flexipatch
synced 2024-11-18 21:28:09 +00:00
19 lines
482 B
C
19 lines
482 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);
|
|
|
|
view(&shifted);
|
|
}
|