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.

48 lines
870 B

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