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.

36 lines
837 B

  1. void
  2. holdbar(const Arg *arg)
  3. {
  4. if (selmon->showbar)
  5. return;
  6. Bar *bar;
  7. selmon->showbar = 2;
  8. updatebarpos(selmon);
  9. for (bar = selmon->bar; bar; bar = bar->next)
  10. XMoveResizeWindow(dpy, bar->win, bar->bx, bar->by, bar->bw, bar->bh);
  11. }
  12. void
  13. keyrelease(XEvent *e)
  14. {
  15. Bar *bar;
  16. if (XEventsQueued(dpy, QueuedAfterReading)) {
  17. XEvent ne;
  18. XPeekEvent(dpy, &ne);
  19. if (ne.type == KeyPress && ne.xkey.time == e->xkey.time &&
  20. ne.xkey.keycode == e->xkey.keycode) {
  21. XNextEvent(dpy, &ne);
  22. return;
  23. }
  24. }
  25. if (e->xkey.keycode == XKeysymToKeycode(dpy, HOLDKEY) && selmon->showbar == 2) {
  26. selmon->showbar = 0;
  27. updatebarpos(selmon);
  28. for (bar = selmon->bar; bar; bar = bar->next)
  29. XMoveResizeWindow(dpy, bar->win, bar->bx, bar->by, bar->bw, bar->bh);
  30. arrange(selmon);
  31. }
  32. #if COMBO_PATCH
  33. combo = 0;
  34. #endif // COMBO_PATCH
  35. }