]> git.sur5r.net Git - i3/i3/blob - include/config.h
Resolve documentation FIXMEs, remove an unnecessary struct
[i3/i3] / include / config.h
1 /*
2  * vim:ts=8:expandtab
3  *
4  * i3 - an improved dynamic tiling window manager
5  *
6  * © 2009 Michael Stapelberg and contributors
7  *
8  * See file LICENSE for license information.
9  *
10  * include/config.h: Contains all structs/variables for
11  * the configurable part of i3
12  *
13  */
14
15 #ifndef _CONFIG_H
16 #define _CONFIG_H
17
18 #include "queue.h"
19
20 typedef struct Config Config;
21 extern Config config;
22
23 /**
24  * Part of the struct Config. It makes sense to group colors for background,
25  * border and text as every element in i3 has them (window decorations, bar).
26  *
27  */
28 struct Colortriple {
29         uint32_t border;
30         uint32_t background;
31         uint32_t text;
32 };
33
34 /**
35  * Holds a user-assigned variable for parsing the configuration file. The key
36  * is replaced by value in every following line of the file.
37  *
38  */
39 struct Variable {
40         char *key;
41         char *value;
42
43         SLIST_ENTRY(Variable) variables;
44 };
45
46 /**
47  * Holds part of the configuration (the part which is not already in dedicated
48  * structures in include/data.h).
49  *
50  */
51 struct Config {
52         const char *terminal;
53         const char *font;
54
55         /** The modifier which needs to be pressed in combination with your mouse
56          * buttons to do things with floating windows (move, resize) */
57         uint32_t floating_modifier;
58
59         /* Color codes are stored here */
60         struct config_client {
61                 struct Colortriple focused;
62                 struct Colortriple focused_inactive;
63                 struct Colortriple unfocused;
64         } client;
65         struct config_bar {
66                 struct Colortriple focused;
67                 struct Colortriple unfocused;
68         } bar;
69 };
70
71 /**
72  * Reads the configuration from ~/.i3/config or /etc/i3/config if not found.
73  *
74  * If you specify override_configpath, only this path is used to look for a
75  * configuration file.
76  *
77  */
78 void load_configuration(xcb_connection_t *conn, const char *override_configfile);
79
80 #endif