Configuration of dwm for Mac Computers
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.

50 lines
733 B

18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
  1. /*
  2. * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
  3. * See LICENSE file for license details.
  4. */
  5. #include "wm.h"
  6. #include <stdio.h>
  7. #include <string.h>
  8. void
  9. run(void *aux)
  10. {
  11. spawn(dpy, aux);
  12. }
  13. void
  14. quit(void *aux)
  15. {
  16. running = False;
  17. }
  18. void
  19. sel(void *aux)
  20. {
  21. const char *arg = aux;
  22. Client *c;
  23. if(!arg || !stack)
  24. return;
  25. if(!strncmp(arg, "next", 5))
  26. focus(stack->snext ? stack->snext : stack);
  27. else if(!strncmp(arg, "prev", 5)) {
  28. for(c = stack; c && c->snext; c = c->snext);
  29. focus(c ? c : stack);
  30. }
  31. }
  32. void
  33. kill(void *aux)
  34. {
  35. Client *c = stack;
  36. if(!c)
  37. return;
  38. if(c->proto & WM_PROTOCOL_DELWIN)
  39. send_message(c->win, wm_atom[WMProtocols], wm_atom[WMDelete]);
  40. else
  41. XKillClient(dpy, c->win);
  42. }