2 * vim:ts=4:sw=4:expandtab
4 * i3bar - an xcb-based status- and ws-bar for i3
5 * © 2010 Axel Wagner and contributors (see also: LICENSE)
7 * config.c: Parses the configuration (received from i3).
22 /* Bar display mode (hide unless modifier is pressed or show in dock mode or always hide in invisible mode) */
23 typedef enum { M_DOCK = 0,
25 M_INVISIBLE = 2 } bar_display_mode_t;
27 typedef struct binding_t {
32 TAILQ_ENTRY(binding_t)
36 typedef struct tray_output_t {
39 TAILQ_ENTRY(tray_output_t)
43 typedef struct config_t {
46 TAILQ_HEAD(bindings_head, binding_t)
51 struct xcb_color_strings_t colors;
52 bool disable_binding_mode_indicator;
54 bool strip_ws_numbers;
58 i3String *separator_symbol;
60 TAILQ_HEAD(tray_outputs_head, tray_output_t)
67 bar_display_mode_t hide_on_modifier;
69 /* The current hidden_state of the bar, which indicates whether it is hidden or shown */
71 S_SHOW = 1 } hidden_state;
77 * Start parsing the received bar configuration JSON string
80 void parse_config_json(char *json);
83 * free()s the color strings as soon as they are not needed anymore.
86 void free_colors(struct xcb_color_strings_t *colors);