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.

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