i3/i3bar/include/config.h

50 lines
980 B
C
Raw Normal View History

/*
* vim:ts=4:sw=4:expandtab
*
* i3bar - an xcb-based status- and ws-bar for i3
* © 2010-2011 Axel Wagner and contributors (see also: LICENSE)
*
* config.c: Parses the configuration (received from i3).
*
*/
2010-08-25 18:02:35 -04:00
#ifndef CONFIG_H_
2010-11-04 07:27:10 -04:00
#define CONFIG_H_
#include "common.h"
2010-08-25 18:02:35 -04:00
2011-02-21 09:47:58 -05:00
typedef enum {
POS_NONE = 0,
POS_TOP,
POS_BOT
} position_t;
2011-02-21 09:47:58 -05:00
2010-08-25 18:02:35 -04:00
typedef struct config_t {
2010-11-04 07:27:10 -04:00
int hide_on_modifier;
position_t position;
2010-11-04 07:27:10 -04:00
int verbose;
struct xcb_color_strings_t colors;
int disable_ws;
char *bar_id;
char *command;
char *fontname;
char *tray_output;
2011-10-21 17:17:41 -04:00
int num_outputs;
char **outputs;
2010-08-25 18:02:35 -04:00
} config_t;
config_t config;
/**
* Start parsing the received bar configuration json-string
*
*/
void parse_config_json(char *json);
/**
* free()s the color strings as soon as they are not needed anymore.
*
*/
void free_colors(struct xcb_color_strings_t *colors);
2010-08-25 18:02:35 -04:00
#endif