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.

161 lines
3.6 KiB

18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
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 <X11/Xlib.h>
  6. /********** CUSTOMIZE **********/
  7. #define FONT "-*-terminus-medium-*-*-*-13-*-*-*-*-*-iso10646-*"
  8. #define BGCOLOR "#0a2c2d"
  9. #define FGCOLOR "#ddeeee"
  10. #define BORDERCOLOR "#176164"
  11. /*
  12. #define BGCOLOR "#666699"
  13. #define FGCOLOR "#eeeeee"
  14. #define BORDERCOLOR "#9999CC"
  15. */
  16. #define MASTERW 52 /* percent */
  17. #define WM_PROTOCOL_DELWIN 1
  18. /* tags */
  19. enum { Tscratch, Tdev, Twww, Twork, TLast };
  20. /********** CUSTOMIZE **********/
  21. typedef union Arg Arg;
  22. typedef struct DC DC;
  23. typedef struct Client Client;
  24. typedef struct Fnt Fnt;
  25. typedef struct Key Key;
  26. typedef struct Rule Rule;
  27. union Arg {
  28. const char **argv;
  29. int i;
  30. };
  31. /* atoms */
  32. enum { NetSupported, NetWMName, NetLast };
  33. enum { WMProtocols, WMDelete, WMLast };
  34. /* cursor */
  35. enum { CurNormal, CurResize, CurMove, CurLast };
  36. struct Fnt {
  37. int ascent;
  38. int descent;
  39. int height;
  40. XFontSet set;
  41. XFontStruct *xfont;
  42. };
  43. struct DC { /* draw context */
  44. int x, y, w, h;
  45. unsigned long bg;
  46. unsigned long fg;
  47. unsigned long border;
  48. Drawable drawable;
  49. Fnt font;
  50. GC gc;
  51. };
  52. struct Client {
  53. char name[256];
  54. char *tags[TLast];
  55. int proto;
  56. int *x, *y, *w, *h; /* current geom */
  57. int bx, by, bw, bh; /* title bar */
  58. int fx, fy, fw, fh; /* floating geom */
  59. int tx, ty, tw, th; /* tiled geom */
  60. int basew, baseh, incw, inch, maxw, maxh, minw, minh;
  61. int grav;
  62. unsigned int border;
  63. long flags;
  64. Bool isfloat;
  65. Client *next;
  66. Client *revert;
  67. Window win;
  68. Window title;
  69. };
  70. struct Rule {
  71. const char *class;
  72. const char *instance;
  73. char *tags[TLast];
  74. Bool isfloat;
  75. };
  76. struct Key {
  77. unsigned long mod;
  78. KeySym keysym;
  79. void (*func)(Arg *arg);
  80. Arg arg;
  81. };
  82. extern char *tags[TLast], stext[1024];
  83. extern int tsel, screen, sx, sy, sw, sh, bx, by, bw, bh, mw;
  84. extern void (*handler[LASTEvent])(XEvent *);
  85. extern void (*arrange)(Arg *);
  86. extern Atom wmatom[WMLast], netatom[NetLast];
  87. extern Bool running, issel;
  88. extern Client *clients, *sel;
  89. extern Cursor cursor[CurLast];
  90. extern DC dc;
  91. extern Display *dpy;
  92. extern Key key[];
  93. extern Window root, barwin;
  94. /* client.c */
  95. extern void ban(Client *c);
  96. extern void focus(Client *c);
  97. extern void focusnext(Arg *arg);
  98. extern void focusprev(Arg *arg);
  99. extern Client *getclient(Window w);
  100. extern Client *getctitle(Window w);
  101. extern void gravitate(Client *c, Bool invert);
  102. extern void higher(Client *c);
  103. extern void killclient(Arg *arg);
  104. extern void lower(Client *c);
  105. extern void manage(Window w, XWindowAttributes *wa);
  106. extern void maximize(Arg *arg);
  107. extern void pop(Client *c);
  108. extern void resize(Client *c, Bool inc);
  109. extern void setgeom(Client *c);
  110. extern void setsize(Client *c);
  111. extern void settitle(Client *c);
  112. extern void unmanage(Client *c);
  113. extern void zoom(Arg *arg);
  114. /* draw.c */
  115. extern void drawall();
  116. extern void drawstatus();
  117. extern void drawtitle(Client *c);
  118. extern unsigned long getcolor(const char *colstr);
  119. extern void setfont(const char *fontstr);
  120. extern unsigned int textw(char *text);
  121. /* event.c */
  122. extern void grabkeys();
  123. /* main.c */
  124. extern int getproto(Window w);
  125. extern void quit(Arg *arg);
  126. extern void sendevent(Window w, Atom a, long value);
  127. extern int xerror(Display *dsply, XErrorEvent *ee);
  128. /* tag.c */
  129. extern void appendtag(Arg *arg);
  130. extern void dofloat(Arg *arg);
  131. extern void dotile(Arg *arg);
  132. extern Client *getnext(Client *c, unsigned int t);
  133. extern void heretag(Arg *arg);
  134. extern void replacetag(Arg *arg);
  135. extern void settags(Client *c);
  136. extern void view(Arg *arg);
  137. /* util.c */
  138. extern void *emallocz(unsigned int size);
  139. extern void eprint(const char *errstr, ...);
  140. extern void spawn(Arg *arg);