Another copy of my dotfiles. Because I don't completely trust GitHub.
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.

18 lines
482 B

  1. void
  2. shiftview(const Arg *arg)
  3. {
  4. Arg shifted;
  5. #if SCRATCHPADS_PATCH
  6. unsigned int seltagset = selmon->tagset[selmon->seltags] & ~SPTAGMASK;
  7. #else
  8. unsigned int seltagset = selmon->tagset[selmon->seltags];
  9. #endif // SCRATCHPADS_PATCH
  10. if (arg->i > 0) // left circular shift
  11. shifted.ui = (seltagset << arg->i)
  12. | (seltagset >> (NUMTAGS - arg->i));
  13. else // right circular shift
  14. shifted.ui = seltagset >> -arg->i
  15. | seltagset << (NUMTAGS + arg->i);
  16. view(&shifted);
  17. }