]> git.sur5r.net Git - i3/i3/blob - include/config.h
Implement variables in configfile.
[i3/i3] / include / config.h
1 /*
2  * vim:ts=8:expandtab
3  *
4  * i3 - an improved dynamic tiling window manager
5  *
6  * (c) 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 struct Colortriple {
24         uint32_t border;
25         uint32_t background;
26         uint32_t text;
27 };
28
29 struct Variable {
30         char *key;
31         char *value;
32
33         SLIST_ENTRY(Variable) variables;
34 };
35
36 struct Config {
37         const char *terminal;
38         const char *font;
39
40         /* Color codes are stored here */
41         struct config_client {
42                 struct Colortriple focused;
43                 struct Colortriple focused_inactive;
44                 struct Colortriple unfocused;
45         } client;
46         struct config_bar {
47                 struct Colortriple focused;
48                 struct Colortriple unfocused;
49         } bar;
50 };
51
52 /**
53  * Reads the configuration from ~/.i3/config or /etc/i3/config if not found.
54  *
55  * If you specify override_configpath, only this path is used to look for a
56  * configuration file.
57  *
58  */
59 void load_configuration(xcb_connection_t *conn, const char *override_configfile);
60
61 #endif