4 * i3 - an improved dynamic tiling window manager
6 * © 2009 Michael Stapelberg and contributors
8 * See file LICENSE for license information.
10 * include/config.h: Contains all structs/variables for the configurable
11 * part of i3 as well as functions handling the configuration file (calling
12 * the parser (src/cfgparse.y) with the correct path, switching key bindings
24 typedef struct Config Config;
26 extern SLIST_HEAD(modes_head, Mode) modes;
29 * Part of the struct Config. It makes sense to group colors for background,
30 * border and text as every element in i3 has them (window decorations, bar).
40 * Holds a user-assigned variable for parsing the configuration file. The key
41 * is replaced by value in every following line of the file.
49 SLIST_ENTRY(Variable) variables;
53 * The configuration file can contain multiple sets of bindings. Apart from the
54 * default set (name == "default"), you can specify other sets and change the
55 * currently active set of bindings by using the "mode <name>" command.
60 struct bindings_head *bindings;
62 SLIST_ENTRY(Mode) modes;
66 * Holds part of the configuration (the part which is not already in dedicated
67 * structures in include/data.h).
74 const char *ipc_socket_path;
77 int container_stack_limit;
78 int container_stack_limit_value;
80 const char *default_border;
82 /** The modifier which needs to be pressed in combination with your mouse
83 * buttons to do things with floating windows (move, resize) */
84 uint32_t floating_modifier;
86 /* Color codes are stored here */
87 struct config_client {
88 struct Colortriple focused;
89 struct Colortriple focused_inactive;
90 struct Colortriple unfocused;
91 struct Colortriple urgent;
94 struct Colortriple focused;
95 struct Colortriple unfocused;
96 struct Colortriple urgent;
101 * Reads the configuration from ~/.i3/config or /etc/i3/config if not found.
103 * If you specify override_configpath, only this path is used to look for a
104 * configuration file.
107 void load_configuration(xcb_connection_t *conn, const char *override_configfile, bool reload);
110 * Ungrabs all keys, to be called before re-grabbing the keys because of a
111 * mapping_notify event or a configuration file reload
114 void ungrab_all_keys(xcb_connection_t *conn);
117 * Grab the bound keys (tell X to send us keypress events for those keycodes)
120 void grab_all_keys(xcb_connection_t *conn);
123 * Switches the key bindings to the given mode, if the mode exists
126 void switch_mode(xcb_connection_t *conn, const char *new_mode);
128 /* prototype for src/cfgparse.y */
129 void parse_file(const char *f);