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.

134 lines
3.7 KiB

17 years ago
17 years ago
  1. /* See LICENSE file for copyright and license details. */
  2. #include <X11/Xlib.h>
  3. /* enums */
  4. enum { BarTop, BarBot, BarOff }; /* bar position */
  5. enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
  6. enum { ColBorder, ColFG, ColBG, ColLast }; /* color */
  7. enum { NetSupported, NetWMName, NetLast }; /* EWMH atoms */
  8. enum { WMProtocols, WMDelete, WMName, WMState, WMLast };/* default atoms */
  9. /* typedefs */
  10. typedef struct Client Client;
  11. struct Client {
  12. char name[256];
  13. int x, y, w, h;
  14. int rx, ry, rw, rh; /* revert geometry */
  15. int basew, baseh, incw, inch, maxw, maxh, minw, minh;
  16. int minax, maxax, minay, maxay;
  17. long flags;
  18. unsigned int border, oldborder;
  19. Bool isbanned, isfixed, ismax, isfloating, wasfloating;
  20. Bool *tags;
  21. Client *next;
  22. Client *prev;
  23. Client *snext;
  24. Window win;
  25. };
  26. typedef struct {
  27. int x, y, w, h;
  28. unsigned long norm[ColLast];
  29. unsigned long sel[ColLast];
  30. Drawable drawable;
  31. GC gc;
  32. struct {
  33. int ascent;
  34. int descent;
  35. int height;
  36. XFontSet set;
  37. XFontStruct *xfont;
  38. } font;
  39. } DC; /* draw context */
  40. typedef struct {
  41. unsigned long mod;
  42. KeySym keysym;
  43. void (*func)(const char *arg);
  44. const char *arg;
  45. } Key;
  46. typedef struct {
  47. const char *symbol;
  48. void (*arrange)(void);
  49. } Layout;
  50. /* functions */
  51. void applyrules(Client *c);
  52. void arrange(void);
  53. void attach(Client *c);
  54. void attachstack(Client *c);
  55. void ban(Client *c);
  56. void buttonpress(XEvent *e);
  57. void checkotherwm(void);
  58. void cleanup(void);
  59. void compileregs(void);
  60. void configure(Client *c);
  61. void configurenotify(XEvent *e);
  62. void configurerequest(XEvent *e);
  63. void destroynotify(XEvent *e);
  64. void detach(Client *c);
  65. void detachstack(Client *c);
  66. void drawbar(void);
  67. void drawsquare(Bool filled, Bool empty, unsigned long col[ColLast]);
  68. void drawtext(const char *text, unsigned long col[ColLast]);
  69. void *emallocz(unsigned int size);
  70. void enternotify(XEvent *e);
  71. void eprint(const char *errstr, ...);
  72. void expose(XEvent *e);
  73. void floating(void); /* default floating layout */
  74. void focus(Client *c);
  75. void focusnext(const char *arg);
  76. void focusprev(const char *arg);
  77. Client *getclient(Window w);
  78. unsigned long getcolor(const char *colstr);
  79. long getstate(Window w);
  80. Bool gettextprop(Window w, Atom atom, char *text, unsigned int size);
  81. void grabbuttons(Client *c, Bool focused);
  82. unsigned int idxoftag(const char *tag);
  83. void initfont(const char *fontstr);
  84. Bool isarrange(void (*func)());
  85. Bool isoccupied(unsigned int t);
  86. Bool isprotodel(Client *c);
  87. Bool isvisible(Client *c);
  88. void keypress(XEvent *e);
  89. void killclient(const char *arg);
  90. void leavenotify(XEvent *e);
  91. void manage(Window w, XWindowAttributes *wa);
  92. void mappingnotify(XEvent *e);
  93. void maprequest(XEvent *e);
  94. void movemouse(Client *c);
  95. Client *nexttiled(Client *c);
  96. void propertynotify(XEvent *e);
  97. void quit(const char *arg);
  98. void resize(Client *c, int x, int y, int w, int h, Bool sizehints);
  99. void resizemouse(Client *c);
  100. void restack(void);
  101. void run(void);
  102. void scan(void);
  103. void setclientstate(Client *c, long state);
  104. void setlayout(const char *arg);
  105. void setmwfact(const char *arg);
  106. void setup(void);
  107. void spawn(const char *arg);
  108. void tag(const char *arg);
  109. unsigned int textnw(const char *text, unsigned int len);
  110. unsigned int textw(const char *text);
  111. void tile(void);
  112. void togglebar(const char *arg);
  113. void togglefloating(const char *arg);
  114. void togglemax(const char *arg);
  115. void toggletag(const char *arg);
  116. void toggleview(const char *arg);
  117. void unban(Client *c);
  118. void unmanage(Client *c);
  119. void unmapnotify(XEvent *e);
  120. void updatebarpos(void);
  121. void updatesizehints(Client *c);
  122. void updatetitle(Client *c);
  123. void view(const char *arg);
  124. void viewprevtag(const char *arg); /* views previous selected tags */
  125. int xerror(Display *dpy, XErrorEvent *ee);
  126. int xerrordummy(Display *dsply, XErrorEvent *ee);
  127. int xerrorstart(Display *dsply, XErrorEvent *ee);
  128. void zoom(const char *arg);