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.

19 lines
573 B

4 years ago
  1. /** Function to shift the current view to the left/right
  2. *
  3. * @param: "arg->i" stores the number of tags to shift right (positive value)
  4. * or left (negative value)
  5. */
  6. void
  7. shiftview(const Arg *arg) {
  8. Arg shifted;
  9. if(arg->i > 0) // left circular shift
  10. shifted.ui = (selmon->tagset[selmon->seltags] << arg->i)
  11. | (selmon->tagset[selmon->seltags] >> (LENGTH(tags) - arg->i));
  12. else // right circular shift
  13. shifted.ui = selmon->tagset[selmon->seltags] >> (- arg->i)
  14. | selmon->tagset[selmon->seltags] << (LENGTH(tags) + arg->i);
  15. view(&shifted);
  16. }