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.

39 lines
607 B

  1. static int combo = 0;
  2. void
  3. keyrelease(XEvent *e)
  4. {
  5. combo = 0;
  6. }
  7. void
  8. combotag(const Arg *arg)
  9. {
  10. if (selmon->sel && arg->ui & TAGMASK) {
  11. if (combo) {
  12. selmon->sel->tags |= arg->ui & TAGMASK;
  13. } else {
  14. combo = 1;
  15. selmon->sel->tags = arg->ui & TAGMASK;
  16. }
  17. focus(NULL);
  18. arrange(selmon);
  19. }
  20. }
  21. void
  22. comboview(const Arg *arg)
  23. {
  24. unsigned newtags = arg->ui & TAGMASK;
  25. if (combo) {
  26. selmon->tagset[selmon->seltags] |= newtags;
  27. } else {
  28. selmon->seltags ^= 1; /*toggle tagset*/
  29. combo = 1;
  30. if (newtags) {
  31. pertagview(&((Arg) { .ui = newtags }));
  32. }
  33. }
  34. focus(NULL);
  35. arrange(selmon);
  36. }