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.

52 lines
751 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 = NULL;
  23. if(!arg || !stack)
  24. return;
  25. if(!strncmp(arg, "next", 5))
  26. c = stack->snext ? stack->snext : stack;
  27. else if(!strncmp(arg, "prev", 5))
  28. for(c = stack; c && c->snext; c = c->snext);
  29. if(!c)
  30. c = stack;
  31. raise(c);
  32. focus(c);
  33. }
  34. void
  35. kill(void *aux)
  36. {
  37. Client *c = stack;
  38. if(!c)
  39. return;
  40. if(c->proto & WM_PROTOCOL_DELWIN)
  41. send_message(c->win, wm_atom[WMProtocols], wm_atom[WMDelete]);
  42. else
  43. XKillClient(dpy, c->win);
  44. }