]> git.sur5r.net Git - i3/i3/blob - i3bar/include/config.h
Merge branch 'master' into next
[i3/i3] / i3bar / include / config.h
1 /*
2  * vim:ts=4:sw=4:expandtab
3  *
4  * i3bar - an xcb-based status- and ws-bar for i3
5  * © 2010-2011 Axel Wagner and contributors (see also: LICENSE)
6  *
7  * config.c: Parses the configuration (received from i3).
8  *
9  */
10 #ifndef CONFIG_H_
11 #define CONFIG_H_
12
13 #include "common.h"
14
15 typedef enum {
16     POS_NONE = 0,
17     POS_TOP,
18     POS_BOT
19 } position_t;
20
21 typedef struct config_t {
22     int          modifier;
23     position_t   position;
24     int          verbose;
25     struct xcb_color_strings_t colors;
26     bool         disable_binding_mode_indicator;
27     bool         disable_ws;
28     char         *bar_id;
29     char         *command;
30     char         *fontname;
31     char         *tray_output;
32     int          num_outputs;
33     char         **outputs;
34
35     /* Bar display mode (hide unless modifier is pressed or show in dock mode or always hide in invisible mode) */
36     enum { M_DOCK = 0, M_HIDE = 1, M_INVISIBLE = 2 } hide_on_modifier;
37
38     /* The current hidden_state of the bar, which indicates whether it is hidden or shown */
39     enum { S_HIDE = 0, S_SHOW = 1 } hidden_state;
40 } config_t;
41
42 config_t config;
43
44 /**
45  * Start parsing the received bar configuration json-string
46  *
47  */
48 void parse_config_json(char *json);
49
50 /**
51  * free()s the color strings as soon as they are not needed anymore.
52  *
53  */
54 void free_colors(struct xcb_color_strings_t *colors);
55
56 #endif