]> git.sur5r.net Git - i3/i3/blob - i3bar/include/config.h
introduced i3 command for changing the hidden state and the mode of i3bar
[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     int          disable_ws;
27     char         *bar_id;
28     char         *command;
29     char         *fontname;
30     char         *tray_output;
31     int          num_outputs;
32     char         **outputs;
33
34     /* Bar display mode (hide unless modifier is pressed or show in dock mode or always hide in invisible mode) */
35     enum { M_DOCK = 0, M_HIDE = 1, M_INVISIBLE = 2 } hide_on_modifier;
36
37     /* The current hidden_state of the bar, which indicates whether it is hidden or shown */
38     enum { S_HIDE = 0, S_SHOW = 1 } hidden_state;
39 } config_t;
40
41 config_t config;
42
43 /**
44  * Start parsing the received bar configuration json-string
45  *
46  */
47 void parse_config_json(char *json);
48
49 /**
50  * free()s the color strings as soon as they are not needed anymore.
51  *
52  */
53 void free_colors(struct xcb_color_strings_t *colors);
54
55 #endif