Configuration file for DWM on MacBook Air
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.

41 lines
786 B

  1. /* See LICENSE file for copyright and license details. */
  2. #include "dwm.h"
  3. /* extern */
  4. void
  5. floating(void) {
  6. Client *c;
  7. if(lt->arrange != floating)
  8. return;
  9. for(c = clients; c; c = c->next)
  10. if(isvisible(c)) {
  11. unban(c);
  12. resize(c, c->x, c->y, c->w, c->h, True);
  13. }
  14. else
  15. ban(c);
  16. focus(NULL);
  17. restack();
  18. }
  19. void
  20. togglemax(const char *arg) {
  21. XEvent ev;
  22. if(!sel || (lt->arrange != floating && !sel->isfloating) || sel->isfixed)
  23. return;
  24. if((sel->ismax = !sel->ismax)) {
  25. sel->rx = sel->x;
  26. sel->ry = sel->y;
  27. sel->rw = sel->w;
  28. sel->rh = sel->h;
  29. resize(sel, wax, way, waw - 2 * sel->border, wah - 2 * sel->border, True);
  30. }
  31. else
  32. resize(sel, sel->rx, sel->ry, sel->rw, sel->rh, True);
  33. drawstatus();
  34. while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
  35. }