store screen of client, first step to multi head support
[awesome.git] / config.h
blob0893706d42b0487e594fabfc80c0ce35cd7f680c
1 /*
2 * config.h - configuration management header
3 *
4 * Copyright © 2007 Julien Danjou <julien@danjou.info>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 #ifndef AWESOME_CONFIG_H
23 #define AWESOME_CONFIG_H
25 #define AWESOME_CONFIG_FILE ".awesomerc"
27 #include <X11/Xlib.h>
29 /** Bar possible position */
30 enum
31 { BarTop, BarBot, BarOff };
33 enum
34 { ColBorder, ColFG, ColBG, ColLast }; /* color */
36 enum
37 { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
39 typedef struct
41 int x, y, w, h;
42 unsigned long norm[ColLast];
43 unsigned long sel[ColLast];
44 GC gc;
45 Cursor cursor[CurLast];
46 struct
48 int ascent;
49 int descent;
50 int height;
51 XFontSet set;
52 XFontStruct *xfont;
53 } font;
54 } DC;
56 typedef struct
58 const char *prop;
59 const char *tags;
60 Bool isfloating;
61 } Rule;
63 typedef struct awesome_config awesome_config;
65 typedef struct
67 const char *symbol;
68 void (*arrange) (Display *, awesome_config *);
69 } Layout;
71 typedef struct
73 unsigned long mod;
74 KeySym keysym;
75 void (*func) (Display *, DC *, awesome_config *, const char *);
76 const char *arg;
77 } Key;
79 /** Status bar */
80 typedef struct
82 /** Bar width */
83 int width;
84 /** Bar height */
85 int height;
86 /** Bar position */
87 int position;
88 /** Window */
89 Window window;
90 /** Drawable object */
91 Drawable drawable;
92 } Statusbar;
94 /** Main configuration structure */
95 struct awesome_config
97 /** Tag list */
98 const char **tags;
99 /** Selected tags */
100 Bool *selected_tags;
101 /* Previously selected tags */
102 Bool *prev_selected_tags;
103 /** Number of tags in **tags */
104 int ntags;
105 /** Layout list */
106 Layout *layouts;
107 /** Number of layouts in *layouts */
108 int nlayouts;
109 /** Store layout for eatch tag */
110 Layout **tag_layouts;
111 /** Rules list */
112 Rule *rules;
113 /** Number of rules in *rules */
114 int nrules;
115 /** Keys binding list */
116 Key *keys;
117 /** Number of keys binding in *keys */
118 int nkeys;
119 /** Default modkey */
120 KeySym modkey;
121 /** Numlock mask */
122 unsigned int numlockmask;
123 /** Default status bar position */
124 int statusbar_default_position;
125 /** Border size */
126 int borderpx;
127 /** Master width factor */
128 double mwfact;
129 /** Number of pixels to snap windows */
130 int snap;
131 /** Number of master windows */
132 int nmaster;
133 /** Number of columns in tile layout */
134 int ncols;
135 /** Transparency of unfocused clients */
136 int opacity_unfocused;
137 /** Respect resize hints */
138 Bool resize_hints;
139 /** Text displayed in bar */
140 char statustext[256];
141 /** Current layout */
142 Layout * current_layout;
143 /** Status bar */
144 Statusbar statusbar;
145 /** Check for XShape extension */
146 Bool have_shape;
147 /** Check for XRandR extension */
148 Bool have_randr;
151 void parse_config(Display *, int, DC *, awesome_config *); /* parse configuration file */
153 #endif