2 * config.h - configuration management header
4 * Copyright © 2007-2008 Julien Danjou <julien@danjou.info>
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
31 /** Bar possible position */
50 { ColBorder
, ColFG
, ColBG
, ColLast
};
53 { CurNormal
, CurResize
, CurMove
, CurLast
}; /* cursor */
55 typedef struct Rule Rule
;
69 DO_SLIST(Rule
, rule
, p_delete
);
71 typedef struct AwesomeConf AwesomeConf
;
73 typedef struct Key Key
;
83 DO_SLIST(Key
, key
, p_delete
);
85 typedef struct Button Button
;
95 DO_SLIST(Button
, button
, p_delete
);
98 typedef struct Widget Widget
;
99 typedef struct Statusbar Statusbar
;
105 int (*draw
)(Widget
*, DrawCtx
*, int, int);
106 /** Update function */
107 void (*tell
)(Widget
*, char *);
108 /** ButtonPressedEvent handler */
109 void (*button_press
)(Widget
*, XButtonPressedEvent
*);
111 Statusbar
*statusbar
;
114 /** Misc private data */
116 /** True if user supplied coords */
117 Bool user_supplied_x
;
118 Bool user_supplied_y
;
121 /** Buttons bindings */
135 DO_SLIST(Widget
, widget
, p_delete
);
140 /** Statusbar name */
146 /** Layout txt width */
148 /** Default position */
160 /** Next statusbar */
164 typedef struct Client Client
;
169 /** Window geometry */
171 /** Floating window geometry */
173 /** Max window geometry */
175 int basew
, baseh
, incw
, inch
, maxw
, maxh
, minw
, minh
;
176 int minax
, maxax
, minay
, maxay
;
177 int border
, oldborder
;
178 /** Has urgency hint */
180 /** Store previous floating state before maximizing */
182 /** True if the window is floating */
184 /** True if the window is fixed */
186 /** True if the window is maximized */
188 /** True if the client must be skipped from client list */
190 /** True if the client must be skipped from task bar client list */
194 /** Window of the client */
196 /** Client logical screen */
198 /** True if the client is a new one */
202 DO_SLIST(Client
, client
, p_delete
);
204 typedef struct FocusList FocusList
;
212 typedef struct Tag Tag
;
217 /** True if selected */
219 /** True if was selected before selecting others tags */
221 /** Current tag layout */
223 /** Master width factor */
225 /** Number of master windows */
227 /** Number of columns in tile layout */
233 /** TagClientLink type */
234 typedef struct TagClientLink TagClientLink
;
245 /** Padding at top */
247 /** Padding at bottom */
249 /** Padding at left */
251 /** Padding at right */
257 /** Number of pixels to snap windows */
261 /** Transparency of unfocused clients */
262 int opacity_unfocused
;
263 /** Focus move pointer */
264 Bool focus_move_pointer
;
265 /** Allow floats to be lowered on focus change */
266 Bool allow_lower_floats
;
267 /** Respect resize hints */
269 /** Sloppy focus: focus follow mouse */
271 /** Focus new clients */
273 /** True if new clients should become master */
274 Bool new_become_master
;
276 XColor colors_normal
[ColLast
];
277 /** Selected colors */
278 XColor colors_selected
[ColLast
];
279 /** Urgency colors */
280 XColor colors_urgent
[ColLast
];
286 Statusbar
*statusbar
;
293 /** Main configuration structure */
298 /** Logical screens */
300 /** Number of logical screens */
304 /** Keys bindings list */
306 /** Mouse bindings list */
313 unsigned int numlockmask
;
314 /** Check for XShape extension */
316 /** Check for XRandR extension */
319 Cursor cursor
[CurLast
];
322 /** Path to config file */
324 /** Selected clients on this tag */
326 /** Link between tags and clients */
327 TagClientLink
*tclink
;
328 /** Command line passed to awesome */
332 void config_parse(const char *);
335 // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80